Quote:
Originally Posted by JulianD
My god, I can't believe there are such great modifications still depending on modifying the post table. Do you know what it takes to do an ALTER TABLE to a table with millions of records?
|
Hey Julian, I wouldn't have added the flag field if it didn't provide a tangible performance benefit. I tried many other methods like a lookup table, however all methods meant that while I was avoiding adding a flag field, I was arbitrarily adding a lookup (or similar process) when it wasn't needed 99.9% of the time.
The reason behind the alter is that it I add a tinyint field that will flag if the post (or thread) contains AME code. If it does, the relevant AME definitions will get loaded, otherwise it won't. Since the vast majority of threads do not contain embedded media, it seemed like a waste to load the AME subsystem (and the users definitions) when it wasn't used.
So, my options were to add a field to maximise performance or slow down all performance regardless of if it was needed or not. I chose the former
Out of all the commercial and free modifications I have released over the years, it is the only alteration (apart from usergroup permissions) that I have done and I think it is a pretty wise move.
HTHs