Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: question about indexes

Re: question about indexes

From: Connor McDonald <connor_mcdonald_at_yahoo.com>
Date: Mon, 19 Jul 1999 22:19:20 +0800
Message-ID: <379333E8.6665@yahoo.com>


Ty O'Kelly wrote:
>
> hello all,
>
> i have a question about how indexes work. lets say i have a table
> called transaction with fields:
>
> transaction (primary key)
> costctr
> chart
> account
> subacct
> amount
>
> there is already an index called transactioni1 created on the following
> columns (it is a foreign key):
>
> costctr
> chart
> account
> subacct
>
> my question is this: if i do a select on costctr and account will oracle
> make use of the existing index or should i create a new index made up of
> the two columns being queried on?
>
> thanks for the help.
>
> ty
>
> --
> Ty O'Kelly
> tokelly_at_openplus.com

Oracle can use leading columns in index selection, so it may choose to take advantage of the costctr (dependent on its cardinality)...

HTH
--



Connor McDonald
"These views mine, no-one elses etc etc" connor_mcdonald_at_yahoo.com

"Some days you're the pigeon, and some days you're the statue." Received on Mon Jul 19 1999 - 09:19:20 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US