我试图让一个解释命令在
mysql中工作.我正在尝试解决此删除查询的性能问题:
DELETE FROM boost_cache_relationships
WHERE base_dir = 'cache/normal/'
AND page_callback = 'node'
AND page_type = 'story'
AND page_id = '2891';
此查询是SHOW FULL PROCESSLIST命令的输出.
我知道EXPLAIN不能用于删除,所以我复制它并用SELECT替换DELETE来提供以下内容:
explain select
FROM boost_cache_relationships
WHERE base_dir = 'cache/normal/'
AND page_callback = 'node'
AND page_type = 'story'
AND page_id = '2891';
当我按Enter键时,mysql给我一条错误消息,告知这是无效的SQL:
ERROR 1064 (42000): You have an error in your SQL syntax; check the
manual that corresponds to your MySQL server version for the right
syntax to use near ‘FROM boost_cache_relationships WHERE base_dir =
‘cache/normal/’ A’ at line 1
我究竟做错了什么?
如果觉得《mysql中的删除语法错误_mysql – EXPLAIN中的SQL语法错误》对你有帮助,请点赞、收藏,并留下你的观点哦!