Anomie added a project: Database.
Anomie added a comment.

Wikidata is https://phabricator.wikimedia.org/T97797.

As for the rest, I'm seeing some weirdness in the database.

The query here is

  SELECT  /*! STRAIGHT_JOIN */ 
page_namespace,page_title,page_id,page_content_model  FROM `page`,`langlinks`   
WHERE page_namespace = '0' AND (page_id=ll_from)  GROUP BY page_title, page_id 
ORDER BY page_title LIMIT 6

For both arwiki and frwiktionary, it seems to work fine on db1033:

  
+------+-------------+-----------+------+--------------------+------------+---------+---------------------+---------+-------------+
  | id   | select_type | table     | type | possible_keys      | key        | 
key_len | ref                 | rows    | Extra       |
  
+------+-------------+-----------+------+--------------------+------------+---------+---------------------+---------+-------------+
  |    1 | SIMPLE      | page      | ref  | PRIMARY,name_title | name_title | 4 
      | const               | 1245075 | Using where |
  |    1 | SIMPLE      | langlinks | ref  | ll_from            | ll_from    | 4 
      | arwiki.page.page_id |      12 | Using index |
  
+------+-------------+-----------+------+--------------------+------------+---------+---------------------+---------+-------------+

On the rest of the s7 DBs (db1028, db1034, db1041, db1039, db1062), the same 
query has a different plan:

  
+------+-------------+-----------+------+--------------------+------------+---------+---------------------+---------+----------------------------------------------+
  | id   | select_type | table     | type | possible_keys      | key        | 
key_len | ref                 | rows    | Extra                                 
       |
  
+------+-------------+-----------+------+--------------------+------------+---------+---------------------+---------+----------------------------------------------+
  |    1 | SIMPLE      | page      | ref  | PRIMARY,name_title | name_title | 4 
      | const               | 1161329 | Using where; Using temporary; Using 
filesort |
  |    1 | SIMPLE      | langlinks | ref  | ll_from            | ll_from    | 4 
      | arwiki.page.page_id |       8 | Using index                             
     |
  
+------+-------------+-----------+------+--------------------+------------+---------+---------------------+---------+----------------------------------------------+

Any ideas, database gurus?

I also note that changing the query to just `GROUP BY page_title` makes all the 
DBs here happy, so that's an option to fix it.


TASK DETAIL
  https://phabricator.wikimedia.org/T78276

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Anomie
Cc: Anomie, jayvdb, Aklapper, pywikibot-bugs-list, aude, Krenair, Legoktm, 
Malyacko



_______________________________________________
pywikibot-bugs mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs

Reply via email to