时间:2021-07-01 10:21:17 帮助过:15人阅读
一、mysql强制加锁,
将 table1 设为read锁, table2 设为write锁, table3 设为read锁
lock tables [table1] read,[table2] write,[table3] read;
解锁
unlock tables
二、强制使用索引
FORCE INDEX
SELECT * FROM TABLE1 FORCE INDEX (FIELD1) … 三、强制忽略索引IGNORE INDEX
SELECT * FROM TABLE1 IGNORE INDEX (FIELD1, FIELD2) … 四、关闭查询缓存关闭查询缓冲 SQL_NO_CACHE
SELECT SQL_NO_CACHE field1, field2 FROM TABLE1;mysql强制性操作
标签:解锁 关闭 read 缓存 for class str rom field