Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

indexing 'is null' in where clause

Uday_NJan 29 2020 — edited Jan 30 2020

Hi All,

          I have a table sales. I need to fetch active customers based on expiry date .

My query  is

select active_cust from sales where exp_date is null .

Here active customers are taken based on expiry date is null. If we use is null condition in where clause will it affect its search as my understanding is null is an unknown value and oracle needs to scan entire table. Is there any way to avoid this 'is null' condition ? shall I use functional index on 'is null ' condition  .please kind your advice.

Regards,

Uday

Comments
Post Details
Added on Jan 29 2020
7 comments
856 views