On Feb 7, 2008 3:16 AM, Simetrical Simetrical+wikilist@gmail.com wrote:
You know, exactly why do we have a separate recentchanges table at all?
The thing is, recentchanges boosts things a lot. For example, if I edit a page and change its size from 2KB to 4KB, then you edit it to 6KB, and then an admin deletes the middle version, the wiki will be able to show them in a matter of milliseconds, because every step (and every size) is stored in recentchanges table. However, if the wiki was supposed to generate the recentchanges using revision and logs table, it had to get the rev_id of the 6KB edition and then find the previous revision (which means it should have search both "revision" and "archive" tables for it, because the previous revision could be deleted, which is a more complicated task, with more load on the database backend. Also, it had to mix the logs and edit events, and then sort all of them using their timestamp, which is again a pain in ass.
Recentchanges boosts all these actions, by distributing the load. Instead of having high load everytime recent changes should get calculated (when visiting Special:Recentchange with your proposed function), a little load is put on the server when every event (edit/log) happens, to add a row to recentchanges table. This distribution of the load helps the wiki work better.
Huji