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 Server DateTime 列迁移到 DateTimeOffset 2021-01-01
- 如何使用 mysql.connector 禁用查询缓存 2022-01-01
- SQL 效率:WHERE IN 子查询 vs. JOIN 然后 GROUP 2021-01-01
- 需要 MySQL 5.1 中的抽象触发器来更新审计日志 2021-01-01
- SQL:使用来自具有相同列名的两个表中的数据... 2021-01-01
- SQL Server 实例在登录协商期间返回无效或不受支持的协议版本 2021-01-01
- 在 SQL 中连接多个表 2021-01-01
- 是否可以执行按位分组功能? 2021-01-01
- SSMS 中的权限问题:“对象 'extended_properties'、数据库 'mssqlsystem_resource'、... 错误 229)上的 SELECT 权限被拒绝" 2022-01-01
- 无法解决整理冲突 2021-01-01
