| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.server -> Re: optimal sql
Christoph,
It partly depends on how big your tables are. It may also depend on Oracle
version.
It is quite easy to test their effectiveness by just doing some testing
yourself.
Just use the autotrace facility:
SQL> set autotrace traceonly explain
and it will supply the execution plan for your queries, without really executing it.
SQL> set autotrace off
disables the facility.
hth,
Peter
"Christoph Seidel" <chris666.seidel_at_gmx.de> schreef in bericht
news:at1uho$vq9ai$1_at_ID-143718.news.dfncis.de...
> Billy Verreynne wrote:
>
> >> how can i find all records by pk in table 1 which are not in table 2
> >
> > I usually use something like:
> >
> > SELECT
> > t1.key1,
> > t1.key2
> > FROM table1 t1
> > MINUS
> > SELECT
> > t2.key1,
> > t2.key2
> > FROM table1 t2
>
> is this more efficient than not in or not exists?
>
> and: this assumes that t1 and t2 have the same fields to select?
>
>
Received on Mon Dec 09 2002 - 06:12:35 CST
![]() |
![]() |