Newsgroups: comp.databases.oracle.misc
From: Charles Hooper <hooperc2...@yahoo.com>
Date: Wed, 04 Jul 2007 09:04:56 -0700
Local: Wed, Jul 4 2007 12:04 pm
Subject: Re: NOT IN
On Jul 4, 10:27 am, colmkav <colmj...@yahoo.co.uk> wrote:
> On 4 Jul, 15:26, Charles Hooper <hooperc2...@yahoo.com> wrote: The NOT IN syntax can be very inefficient. On Oracle 8.1.7.3, the NOT > > On Jul 4, 8:47 am, colmkav <colmj...@yahoo.co.uk> wrote: > > > is it possible to write an SQL Oracle query where you want to check > > > eg I tried the following but got an error: > > > select count(*) from tmp_risk_sum where book, strategy, exposuretypeid > > SELECT > > You may find that this syntax executes more efficiently: > > Charles Hooper > Why does this work? Surely you would need a similar SO.STRATEGY IS > Also why does this execute better IN syntax for a particular SQL statement may require 5 minutes to execute, while the outer join syntax (the second approach that I provided) might execute in 15 seconds or less. Newer releases of Oracle may automatically perform the transformation from the NOT IN syntax to the outer join syntax - with the likely requirement that the columns be defined as NOT NULL. Why is the outer join typically more efficient? Assume that Oracle Why is it that we only need to specify that SO.BOOK IS NULL and not Just for the sake of curiosity, please post the output of the DBMS Charles Hooper You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||