在 Oracle 11g 中获取实际执行计划 [英] Getting Actual Execution Plan in Oracle 11g

查看:22
本文介绍了在 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 中获取实际执行计划的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆