Yeah, I'm using COUNT(*)...and it is slow. But for some uses on low traffic sites like mine, it's a tradeoff some sysadmins will be willing to take. I don't see this getting used on wikipedia for performance reasons, as you note.
I was thinking about how one might cache the count, but then it seems to me that you need all kinds of triggers for whenever the category links change... I'm much too much of a newbie to dive that far into the code...at least so far, and I don't know if this can even be done as an extension without a lot of new hooks.
I'm sure the rest of you have given this much more thought than I have. ===================================== Jim Hu Associate Professor Dept. of Biochemistry and Biophysics 2128 TAMU Texas A&M Univ. College Station, TX 77843-2128 979-862-4054
On Feb 20, 2007, at 1:14 PM, Simetrical wrote:
On 2/20/07, Jim Hu jimhu@tamu.edu wrote:
I'm developing the extension for 1.8.3. I have now gotten the basic version working with the minor hack to CategoryPage.php.
So far, it improves on CategoryPage.php in two ways: Shows the subcategories no matter how many articles are shown Shows the real counts for articles when the number is >200.
I'm hoping to make it more like Special:Allpages next...I'm using it on a wiki where there are categories with >100K articles in the biggest categories:
http://gowiki.tamu.edu/GO/wiki/index.php/Category:Eukaryota
Paging through 200 at a time gets old fast!!
Are you using COUNT(*)? That's O(N) on InnoDB, which is why we don't use it: too slow for large categories. If you have an extra field in the database somewhere rather than COUNT(*), maybe it would be good for trunk (although that's for Tim, Domas, etc. to decide).
Wikitech-l mailing list Wikitech-l@lists.wikimedia.org http://lists.wikimedia.org/mailman/listinfo/wikitech-l