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: Where question

Re: Where question

From: Jeff Hunter <jeffh_at_btitelecom.net>
Date: Wed, 13 Oct 1999 14:32:38 -0400
Message-ID: <3804d093@defiant.btitelecom.net>


The only guaranteed way to make sure you are using an index is to use an = explain plan. However, you should access an index in the order the = index has been built. In your example, empl_id and then salary.

    Mario Yepes wrote in message <3804A345.89870870_at_hotmail.com>...     Hi !!
    I have an idiot question, suppose that I have a table with these = fields:

    empl_id, name, address, zipcode, salary

    And an index by empl_id, salary

    How I should use the where clause to "take or use" that index

    where empl_id = 'xxx'

       and salary > 10000;

    or

    where salary > 10000;

       and empl_id = 'xxx';

    Regards,
    Diego Received on Wed Oct 13 1999 - 13:32:38 CDT

Original text of this message

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