【问题标题】:Is there any possibility to get explain plan results from stored procedures?是否有可能从存储过程中获得解释计划结果?
【发布时间】:2020-08-29 21:15:47
【问题描述】:

在存储过程中不允许使用解释计划、显示计划和其他命令。 我想,我会从 plancache 回电(根据文档中所说的here),但那里没有计划。

我在集群中,使用 memsql 7.0.15。

问候, 现金

【问题讨论】:

  • 对此有任何答案吗?

标签: sql-execution-plan explain singlestore


【解决方案1】:

从 memsql 7.1 版本开始,现在允许在存储过程中使用 EXPLAIN、PROFILE 和 SHOW PROFILE。

【讨论】:

    【解决方案2】:

    启用 enable_disk_plan_explain 后,您可以使用命令 SHOW PLAN <plan_id> 在计划缓存中显示说明。见https://docs.memsql.com/v7.0/reference/sql-reference/data-manipulation-language-dml/explain/

    【讨论】:

    • 我无法从存储过程执行 show plan 。我在运行时需要这个。我想存储计划以供进一步分析。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-10-30
    • 2019-07-10
    • 1970-01-01
    • 2011-05-29
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多