[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference orarep::nomahs::rdb_60

Title:Oracle Rdb - Still a strategic database for DEC on Alpha AXP!
Notice:RDB_60 is archived, please use RDB_70..
Moderator:NOVA::SMITHISON
Created:Fri Mar 18 1994
Last Modified:Fri May 30 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:5118
Total number of notes:28246

5111.0. "Completely STUPID index question :-)." by M5::LWILCOX (Chocolate in January!!) Wed Mar 05 1997 16:52

OK, I know this is "indexing 101" but I seem to either have a complete mental
block or simply no mental capability at all right now.  So, laugh, giggle,
and humiliate me if you will, but please answer my question.

Customer has an index, C1, C2, C3, C4, C5 defined on columns 1-5 of his
table.  He does a nymber of selects, varying the WHERE  and sees the
following strategies:

SELECT C1, C2, C3,  FROM TABLE WHERE C1=XX C3=XX  C4=XX
Strategy is INDEXED ONLY RETRIEVAL...[1:1]

SELECT C1, C2, C3 FROM TABLE WHERE C1=XX C2=XX C3=XX 
Strategy is INDEXED ONLY RETRIEVAL...[2:2]

SELECT C1, C2, C3 FROM TABLE WHERE C1=XX C2=CC C3=XX C4=XX
Strategy is INDEXED ONLY RETRIEVAL...[4:4]

SELECT C1, C2, C3 FROM TABLE WHERE C1=XX C2=XX C4=XX
Strategy is INDEXED ONLY RETRIEVAL...[2:2]


Now, I know that the numbers inside the [] represent the low ikey and high
ikey, but what does "low ikey" and "high ikey" mean?  I know, for example,
that if we were doing a WHERE something < or something > we might see a
[0:1] or [1:0] meaning that there is one bound, but not another bound.
But I've completely forgotten what the numbers other than 1 or 0 mean and
how, if at all, those might relate to the number of segments in the index
or the number of index segments used in the query.

So, after you stop rolling on the floor and wipe the tears from your eyes,
please explain.

Thanks so much.

Liz (the sinus infection has REALLY gotten to me!)
T.RTitleUserPersonal
Name
DateLines
5111.1M5::JHAYTERWed Mar 05 1997 17:4419
>SELECT C1, C2, C3 FROM TABLE WHERE C1=XX C2=XX C3=XX 
>Strategy is INDEXED ONLY RETRIEVAL...[2:2]

i would have expected 3:3, but anyway...

[n:m]

explains how many columns (segments) is used from the index to satify the
query.  This number always represents an unbroken sequence of columns
from the index definition counted from the first column of the index.

n shows the optimizer is using <n> segments for a starting point
m shows the optimizer is using <m> segments for an ending point

all queries only using the "=" will always return the same number of
segments for low and high value.

want a copy of the optimizer guide?
5111.2NOVA::SMITHIDon&#039;t understate or underestimate Rdb!Wed Mar 05 1997 20:175
When you perform an EQUALITY we always set the high ikey = low ikey.  i.e. it
represents a very small range of values.  Thus you
get the same number on both sides of the ":".

Ian
5111.3... holding his fingures this far apart ...svrav1.au.oracle.com::MBRADLEYI was dropped on my head as a baby. What&#039;s your excuse?Wed Mar 05 1997 21:4510
>When you perform an EQUALITY we always set the high ikey = low ikey.  i.e. it
>represents a very small range of values.  Thus you
            ^^^^^^^^^^^^^^^^^^
>get the same number on both sides of the ":".

Is this like 2+2=5 ... for very large values of 2 ?

G'day,

Mark.
5111.4Thank youM5::LWILCOXChocolate in January!!Thu Mar 06 1997 08:153
Thank you all so very much for the answers and for not laughing toooooo loud!

Liz