Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.
Comment | File | Size | Author |
---|---|---|---|
#1 | boost-1678694-1-fix-slow-query.patch | 705 bytes | mikeytown2 |
Comments
Comment #1
mikeytown2 CreditAttribution: mikeytown2 commentedComment #2
mikeytown2 CreditAttribution: mikeytown2 commentedComment #3
bgm CreditAttribution: bgm commentedSeems 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.
Comment #4
mikeytown2 CreditAttribution: mikeytown2 commentedI'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.
Comment #5
mikeytown2 CreditAttribution: mikeytown2 commentedPatch doesn't have any side effects on our end. U want to put this in or should I?
Comment #6
bgm CreditAttribution: bgm commentedGo ahead. You're the official maintainer after all :)
Comment #7
mikeytown2 CreditAttribution: mikeytown2 commentedCommitted #1.