https://bugzilla.wikimedia.org/show_bug.cgi?id=39519
Web browser: ---
Bug #: 39519
Summary: Pathological amount of DB queries, and redundant DB
queries, on some custom templates
Product: MediaWiki extensions
Version: unspecified
Platform: All
OS/Version: All
Status: UNCONFIRMED
Severity: normal
Priority: Unprioritized
Component: Semantic MediaWiki
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected], [email protected]
Classification: Unclassified
Mobile Platform: ---
Created attachment 10988
--> https://bugzilla.wikimedia.org/attachment.cgi?id=10988
SQL debug log of a single page view, compressed (10.5MB raw)
On some pages we're seeing exquisitely bad performance (page generation time
over 30 seconds on a fast machine) for some views.
Debug info points at DB usage as one bottleneck: One page generates just over
42k (yes, forty two thousand) DB queries. See attachment.
Last DB query is:
Query wiki (42053) (slave): COMMIT
Looking at the queries there appears to be lots of duplication, for example:
Query wiki (84) (slave): SELECT /* SMWSQLStore2::getSMWPageIDandSort
Patrick.lauer */ smw_id,smw_iw,smw_sortkey FROM `smw_ids` WHERE
smw_title='P078272' AND smw_namespace='0' AND (smw_iw='' OR smw_iw=':smw-redi')
AND smw_subobject='' LIMIT 1
Query wiki (85) (slave): SELECT /* SMWSQLStore2::getSMWPageIDandSort
Patrick.lauer */ smw_id,smw_iw,smw_sortkey FROM `smw_ids` WHERE
smw_title='P078272' AND smw_namespace='0' AND (smw_iw='' OR smw_iw=':smw-redi')
AND smw_subobject='' LIMIT 1
Query wiki (86) (slave): SELECT /* SMWSQLStore2::getSMWPageIDandSort
Patrick.lauer */ smw_id,smw_iw,smw_sortkey FROM `smw_ids` WHERE
smw_title='P078272' AND smw_namespace='0' AND (smw_iw='' OR smw_iw=':smw-redi')
AND smw_subobject='' LIMIT 1
Query wiki (87) (slave): SELECT /* SMWSQLStore2::getSMWPageIDandSort
Patrick.lauer */ smw_id,smw_iw,smw_sortkey FROM `smw_ids` WHERE
smw_title='P078272' AND smw_namespace='0' AND (smw_iw='' OR smw_iw=':smw-redi')
AND smw_subobject='' LIMIT 1
Query wiki (88) (slave): SELECT /* SMWSQLStore2::getSMWPageIDandSort
Patrick.lauer */ smw_id,smw_iw,smw_sortkey FROM `smw_ids` WHERE
smw_title='P078272' AND smw_namespace='0' AND (smw_iw='' OR smw_iw=':smw-redi')
AND smw_subobject='' LIMIT 1
Query wiki (89) (slave): SELECT /* SMWSQLStore2::getSMWPageIDandSort
Patrick.lauer */ smw_id,smw_iw,smw_sortkey FROM `smw_ids` WHERE
smw_title='P078272' AND smw_namespace='0' AND (smw_iw='' OR smw_iw=':smw-redi')
AND smw_subobject='' LIMIT 1
Query wiki (90) (slave): SELECT /* SMWSQLStore2::getSMWPageIDandSort
Patrick.lauer */ smw_id,smw_iw,smw_sortkey FROM `smw_ids` WHERE
smw_title='P078272' AND smw_namespace='0' AND (smw_iw='' OR smw_iw=':smw-redi')
AND smw_subobject='' LIMIT 1
Query wiki (91) (slave): SELECT /* SMWSQLStore2::getSMWPageIDandSort
Patrick.lauer */ smw_id,smw_iw,smw_sortkey FROM `smw_ids` WHERE
smw_title='P078272' AND smw_namespace='0' AND (smw_iw='' OR smw_iw=':smw-redi')
AND smw_subobject='' LIMIT 1
Query wiki (92) (slave): SELECT /* SMWSQLStore2::getSMWPageIDandSort
Patrick.lauer */ smw_id,smw_iw,smw_sortkey FROM `smw_ids` WHERE
smw_title='P078271' AND smw_namespace='0' AND (smw_iw='' OR smw_iw=':smw-redi')
AND smw_subobject='' LIMIT 1
But even if that redundancy were removed it'd still be doing too much work -
the page view is just a list of all pages with certain attributes.
I can provide further info and template details if needed.
--
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l