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: optimizer AND_EQUAL problem

Re: optimizer AND_EQUAL problem

From: John P. Higgins <jh33378_at_deere.com>
Date: Sat, 30 Jan 1999 15:07:46 -0600
Message-ID: <36B374A2.6EEA81DD@deere.com>


I believe the AND-EQUAL method can only be used when you ask for an exact match on each of the keys.

Leon Rzhemovskiy wrote:

> I have table "customer". (200 000 MB)
> 2 single indexes (last_name and first_name)
>
> Select statement:
>
> select /*+ AND_EQUAL (customer cust_last cust_first) */
> count(*)
> from CUSTOMER
> where LASTNAME like 'J%'
> and FIRSTNAME like 'M%'
>
> Result:
>
> Explain statement
> - select statement
> - sort aggregate
> - table access by index rowid customer
> Index range scan cust_first
>
> HOW to MAKE IT LIKE:
>
> - select statement
> - sort aggregate
> - and-equal
> index range scan cust_first
> index range scan cust_last
>
> Thanks
> Leon
> lrzhemov_at_home.com
Received on Sat Jan 30 1999 - 15:07:46 CST

Original text of this message

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