Board Thread:Lua Help/@comment-1466854-20140820125533/@comment-11733175-20140820233244

I think what you really want is some form of database, but sadly that's unavailable on Wikia for the time being. For the sake of completeness, Semantic Data is the traditional wiki database which is no longer available because it's been the cause of several server crashes, with Structured Data being Wikia's alternative which was scrapped some time ago but is back being developed again last I heard (which was a while ago so don't quote me on that).

I'm having some trouble grasping exactly what you're trying to do, so I'll give you an example which I hope is similar enough for you to apply to your situation.

On RuneScape Wiki, we have oodles of data relating to prices of in game items, of which there are over 3000 last I looked. Each item's price is updated every day, and we have the data going back something like 6 years. We also have the item's image, alchemy value, etc. What we currently use is something like runescape:Exchange:Iron bar which if you edit the page you'll see is a list of static data which changes very rarely, and price data. the specific parameters are price, last, date and lastDate iirc. Pages like this are transcluded all over the wiki, used in ever more complex ways and have caused several issues over time. All the historic price data (used to generate the graph you see) is at runescape:Exchange:Iron bar/Data.

Since this has been the cause of a number of issues, I've started, and mostly finished, the work to transfer this over to lua which will hopefully make things a faster. I've heard figures like 80% plus improved page load from converting wikitext templates to lua so I'm hoing it'll be much faster. In the current system, templates such as runescape:Template:GEP are used to access the data. What I've done is convert those templates to a single module designed to process all that data we have stored. You can see that processing template at runescape:Module:Exchange, with the equivalent of the static/price data at runescape:Module:Exchange/Iron bar and the equivalent of the historic price data at runescape:Module:Exchange/Iron bar/Data. With this in place I can do something like which can be transcluded through another template as  which can be used in calculations, price displays, etc.

I hope this is of some use to you :)