Tablescans in Oracle 8 start with 4 current gets (db block gets) on the segment header block - in Oracle 9 tablescans start with 2 consistent gets on the segment header.
I can't tell you why you have 12 current gets rather than 4 - but if the tests aren't identical, the physical reads and extra current gets may be related to delayed cleanout on a first read. Regards Jonathan Lewis http://www.jlcomp.demon.co.uk Coming soon a new one-day tutorial: Cost Based Optimisation (see http://www.jlcomp.demon.co.uk/tutorial.html ) Next Seminar dates: (see http://www.jlcomp.demon.co.uk/seminar.html ) ____England______January 21/23 ____USA_(CA, TX)_August The Co-operative Oracle Users' FAQ http://www.jlcomp.demon.co.uk/faq/ind_faq.html -----Original Message----- To: Multiple recipients of list ORACLE-L <[EMAIL PROTECTED]> Date: 22 January 2003 07:42 >Hi, dba friends: > > Look at the following test result, the first one is from oracle9.2, and the second is from the oracle 817. The table is same, and as you see, the execution path is the same. > But there is difference in statistics: db_block_gets, in oracle92, it is 0, and in oracle817, it is not. > And i noticed that in oracle8i, all sql that does only query with execution path full scan of table/index,there will always be db_block_gets, while in 9i, select won't make db_block_gets. > As tom said, db_block_gets is increased when data is accessed for update, how does this query generate this statistics? > > >ORA92> select count(*) from abc; > > COUNT(*) >---------- > 10000 > >Execution Plan >---------------------------------------------------------- > 0 SELECT STATEMENT Optimizer=CHOOSE (Cost=6 Card=1) > 1 0 SORT (AGGREGATE) > 2 1 TABLE ACCESS (FULL) OF 'ABC' (Cost=6 Card=10000) > >Statistics >---------------------------------------------------------- > 0 recursive calls > 0 db block gets > 27 consistent gets > 0 physical reads > 0 redo size > 379 bytes sent via SQL*Net to client > 503 bytes received via SQL*Net from client > 2 SQL*Net roundtrips to/from client > 0 sorts (memory) > 0 sorts (disk) > 1 rows processed > >ORA817> select count(*) from abc; > > COUNT(*) >---------- > 10000 > >Elapsed: 00:00:00.26 > >Execution Plan >---------------------------------------------------------- > 0 SELECT STATEMENT Optimizer=CHOOSE > 1 0 SORT (AGGREGATE) > 2 1 TABLE ACCESS (FULL) OF 'ABC' > >Statistics >---------------------------------------------------------- > 0 recursive calls > 12 db block gets > 28 consistent gets > 24 physical reads > 0 redo size > 367 bytes sent via SQL*Net to client > 425 bytes received via SQL*Net from client > 2 SQL*Net roundtrips to/from client > 0 sorts (memory) > 0 sorts (disk) > 1 rows processed > > >Regards >zhu chao >msn:[EMAIL PROTECTED] >www.happyit.net >www.cnoug.org(China Oracle User Group) > -- Please see the official ORACLE-L FAQ: http://www.orafaq.net -- Author: Jonathan Lewis INET: [EMAIL PROTECTED] Fat City Network Services -- 858-538-5051 http://www.fatcity.com San Diego, California -- Mailing list and web hosting services --------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).
