not exists

  • I am optimizing some queries and I noticed they use not exists followed by a select statement in the where clause. Is there a better more efficient way to handle this? I know this is query specific but is not exists something I should avoid?

    THanks,

    Eddie

  • Alot of times NOT EXISTS is used to check if certain schema exists in order to avoid fatal errors when running a script. There isn't really a more efficient way of handling that. If you are trying to optimize code then you can use set showplan_text to analyze the queries to find out where your slowdown is coming from. If this is still causing you grief, then post your code on the board and someone can give you specific pointers.

    DanW

  • Agree with above. Best to try and "rethink" the problem as a positive rather than a negative.

    Steve Jones

    steve@dkranch.net

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply