* 2008/06/25 星期三
*蒙昭良
*环境:WindowsXP + Oracle10gR2
*SQL的执行计划
*/
SQL> select count(*) from test;
COUNT(*)
----------
51470
SQL> set timing on
SQL> select count(*) from test;
COUNT(*)
----------
51470
已用时间: 00: 00: 09.89
SQL> set autotrace on
SQL> select count(*) from test;
COUNT(*)
----------
51470
已用时间: 00: 00: 03.78
执行计划
----------------------------------------------------------
Plan hash value: 1950795681
-------------------------------------------------------------------
| Id | Operation | Name | Rows | Cost (%CPU)| Time |
-------------------------------------------------------------------
| 0 | SELECT STATEMENT | | 1 | 4107 (1)| 00:00:50 |
| 1 | SORT AGGREGATE | | 1 | | |
| 2 | TABLE ACCESS FULL| TEST | 16763 | 4107 (1)| 00:00:50 |
-------------------------------------------------------------------
Note
-----
- dynamic sampling used for this statement
统计信息
----------------------------------------------------------
0 recursive calls
0 db block gets
15098 consistent gets
12361 physical reads
0 redo size
410 bytes sent via SQL*Net to client
385 bytes received via SQL*Net from client
2 SQL*Net roundtrips to/from client
0 sorts (memory)
0 sorts (disk)
1 rows processed
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/12778571/viewspace-364855/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/12778571/viewspace-364855/