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.
Attached is a patch to optimize the select queries in Site verifcation to use the slave database when configured and available. Could this be incorporated? Thanks!
Comment | File | Size | Author |
---|---|---|---|
#3 | opt-queries-1193912-3.patch | 644 bytes | amanaplan |
opt-queries.patch | 2.81 KB | amanaplan |
Comments
Comment #1
amanaplan CreditAttribution: amanaplan commentedComment #2
Dave ReidCore doesn't seem to establish a pattern of using slave servers when using queries in validation or load hooks, so I'm very hesitant to approve those changes.
Comment #3
amanaplan CreditAttribution: amanaplan commentedDefinitely understood and a valid hesitation. What do you think about just using slave servers to query the verification meta tags to add to the front page? It may seem pretty insignificant, but I'm trying to reduce overall master database load on the front page for logged in users (where a lot of activity is occurring and Varnish, of course, is not an option). Many thanks for your time.
Comment #4
joachim CreditAttribution: joachim commentedThis seems to me to definitely be something that should be handled at the core level -- the connection object has the ability to have default options for all queries: https://api.drupal.org/api/drupal/includes!database!database.inc/functio.... I imagine those can be set somehow. If not, then that's a core bug. It shouldn't be necessary to patch all contrib modules in this way!