The query:
SELECT * FROM boost_cache WHERE url IN(...)
Issue is url is not indexed because it is a text field and not a varchar.

The code that triggers this:
http://drupalcode.org/project/boost.git/blob/4da8bca6a77a78c894d51fa14bc...

Code path:
boost_exit() -> boost_redirect_handler() -> boost_cache_kill_url() -> boost_db_multi_select_in

Solution:
Don't use the expensive query.

CommentFileSizeAuthor
#1 boost-1678694-1-fix-slow-query.patch705 bytesmikeytown2
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

mikeytown2’s picture

mikeytown2’s picture

Status: Active » Needs review
bgm’s picture

Version: 6.x-1.x-dev » 6.x-1.20
Status: Needs review » Reviewed & tested by the community

Seems like a good idea to remove it. Especially, if I understand correctly, the code in boost_exit() calling this is on a 404 or 403.

mikeytown2’s picture

I'll be testing this over then next 2 days on our production boxes. I'll let ya know if this is a good idea or not by then.

mikeytown2’s picture

Patch doesn't have any side effects on our end. U want to put this in or should I?

bgm’s picture

Go ahead. You're the official maintainer after all :)

mikeytown2’s picture

Status: Reviewed & tested by the community » Fixed

Committed #1.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.