Skip to main content
Topic: Index on poster_time (Read 1475 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Index on poster_time

While working on OI, I was considering also the merge process.
One of the biggest problems with Elk about merging is that it relies on id_msg to order the messages from the first to the last.
This is of course a valid solution, and a cheap one as well: it's already a primary key, we know it's sorted the way it should.
On the other hand it has the limit that it's impossible to merge two forums "cleanly" (the only way would be to re-build the entire database, but that would mean messing up all the incoming URLs and SEO stuff, because the id would change).

I did a quick test just on sizes, and on a 1.5 million messages test board, the initial size of the table was: 697 MB, of which 492 of data and 205 of indexes.
Adding the index to poster_time, the indexes size became 219 MB.

Of course such an index may imply other problems, I'm not sure yet.
Of course we could just create an addon that sets poster_time as default sorting if the forum comes from a merge (it is doable with hooks even if a bit hackish).

Dunno, probably not something for the 1.x line but for the future.
Bugs creator.
Features destroyer.
Template killer.

Re: Index on poster_time

Reply #1

Thats not much of an increase give it was 1.5M rows.   I'm not sure I understand the issue that it fixes or improves  O:-)