On Wed, Jan 29, 2003 at 10:43:00PM +0100, Erik Moeller wrote:
Is it correct
the we are now using the locking mechanism in MySQL? (I
haven't been following this list for a while.) If so then this is probably
causing all the delays. Was there is specific reason for starting to use
locking?
No. We switched to the InnoDB table type, which uses row-level locking
instead of MyISAM's table locking. So in general, things should get much
faster.
Not necessarily, row level locking causes sometimes a *lot* more overhead
and can block *more* than table level locking. I assume you have read the
manual but for good measure I will quote the relevant part anyway:
Cons:
* Takes more memory than page level or table locks.
* Is slower than page level or table locks when used on a big part of
the table, because one has to do many more locks.
* Is definitely much worse than other locks if you do often do GROUP BY
on a large part of the data or if one has to often scan the whole
table.
* With higher level locks one can also more easily support locks of
different types to tune the application as the lock overhead is less
notable as for row level locks.
Especially if you are also going to use transactions that span more than 1
SQL statement (are you?) things may even get considerably worse.
-- Jan Hidders
.---------------------------------------------------------------------.
| Post-doctoral researcher e-mail: jan.hidders(a)ua.ac.be |
| Dept. Math. & Computer Science tel: (+32) 3 820 2427 |
| University of Antwerp, room J1.06 fax: (+32) 3 820 2421 |
| (UIA) Universiteitsplein 1, B-2610 Wilrijk - Antwerpen (Belgium) |
`---------------------------------------------------------------------'