gpt4 book ai didi

php - 为什么mysql解释分析不起作用?

转载 作者:行者123 更新时间:2023-12-03 16:36:05 25 4
gpt4 key购买 nike

除了拥有 mariadb 10.1.36-MariaDB 之外,我还收到以下错误。

EXPLAIN ANALYZE select 1
MySQL said: Documentation

1064 - You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'ANALYZE select 1' at line 1

我还需要在这里做什么。我的 PHP 版本是 7.2.11。

最佳答案

正如您在文档中看到的 https://mariadb.com/kb/en/explain-analyze/

The syntax for the EXPLAIN ANALYZE feature was changed to ANALYZE statement, available since MariaDB 10.1.0. See ANALYZE statement.


所以只需使用 ANALYZE ...如果没有解释关键字,您将获得与过去相同的输出。
the analyze docs您有 ANALYZE 的信息声明,您可以看到它与已弃用的 EXPLAIN ANALYZE 相同.

The ANALYZE statement is similar to the EXPLAIN statement. ANALYZE statement will invoke the optimizer, execute the statement, and then produce EXPLAIN output instead of the result set. The EXPLAIN output will be annotated with statistics from statement execution.

The syntax is

ANALYZE explainable_statement;

where the statement is any statement for which one can run EXPLAIN.

关于php - 为什么mysql解释分析不起作用?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60797825/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com