Hi Ross,

On Wed, 2003-06-04 at 16:44, Ross Simpson wrote:
> I have another question that doesn't seem to be addressed in the mysql
> manual.
> 
> Does any sort of locking occur while a slave is updating it's local
> databases?  Can I still read any/all tables while this process is
> occurring?
> 
Replication works by applying the SQL used to update the master to 
the slaves.  All updates in MySQL perform a lock of some sort - a table 
lock for MyISAM tables, row locks for INNODB. 

> If there is locking, is the lock table-based or for the entire db?

It depends on the table type - table locks for MyISAM, row locks for 
INNODB.

> 
> My slaves will be read-only dbs in a production environment with a lot
> of traffic, so I need to insure that they can always serve requests.
> 
Run some benchmarks for each of the updates you apply to the master 
(disconnected from replication, of course).  All tables involved with
any updates are locked for the duration of the update, so it is
important to get measurements of how long your updates take.  You 
may need to redesign your tables (more effective indexes) or partition
your updates so that one long update is broken down into many smaller
updates.

regards,
Martin


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to