分类:
2008-10-28 17:46:01
9206:
SQL> set autot on
SQL> select count(*)
2 from dept d, emp e
3 where d.deptno = e.deptno;
COUNT(*)
----------
12
Execution Plan
----------------------------------------------------------
0 SELECT STATEMENT Optimizer=CHOOSE
1 0 SORT (AGGREGATE)
2 1 NESTED LOOPS
3 2 TABLE ACCESS (FULL) OF 'EMP'
4 2 INDEX (UNIQUE SCAN) OF 'PK_DEPT' (UNIQUE)
10202
SQL> set autot on
SQL> select count(*)
2 from dept d, emp e
3 where d.deptno = e.deptno;
COUNT(*)
----------
12
ִѐ¼ƻ®
----------------------------------------------------------
Plan hash value: 2083865914
--------------------------------------------------------------------------
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
--------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | 1 | 13 | 3 (0)| 00:00:01 |
| 1 | SORT AGGREGATE | | 1 | 13 | | |
|* 2 | TABLE ACCESS FULL| EMP | 12 | 156 | 3 (0)| 00:00:01 |
--------------------------------------------------------------------------
Predicate Information (identified by operation id):
---------------------------------------------------
2 - filter("E"."DEPTNO" IS NOT NULL)