Page MenuHomePhabricator

Don't use offset in limit in Special:EntitiesWithoutTermFinder
Closed, InvalidPublic


Found this in tendril slow queries.

SELECT /* Wikibase\Repo\Store\Sql\SqlEntitiesWithoutTermFinder::getEntitiesWithoutTerm*/ page_title AS `entity_id_serialization` FROM `page` LEFT JOIN `wb_terms` ON (((term_entity_type = 'item' AND page_namespace = '0' AND (term_full_entity_id = page_title))) AND term_type = 'label' AND term_language = 'en') WHERE (term_entity_type IS NULL) AND page_is_redirect = '0' AND page_namespace = '0' ORDER BY page_id DESC LIMIT 50000000, 51

Offsetting like this is discouraged in mysql and it's pretty slow. Rebuild the query.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptOct 22 2018, 12:09 PM