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: Tunning Select and Where statements

Re: Tunning Select and Where statements

From: Neil Cudd <neil_at_cudd.demon.co.uk>
Date: Tue, 28 Sep 1999 13:49:31 +0100
Message-ID: <938523105.3120.0.nnrp-06.c2de6f3d@news.demon.co.uk>

Ming wrote in message <7sq3av$9ap_at_romeo.logica.co.uk>...
>having no index.
>Why would an index on both 'name' and 'age' result in a faster query.
>
>Thanks for any Help
>

If the request can be satisfied *just* by accessing the index (ie all columns selected are held within an index) then the index is all that is accessed, hence faster results.

as for the first point : what's the cardinality of age ? Low I assume, so an index scan could possibly be less efficient than a table scan (dependant on other factors such as the size of the table).

hope this helps,

neil Received on Tue Sep 28 1999 - 07:49:31 CDT

Original text of this message

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