OPTIMIZE and LOCK TABLES

OPTIMIZE and LOCK TABLES

am 03.09.2007 02:15:40 von Leigh Sharpe

------_=_NextPart_001_01C7EDBF.8F7AEBD0
Content-Type: text/plain;
charset="US-ASCII"
Content-Transfer-Encoding: quoted-printable

Hi All,
Is it essential to lock tables when optimizing them?
I have a scheduled task which loops over all of my tables and optimises
them, but it seems to be causing some problems. I notice that in this
bug report:
http://bugs.mysql.com/bug.php?id=3D16986
there is some =
mention
of mysql deadlocking under exactl the conditions that my optimiser is
creating.
=20
However, it looks like I could get away with it if I don't lock the
tables I am optimizing. Given that I expect to get updates to the tables
concerned, I want to know if I can get away with optimising a table
without locking it first.
=20
=20
Regards,
Leigh
=20
Leigh Sharpe
Network Systems Engineer
Pacific Wireless
Ph +61 3 9584 8966
Mob 0408 009 502
Helpdesk 1300 300 616
email lsharpe@pacificwireless.com.au
=20
web www.pacificwireless.com.au
=20
=20
=20
Regards,
Leigh
=20
Leigh Sharpe
Network Systems Engineer
Pacific Wireless
Ph +61 3 9584 8966
Mob 0408 009 502
Helpdesk 1300 300 616
email lsharpe@pacificwireless.com.au
=20
web www.pacificwireless.com.au
=20
=20

------_=_NextPart_001_01C7EDBF.8F7AEBD0--