Support » Plugin: Broken Link Checker » [Plugin: Broken Link Checker] Create index last_check_attempt in prefix_blc_links

  • Whenever BLC is triggered, it does the query:

    SELECT links.* FROM wp_blc_links AS links WHERE (( last_check_attempt < '2011-10-11 17:57:52' ) OR ( (broken = 1 OR being_checked = 1) AND may_recheck = 1 AND check_count < 3 AND last_check_attempt < '2011-10-21 17:37:52' )) AND EXISTS (SELECT 1 FROM wp_blc_instances AS instances WHERE instances.link_id = links.link_id AND ( instances.container_type IN ('dummy', 'page', 'post', 'comment', 'blogroll') )AND ( instances.parser_type IN ('link', 'image', 'url_field', 'metadata') ))ORDER BY last_check_attempt ASC LIMIT 30;

    Problem is, the first part of this query doesn’t use an index. So it ends up using filesort, which isn’t too bad with only a few links, but with hundreds/thousands, this can be a penalty.

    Anyway, adding an index for “last_check_attempt” to that table allows mysql to use an index for the query, and avoids filesort. Just thought I would pitch this as a feature request.

  • The topic ‘[Plugin: Broken Link Checker] Create index last_check_attempt in prefix_blc_links’ is closed to new replies.