Re: search in a B+ tree with secondary index

From: Jim Kennedy <kennedy-family_at_attbi.com>
Date: Sun, 28 Apr 2002 23:20:48 GMT
Message-ID: <kt%y8.156084$G72.87344_at_sccrnsc01>


Not sure how one would estimate the time. Many factors involved. Index might be cached in memory,
Cardinality of the values
speed of disk(s).
speed of ram
speed of CPU
is the data cached
is the index compressed
is the statement already parsed if not hard or soft parse CBO or rule optimizer
etc.

Jim

"Xe Neve" <xeneve_at_hotmail.com> wrote in message news:YgZy8.1679$sh6.298279_at_news20.bellglobal.com...
> Thanks for taking time to answer.
>
> I also need to estimate the time of execution of the query. In this case,
 i
> guess a search will be performed in the index to find a node with
 command=10
> and then read the pointed record in the table. Then, to read all other
> records with command=10,
>
> a) do i assume they are linked one after the other in the index. So they
> will be scanned with prefix recursion until command!=10 or
>
> b) all the index will be scanned to find all records with command=10 ?
>
> X.
>
>
> "Jim Kennedy" <kennedy-family_at_attbi.com> wrote in message
> news:KIYy8.165977$CH1.121988_at_sccrnsc02...
> > Yes, the index will be used if the optimizer thinks it is efficient to
 use.
> > Yes, in a multi column index the leading columns can be searched on.
> > Jim
> > "Xe Neve" <xeneve_at_hotmail.com> wrote in message
> > news:%dYy8.1613$sh6.263655_at_news20.bellglobal.com...
> > > I cannot find the answer in the Oracle documentation (http://
> > >
> >
>
 download-west.oracle.com/otndoc/oracle9i/901_doc/server.901/a88856/c11schem.
> > > htm#3239) or in a search with google. And this must be easy to solve
 for
> > > most of you experts.
> > >
> > > I need to do an applet that make some SQL queries to a Oracle db. One
 of
> > > them is to query an indexed table. It is a secondary index and the key
 is
 on
> > > multiples columns: {command, article}. I guess the index was created
 with
> > > something like:
> > >
> > > create index i on commands(command, article);
> > >
> > > I need to do a query of the form:
> > >
> > > select * from commands where command = 10;
> > >
> > > And i need to know if the index will be internally used to perform the
 query
> > > or all the table will be scanned. In other words, is it possible to
 use
 a
> > > single column to perform a search in a multiple columns index?
> > >
> > > Thanks, X.
> > >
> > >
> > >
> > >
> >
> >
>
>
>
>
Received on Mon Apr 29 2002 - 01:20:48 CEST

Original text of this message