Hello,
Attached is a patch against the current phase3 branch. It adds a new column to the cur table, cur_text_length, that stores the length of the cur_text column.
It is used by Special:Shortpages, Special:Longpages, Special:Newpages and stub detection.
To add it to an existing wikipedia, you have to execute these SQL statements.
ALTER TABLE cur ADD COLUMN (cur_text_length int(8) unsigned NOT NULL default 0); CREATE INDEX namespace_redirect_length ON cur(cur_namespace,cur_is_redirect,cur_text_length); UPDATE cur SET cur_text_length = length(cur_text);
Beware! This takes some time for a big DB like the English one. The order of the indexes columns is important, don't change it.
Regards,
JeLuF
wikitech-l@lists.wikimedia.org