Title: Re: index ??

What is the selectivity of column A? How many distinct values? Is A
nullable? How many rows and blocks in the table and what are the nr of leaf
blocks and the clustering factors of the indexes?


At 09:08 AM 3/31/2003 -0800, you wrote:

>I have a table X with unix index on column A ,B and non unique index on
>A,C,D  . The query give below doesn't use any index .
>
>I thought its due to  function nvl being used here , so made a change in
>query to  replace
>
>B = NVL(:b2,B)  with   (B=:b2 or :b2 is null  ) , but this one also not
>using index . Why if I put an or condition it doesn't use index while if I
>put and condition it will used ?
>
>IS there any way I can change query or index so that it starts using index
>( in a better way )
>
>
>
>Thanks,
>
>-ak
>
>
>
>
>
>
>
>SELECT   z
>
>FROM
>
>X
>
>WHERE
>
>A = :b1 AND
>
>B = NVL(:b2,B) AND
>
>C= nvl(:b3,C) And
>
>D=nvl(:b4,D)
>
>
>
>
>
>

Wolfgang Breitling
Centrex Consulting Corporation
http://www.centrexcc.com


                         ********************

This email communication is intended as a private communication for the sole use of the primary addressee and those individuals listed for copies in the original message. The information contained in this email is private and confidential and if you are not an intended recipient you are hereby notified that copying, forwarding or other dissemination or distribution of this communication by any means is prohibited.  If you are not specifically authorized to receive this email and if you believe that you received it in error please notify the original sender immediately.  We honour similar requests relating to the privacy of email communications.

Cette communication par courrier électronique est une communication privée à l'usage exclusif du destinataire principal ainsi que des personnes dont les noms figurent en copie.  Les renseignements contenus dans ce courriel sont confidentiels et si vous n'êtes pas le destinataire prévu, vous êtes avisé, par les présentes que toute reproduction, tout transfert ou toute autre forme de diffusion de cette communication par quelque moyen que ce soit est interdit.  Si vous n'êtes pas spécifiquement autorisé à recevoir ce courriel ou si vous croyez l'avoir reçu par erreur, veuillez en aviser l'expéditeur original immédiatement.  Nous respectons les demandes similaires qui touchent la confidentialité des communications par courrier électronique.

Reply via email to