Flag slave-safe queries

Crell - August 24, 2008 - 08:17
Project:Drupal
Version:7.x-dev
Component:database system
Category:task
Priority:normal
Assigned:Unassigned
Status:active
Description

The new database API supports flagging queries as safe to run against a slave server if the site is using Master/slave replication. We should go through core and flag all queries that are "slave safe" while converting those queries to the new API. That should have no effect on most sites but on those using Master/slave replication (like Drupal.org) it should be a performance boost.

A query is slave-safe if it is OK if the data it retrieves is out of date by up to several minutes. Mostly that is true for reporting and statistical data, like the tracker module.

The current list of queries modified on Drupal.org to use a slave server would be a really good place to start. :-)

 
 

Drupal is a registered trademark of Dries Buytaert.