It seems that mysql select content (as opposed to e.g. count) queries always take at least a table read lock on myisam tables and a row read lock on innodb tables. Is there a way to issue a select content query in mysql (I could change table type if that’s required) without having it to grab any locks? I don’t mind if the data returned is inconsistent since I will use it for a search index.
It seems that mysql select content (as opposed to e.g. count) queries always take
Share
With InnoDB you achieve this by setting the transaction isolation level to:
READ UNCOMMITTED.In this isolation level:
You can either change the default transaction isolation level from the MySQL option file, or else it can be enabled and disabled for a single session:
Further Reading: MySQL Documentation: Set Transaction