Page MenuHomePhabricator

Wikibase\EntityPerPageTable::getItemsWithoutSitelinks slow query with large LIMIT offset
Closed, ResolvedPublic

Description

This query form appears in the slow log for wikidatawiki on WMF S5:

SELECT /* Wikibase\EntityPerPageTable::getItemsWithoutSitelinks ? */ epp_entity_id AS entity_id FROM `wb_entity_per_page` LEFT JOIN `wb_items_per_site` ON ((ips_item_id = epp_entity_id)) WHERE (ips_site_page IS NULL) AND epp_entity_type = 'item' ORDER BY epp_page_id DESC LIMIT 1940000, 51;

Offset 1940000... wow! :-)

Can we cap the possible limit offset, or handle pagination differently?

Details

Reference
bz65333

Related Objects

StatusAssignedTask
ResolvedLadsgroup
ResolvedLadsgroup
Resolvedadrianheine
Resolveddaniel
ResolvedLadsgroup
ResolvedLadsgroup
ResolvedLadsgroup
Resolvedhoo
Resolvedhoo
Resolvedhoo
Resolvedhoo
DeclinedNone
ResolvedLydia_Pintscher
ResolvedNone
ResolvedWMDE-leszek
DeclinedNone
DeclinedNone
DeclinedNone
ResolvedLadsgroup
Resolvedaude
ResolvedMarostegui
ResolvedLadsgroup
ResolvedAndrew
ResolvedLadsgroup
Resolvedaude
ResolvedLadsgroup
ResolvedLadsgroup
ResolvedLadsgroup
ResolvedMarostegui
ResolvedAndrew

Event Timeline

bzimport raised the priority of this task from to Normal.Nov 22 2014, 3:11 AM
bzimport set Reference to bz65333.
bzimport added a subscriber: Unknown Object (MLST).
Springle created this task.May 15 2014, 6:30 AM
Lydia_Pintscher removed a subscriber: Unknown Object (MLST).
Lydia_Pintscher removed a subscriber: Unknown Object (MLST).
SELECT page_id, page_title FROM page_props INNER JOIN page ON page_id = pp_page WHERE pp_propname = 'wb-sitelinks' AND pp_sortkey = 0;
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptAug 22 2015, 10:19 AM
JanZerebecki moved this task from incoming to hold on the Wikidata board.Sep 10 2015, 6:34 PM
matej_suchanek updated the task description. (Show Details)
Addshore closed this task as Resolved.Jun 14 2019, 2:44 PM
Addshore assigned this task to Ladsgroup.
Addshore added a subscriber: Addshore.

The entity per page table is gone (see T95685) so this task / issue can be resolved.

Restricted Application added a project: User-Ladsgroup. · View Herald TranscriptJun 14 2019, 2:44 PM