Re: search in a B+ tree with secondary index

From: Xe Neve <xeneve_at_hotmail.com>
Date: Sun, 28 Apr 2002 16:50:47 -0400
Message-ID: <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,

  1. 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
  2. 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 Sun Apr 28 2002 - 22:50:47 CEST

Original text of this message