Originally this function uses following SQL language:

db_query("DELETE FROM {boost_crawler} WHERE hash IN (SELECT ca.hash_url FROM {boost_cache} ca WHERE ca.expire BETWEEN 1 AND 434966399 OR ca.expire > 434966400)");

But due MySQL bugs: http://bugs.mysql.com/bug.php?id=9021 , http://bugs.mysql.com/bug.php?id=18826 , http://bugs.mysql.com/bug.php?id=9090 index "hash" is never used. Proposed solution is to rewrite queries to use EXISTS statement and add new index to boost_cache table. Patch takes care of both.

BTW, what the purpose of " ca.expire BETWEEN 1 AND 434966399 OR ca.expire > 434966400 "???

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

pavel.karoukin’s picture

mangandini’s picture

Priority: Normal » Major
Status: Needs review » Patch (to be ported)