In indexing a site with ~20,000 nodes, the following query was identified as being really slow:

"SELECT lid, type, priority FROM {xmlsitemap} WHERE loc = '%s'"

This is in xmlsitemap_taxonomy.module line 226 and xmlsitemap_user.module line 214.

CommentFileSizeAuthor
#1 xmlsitemap-n549252.patch1.02 KBdamienmckenna

Comments

damienmckenna’s picture

Status: Active » Needs review
StatusFileSize
new1.02 KB

Have supplied a patch that adds an index to the hook_schema() and adds an update script to add this index to existing installs.

Anonymous’s picture

Status: Needs review » Closed (duplicate)

Your stated issue is a duplicate of #544774: Slow queries - add index to loc column. Your provided patch though is different, how does your patch help this stated slow query. The selection is on the loc (WHERE loc = '%s') and not type and priority.

damienmckenna’s picture

Yes, sorry. Please disperse, nothing to see here.