Beno,

have you checked the access path MySQL uses:

EXPLAIN SELECT ... WHERE id > ...

?

Maybe you should use the methods available in MySQL to force the use of a
certain index, namely id? Then the query would only lock relevant rows. See
the MySQL online manual at www.mysql.com

>This happens now. What I would like is #4 to wait, until thread A
>finishes (commits OR rolls back). "id" is a key, buy not a unique key,
>since there can be several rows of the same value there. If it were a
>unique key, my wish would come true. :)
>If, instead of "lock in share mode", I try "for update", then it works,
>but not how I'd like it. Then #4 will wait, but it will wait even if the
>query is "select * from teszt where id > 15 for update".
>So it's basically like locking the entire table, and I cannot work with
>other data.It WORKS this way, I was just trying to speed it up.

Regards,

Heikki
http://www.innodb.com



---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to