DBAsupport.com Forums - Powered by vBulletin
Results 1 to 2 of 2

Thread: why OEM recommended

  1. #1
    Join Date
    Mar 2006
    Posts
    176

    why OEM recommended

    I have the below query:

    SELECT * FROM TEST
    WHERE OBJECT_ID = :B2 AND :B1 >= DAYTIME AND :B1 < NVL(END_DATE,:B1 +1)



    so when I run SQL tuning advisor, below is what OEM found:

    The predicate NVL("TEST"."END_DATE",:B1+1)>:B2 used at line ID 1 of the execution plan contains an expression on indexed column "END_DATE". This expression prevents the optimizer from efficiently using indices on table "BLAH"."TEST".



    question is

    1. how OEM picked NVL("TEST"."END_DATE",:B1+1)>:B2
    2. what does OEM really recommend to improve the query?

    thx

  2. #2
    Join Date
    May 2002
    Posts
    2,645
    It's your query, you tell us what you're trying to do.

    Like it said, you are applying a function against an indexed column. If you want the use of an index, don't apply a function against it.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width