Microsoft Windows [版本 6.1.7601] 版权所有 (c) 2009 Microsoft Corporation。保留所有权利。 C:Userszhangzheng2>sqlplus FWMS4SZ_DEV_MAIN_DDL/FWMS4SZ_DEV_MAIN_DDL@ORCL_10.10.21.48 SQL*Plus: Release 10.2.0.3.0 - Production on 星期四 10月 31 10:46:53 2013 Copyright (c) 1982, 2006, Oracle. All Rights Reserved. 连接到: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production With the Partitioning, OLAP and Data Mining options SQL> set serveroutput on size 100000 SQL> spool c:/explain_plan.txt SQL> set linesize 300 SQL> set timing on SQL> set autotrace traceonly SQL> SELECT RELATION_ID, 2 PARENT_ID, 3 X_OR_Y_AXIS, 4 A.DIMENSIONALITY_CODE, 5 B.DIMENSIONALITY_NAME, 6 A.DIMENSIONALITY_ID, 7 TABLE_NAME, 8 COLSPAN, 9 ROWSPAN, 10 PROJECT_NO, 11 PROJECT_ID 12 FROM PROD_PROJECT_DIMENSIONALITY A, PROD_DIMENSIONALITY_MEASURE B 13 WHERE A.DIMENSIONALITY_CODE = B.DIMENSIONALITY_CODE 14 AND PROJECT_NO = 'P0020' 15 ORDER BY TO_NUMBER(RELATION_ID) ASC 16 / 已选择10行。 已用时间: 00: 00: 00.13 执行计划 ---------------------------------------------------------- Plan hash value: 3661685015 --------------------------------------------------------------------------------------------------- | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time | --------------------------------------------------------------------------------------------------- | 0 | SELECT STATEMENT | | 10 | 700 | 11 (19)| 00:00:01 | | 1 | SORT ORDER BY | | 10 | 700 | 11 (19)| 00:00:01 | |* 2 | HASH JOIN | | 10 | 700 | 10 (10)| 00:00:01 | |* 3 | TABLE ACCESS FULL| PROD_PROJECT_DIMENSIONALITY | 10 | 540 | 6 (0)| 00:00:01 | | 4 | TABLE ACCESS FULL| PROD_DIMENSIONALITY_MEASURE | 680 | 10880 | 3 (0)| 00:00:01 | --------------------------------------------------------------------------------------------------- Predicate Information (identified by operation id): --------------------------------------------------- 2 - access("A"."DIMENSIONALITY_CODE"="B"."DIMENSIONALITY_CODE") 3 - filter("PROJECT_NO"='P0020') 统计信息 ---------------------------------------------------------- 1 recursive calls 0 db block gets 30 consistent gets 0 physical reads 0 redo size 1295 bytes sent via SQL*Net to client 350 bytes received via SQL*Net from client 2 SQL*Net roundtrips to/from client 1 sorts (memory) 0 sorts (disk) 10 rows processed SQL> spool off;