Mysql hint 提示_mysql提示不正确的字符串怎么办

Mysql hint 提示_mysql提示不正确的字符串怎么办

编程文章jaq1232025-10-02 20:45:383A+A-

经常使用Oracle的人都知道Oracle的hint 提示功能特别强大,MySQL也有类似的功能,下面是一些MySQL常用的hint 提示。

强制索引 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;

强制查询缓冲 SQL_CACHE
select
sql_calhe * from table1;

强制连接顺序 STRAIGHT_JOIN
select table1.field1, table2.field2 from table1
straight_join table2 where …

强制使用临时表 SQL_BUFFER_RESULT
select
sql_buffer_result * from table1 where …

点击这里复制本文地址 以上内容由jaq123整理呈现,请务必在转载分享时注明本文地址!如对内容有疑问,请联系我们,谢谢!

苍茫编程网 © All Rights Reserved.  蜀ICP备2024111239号-21