Anomie added a comment.

    |    1 | SIMPLE      | wb_entity_per_page | index  | 
wb_epp_entity,wb_epp_page | wb_epp_page | 4       | NULL                        
                | 23158153 | Using where; Using index |
  
  It's deciding to do a scan on the whole `wb_epp_page` index (estimated to be 
23 million rows!) instead of using the `wb_epp_entity` index to fetch the 
up-to-292 matching rows, which is obviously going to take a very long time. 
Possibly it does this because the one bogus `(epp_entity_id = '502560238080' 
AND epp_entity_type = 'item')` has a value that exceeds the range of `int(10) 
unsigned` for the `epp_entity_id` field so it thinks it can't manage to use the 
index instead of realizing that one is just impossible.
  
  Interestingly, if the number isn't quoted (i.e. `epp_entity_id = 
502560238080`), it does go ahead with the proper index.
  
  If you want to dig deeper into that sort of database-y goodness, you'd 
probably want to ask jcrespo.

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

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

To: Anomie
Cc: Anomie, hoo, Addshore, intracer, Ata, Base, Aklapper, Sethakill, dg711, 
D3r1ck01, Izno, Wikidata-bugs, aude, jayvdb, fbstj, Mbch331, Legoktm



_______________________________________________
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs

Reply via email to