<h3 class="title" style="box-sizing: inherit; margin: 8px 0px 15px; padding: 0px; border: 0px; outline: 0px; font-size: 21.3581px; vertical-align: baseline; font-weight: normal; color: rgb(85, 85, 85); line-height: 1.5; font-family: 'Open Sans', Arial, Helvetica, sans-serif; background-image: initial; background-attachment: initial; background-size: initial; background-origin: initial; background-clip: initial; background-position: initial; background-repeat: initial;"><pre name="code" class="html">Locks Set by Different SQL Statements in InnoDB If you have no indexes suitable for your statement and MySQL must scan the entire table to process the statement, every row of the table becomes locked, which in turn blocks all inserts by other users to the table. It is important to create good indexes so that your queries do not unnecessarily scan many rows. 如果你没有合适的所有用于你的语句,MySQL 必须扫描整个表来处理语句, 每个表的记录被锁定,blocks 所有其他用户插入到这个表 创建好的所有是重要的 这样你查询不需要扫描很多记录