Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: nonunique index on unique values
<yong321_at_yahoo.com> wrote in message
news:1188730343.566384.216500_at_50g2000hsm.googlegroups.com...
> On Sep 1, 1:20 am, "Jonathan Lewis" <jonat..._at_jlcomp.demon.co.uk> > wrote:
> > > Which version did you test in? I did a simplistic test in 10.2.0.1 > with sqlplus. With a unique index (height=2), no constraint, select * > from t where x=1 (which goes through the index followed by table > access by index rowid), both consistent gets and consistent gets - > examination go up by 3. Changing x=1 to -1 so no row is selected, both > gets are 2. > > With a non-unique index (no constraint), select * from t where x=1 has > 4 consistent gets and 1 consistent gets - examination. Changing 1 to > -1, the stats are 2 and 1 respectively. > > The test result could be different if using a tool other than sqlplus, > because I think it may try one more consistent get when everything is > already fetched. > > I didn't check on which blocks the two stats are about. Did you find > that by looking at x$bh.mode? 3 for consistent gets, 4 for cgets > examination? > > Yong Huang >
10.2.0.3
Where does your information about the mode come from ? (And did you mean the mode_held column)..
Your figures look about right - but I'm not planning to work this one out in detail.
"Consistent gets - examination" are a subset of "consistent gets", and you have height = 2 rather than height = 3, hence the differences.
The gets vs, examinations is logical inference, assisted by x$kcbsw and x$kcbwh.
-- Regards Jonathan Lewis http://jonathanlewis.wordpress.com Author: Cost Based Oracle: Fundamentals http://www.jlcomp.demon.co.uk/cbo_book/ind_book.html The Co-operative Oracle Users' FAQ http://www.jlcomp.demon.co.uk/faq/ind_faq.htmlReceived on Sun Sep 02 2007 - 09:47:06 CDT
![]() |
![]() |