[development] Drupal performance patches: call for action

Dries Buytaert dries.buytaert at gmail.com
Thu Aug 2 07:47:07 UTC 2007


On 02 Aug 2007, at 01:08, Derek Wright wrote:

> If we're going to use a separate query function for queries that  
> can be directed to the read-only DB(s), why not call it something  
> like "db_query_read()"?  Pardon my ignorance in split DB  
> configurations and queries, but are there any read-only queries  
> that aren't safe for this?  Don't we just have to direct SELECT  
> queries one way, and UPDATE or INSERT queries another?

No, that's not a good solution -- we need to more fine-control as per  
the explanation at http://buytaert.net/scaling-with-mysql-replication.

In short: read != slave.

> <idea type="crazy">
> Can't we just parse the query and see if it contains any UPDATE or  
> INSERT clauses? ;)  Why do we need to change the API at all?
> </idea>

Ditto -- not a good solution.  See explanation at http://buytaert.net/ 
scaling-with-mysql-replication.

--
Dries Buytaert  ::  http://www.buytaert.net/



More information about the development mailing list