• index range scan 单块读


    --1719
    
    SESSION_ID	1141	
    SQL_ID	drpk7cccd9xhm	
    MACHINE	WORKGROUPTLCB-PC	
    BLOCKING_SESSION		
    SAMPLE_TIME	10-4月 -19 07.50.01.154 下午	
    MODULE	PL/SQL Developer	
    PROGRAM	plsqldev.exe	
    EVENT	db file sequential read	
    P1	4	
    P1TEXT	file#	
    P2	190469	
    P2TEXT	block#	
    P3	1	
    P3TEXT	blocks	
    SQL_TEXT	select count(*) from p800 where owner='SCOTT' 	
    
    
    
    SQL> select owner,segment_name,segment_type,partition_name from dba_extents where file_id=4 and 190469  between block_id and block_id+blocks-1;
    
    OWNER	   SEGMENT_NAME 		  SEGMENT_TYPE			 PARTITION_NAME
    ---------- ------------------------------ ------------------------------ ------------------------------------------------------------------------------------------
    TEST	   P800_IDX2			  INDEX
    
    
    SQL> explain plan for select count(*) from p800 where owner='SCOTT' 	;
    
    已解释。
    
    SQL> select * from table(dbms_xplan.display());
    
    PLAN_TABLE_OUTPUT
    --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    Plan hash value: 3042126352
    
    -------------------------------------------------------------------------------
    | Id  | Operation	  | Name      | Rows  | Bytes | Cost (%CPU)| Time     |
    -------------------------------------------------------------------------------
    |   0 | SELECT STATEMENT  |	      |     1 |    17 |     5	(0)| 00:00:01 |
    |   1 |  SORT AGGREGATE   |	      |     1 |    17 | 	   |	      |
    |*  2 |   INDEX RANGE SCAN| P800_IDX2 |   874 | 14858 |     5	(0)| 00:00:01 |
    -------------------------------------------------------------------------------
    
    Predicate Information (identified by operation id):
    ---------------------------------------------------
    
       2 - access("OWNER"='SCOTT')
    
    Note
    -----
       - dynamic sampling used for this statement (level=2)
    
    已选择18行。
    
  • 相关阅读:
    html5 保存图片到服务器本地
    html5 canvas分层
    webstorm配置scss自动编译路径
    微信开发测试号配置
    html5手机网站需要加的那些meta/link标签,html5 meta全解
    css去掉iPhone、iPad默认按钮样式
    如何激活webstorm 11
    min-height在安卓下不起作用
    基于字符串模式的路由路径的一些示例。
    nodeJS搭建本地服务器
  • 原文地址:https://www.cnblogs.com/hzcya1995/p/13348755.html
Copyright © 2020-2023  润新知