Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Where question
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