From bf4605e41a23fa042c4eb7aceccc29982927ad3c Mon Sep 17 00:00:00 2001 From: Domas Mituzas Date: Sat, 12 Nov 2005 09:53:16 +0000 Subject: [PATCH] "I LOVE YOU AVAR" type of commit a) Use indexes for joins b) Choose proper column for IS NULL, in order to avoid row fetches and work on index only c) PROFIT!!! (a query faster by a factor of tens of thousands... ) --- includes/SpecialWantedcategories.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/SpecialWantedcategories.php b/includes/SpecialWantedcategories.php index 7a35703bba..a47576f27f 100644 --- a/includes/SpecialWantedcategories.php +++ b/includes/SpecialWantedcategories.php @@ -35,8 +35,8 @@ class WantedCategoriesPage extends QueryPage { cl_to as title, COUNT(*) as value FROM $categorylinks - LEFT JOIN $page ON cl_to = page_title - WHERE page_len IS NULL + LEFT JOIN $page ON cl_to = page_title AND page_namespace = ". NS_CATEGORY ." + WHERE page_title IS NULL GROUP BY cl_to "; } -- 2.20.1