Optimize table lock table?

WBOY
Release: 2016-09-13 09:00:19
Original
2366 people have browsed it

The mysql version is 5.6 and I use Alibaba Cloud's RDS. I read online before that the optimize table will lock the table. I tested it myself today and it is possible to perform update delete operations during the optimize table.
Excuse me why this is

Another question, how do you know whether a statement/command will lock the table? Is there any way to check the locked table

Reply content:

The mysql version is 5.6 and I use Alibaba Cloud's RDS. I read online before that the optimize table will lock the table. I tested it myself today. It is possible to perform update delete operations during the optimize table.
Excuse me why this is

Another question, how do you know whether a statement/command will lock the table? Is there any way to check the locked table

show OPEN TABLES where In_use > 0; This SQL statement can check which tables are currently locked
SHOW PROCESSLIST; You can check the currently executing SQL statement and execution status

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template