Page MenuHomePhabricator
Paste P16896

(An Untitled Masterwork)
ActivePublic

Authored by Marostegui on Jul 26 2021, 10:52 AM.
Query:
SELECT /* DynamicPageListHooks::processQuery - Создатели_«Спутника_V»_потребовали_извинений_от_главы_европейского_регулятора_за_сравнение_вакцины_с_«русской_рулеткой» */ page_namespace,page_title,c1.cl_timestamp FROM `page` LEFT JOIN `flaggedpages` ON ((page_id = fp_page_id)) INNER JOIN `categorylinks` `c1` ON ((page_id = c1.cl_from) AND (c1.cl_to='Опубликовано')) INNER JOIN `categorylinks` `c2` ON ((page_id = c2.cl_from) AND (c2.cl_to='В_мире')) LEFT OUTER JOIN `categorylinks` `c3` ON ((page_id = c3.cl_from) AND (c3.cl_to='Не_публиковать')) LEFT OUTER JOIN `categorylinks` `c4` ON ((page_id = c4.cl_from) AND (c4.cl_to='Ожидаемые_события_по_датам')) LEFT OUTER JOIN `categorylinks` `c5` ON ((page_id = c5.cl_from) AND (c5.cl_to='Архивные_новости')) LEFT OUTER JOIN `categorylinks` `c6` ON ((page_id = c6.cl_from) AND (c6.cl_to='Викиновости_коротко')) WHERE page_namespace = 0 AND (fp_stable IS NOT NULL) AND page_is_redirect = 0 AND c3.cl_to IS NULL AND c4.cl_to IS NULL AND c5.cl_to IS NULL AND c6.cl_to IS NULL ORDER BY page_id DESC LIMIT 18
Explain:
mysql:root@localhost [(none)]> show explain for 253208130;
+------+-------------+--------------+--------+-----------------------------------------------------+---------+---------+-----------------------------+----------+--------------------------------------+
| id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra |
+------+-------------+--------------+--------+-----------------------------------------------------+---------+---------+-----------------------------+----------+--------------------------------------+
| 1 | SIMPLE | c2 | index | PRIMARY,cl_timestamp,cl_sortkey | PRIMARY | 261 | const | 41653361 | Using where; Using index |
| 1 | SIMPLE | c1 | eq_ref | PRIMARY,cl_timestamp,cl_sortkey | PRIMARY | 261 | ruwikinews.c2.cl_from,const | 1 | Using where |
| 1 | SIMPLE | flaggedpages | eq_ref | PRIMARY | PRIMARY | 4 | ruwikinews.c2.cl_from | 1 | Using where |
| 1 | SIMPLE | page | eq_ref | PRIMARY,page_name_title,page_redirect_namespace_len | PRIMARY | 4 | ruwikinews.c2.cl_from | 1 | Using where |
| 1 | SIMPLE | c3 | eq_ref | PRIMARY,cl_timestamp,cl_sortkey | PRIMARY | 261 | ruwikinews.c2.cl_from,const | 1 | Using where; Using index; Not exists |
| 1 | SIMPLE | c4 | eq_ref | PRIMARY,cl_timestamp,cl_sortkey | PRIMARY | 261 | ruwikinews.c2.cl_from,const | 1 | Using where; Using index; Not exists |
| 1 | SIMPLE | c5 | eq_ref | PRIMARY,cl_timestamp,cl_sortkey | PRIMARY | 261 | ruwikinews.c2.cl_from,const | 1 | Using where; Using index; Not exists |
| 1 | SIMPLE | c6 | eq_ref | PRIMARY,cl_timestamp,cl_sortkey | PRIMARY | 261 | ruwikinews.c2.cl_from,const | 1 | Using where; Using index; Not exists |
+------+-------------+--------------+--------+-----------------------------------------------------+---------+---------+-----------------------------+----------+--------------------------------------+
8 rows in set, 1 warning (0.003 sec)