antispam_callback_queue() calls a query that needs an index on antispam_spam_marks.content_id.
With 50k+ nodes and no index a query such as:
SELECT COUNT(*) AS cnt FROM node n LEFT JOIN antispam_spam_marks s ON s.content_id = n.nid AND s.content_type = 'node' WHERE ( n.type IN ('type1', 'type2', 'type3', 'type4') AND (n.status = 1))
can take dozens of seconds to execute.

attached is a hook_update_N() patch to add an index to the field.

CommentFileSizeAuthor
antispam-callback-queue-index.patch578 bytesnibblebot

Comments

pixture’s picture

Thanks for the patch. I will add this patch to the next release.

nibblebot’s picture

Status: Needs review » Reviewed & tested by the community

Hey,
Didn't see this in the 1.3 release. Do you have any concerns with including it in the next release?

avpaderno’s picture

Version: 6.x-1.2 » 6.x-1.x-dev
Issue summary: View changes
Status: Reviewed & tested by the community » Closed (outdated)

I am closing this issue, since Drupal 4.x, 5.x, and 6.x are now not supported.