Home  >  Article  >  Database  >  Oracle 执行计划之表访问操作

Oracle 执行计划之表访问操作

WBOY
WBOYOriginal
2016-06-07 17:27:14834browse

本篇记录一些Oracle表访问操作 Oracle显示执行计划的存储过程请参考 http://www.linuxidc.com/Linux/2013-03/80322.htm (1)TAB

Linux公社

首页 → 数据库技术

背景:

阅读新闻

Oracle 执行计划之表访问操作

[日期:2013-03-04] 来源:Linux社区  作者:laoshangxyc [字体:]

本篇记录一些Oracle表访问操作

Oracle显示执行计划的存储过程请参考

(1)TABLE ACCESS FULL

全表扫表,,使用全表扫描的方式访问表。示例:

SQL> exec sql_explain('select * from t1');
Plan hash value: 3617692013
--------------------------------------------------------------------------
| Id  | Operation        | Name | Rows  | Bytes | Cost (%CPU)| Time    |
--------------------------------------------------------------------------
|  0 | SELECT STATEMENT  |      |    10 |    80 |    3  (0)| 00:00:01 |
|  1 |  TABLE ACCESS FULL| T1  |    10 |    80 |    3  (0)| 00:00:01 |
--------------------------------------------------------------------------

PL/SQL procedure successfully completed.

(2)TABLE ACCESS BY INDEX ROWID

通过索引获得的ROWID访问表。示例:

SQL> exec sql_explain('select * from t1 where id=1');
Plan hash value: 2347959165
-------------------------------------------------------------------------------------
| Id  | Operation                  | Name  | Rows  | Bytes | Cost (%CPU)| Time    |
-------------------------------------------------------------------------------------
|  0 | SELECT STATEMENT            |      |    1 |    8 |    1  (0)| 00:00:01 |
|  1 |  TABLE ACCESS BY INDEX ROWID| T1    |    1 |    8 |    1  (0)| 00:00:01 |
|*  2 |  INDEX UNIQUE SCAN        | T1_PK |    1 |      |    0  (0)| 00:00:01 |
-------------------------------------------------------------------------------------
Predicate Information (identified by operation id):
---------------------------------------------------
2 - access("ID"=1)

PL/SQL procedure successfully completed.

linux

  • 0
  • 为快捷显示Oracle执行计划创建存储过程

    Oracle redo 原理

    相关资讯       Oracle执行计划 

    图片资讯      

  • Oracle 获取执行计划

    Oracle 获取执行计划
  • 用二叉树的中序遍历来看Oracle执行计划的执行顺序

    用二叉树的中序遍历来
  • 本文评论   查看全部评论 (0)

    评论声明

    最新资讯

    本周热门

    Linux公社简介 - 广告服务 - 网站地图 - 帮助信息 - 联系我们
    本站(LinuxIDC)所刊载文章不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。


    Copyright © 2006-2011 Linux公社 All rights reserved 浙ICP备06018118号

    Statement:
    The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn