Getting Actual Execution Plan in Oracle 11g(在 Oracle 11g 中获取实际执行计划)
问题描述
我已阅读此帖子和这个 优秀文章
I have read this post and this excellent article
我的问题是,如何在 Oracle 11g 中获取实际执行计划
My question is, how to get the acutual execution plan in Oracle 11g
没有 sys 权限和 DBA 权限.(您可以将我的案例视为只读用户)
without sys privilege and DBA privilege. (You can treat my case as a READ-ONLY user)
我可以在 TOAD 中使用 SYS.PLAN_TABLE$ 或 CTRL+E 获得解释计划>
I'm able to get the explain plan using SYS.PLAN_TABLE$ or CTRL+E in TOAD
但我的理解是解释计划=仅估计执行计划?
But my understanding is that explain plan = estimated execution plan only?
在 Oracle 的文档中找到
Found on Oracle's Document
执行计划可能因以下原因而有所不同:
Execution plans can differ due to the following:
-
不同的架构
-
不同的费用
请给我任何你能提供的帮助来澄清我的概念.
Please give me any help you can offer to clear my concepts.
推荐答案
如果你想使用 dbms_xplan.display_cursor,你需要 至少有这些资助:
If you want to use dbms_xplan.display_cursor, you'll need at least these grants:
grant select on sys.v_$sql_plan to larry;
grant select on sys.v_$session to larry;
grant select on sys.v_$sql_plan_statistics_all to larry;
而且您可能还需要 V$SQL 来查找 SQL_ID:
And you'll probably also need V$SQL to find the SQL_ID:
grant select on sys.v_$sql to larry;
这篇关于在 Oracle 11g 中获取实际执行计划的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:在 Oracle 11g 中获取实际执行计划
- SQL 临时表问题 2022-01-01
- 使用 Oracle PL/SQL developer 生成测试数据 2021-01-01
- 以一个值为轴心,但将一行上的数据按另一行分组? 2022-01-01
- 在SQL中,如何为每个组选择前2行 2021-01-01
- 更改自动增量起始编号? 2021-01-01
- 如何使用 pip 安装 Python MySQLdb 模块? 2021-01-01
- 导入具有可变标题的 Excel 文件 2021-01-01
- 如何将 Byte[] 插入 SQL Server VARBINARY 列 2021-01-01
- 如何将 SonarQube 6.7 从 MySQL 迁移到 postgresql 2022-01-01
- 远程 mySQL 连接抛出“无法使用旧的不安全身份验证连接到 MySQL 4.1+"来自 XAMPP 的错误 2022-01-01
