Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Possible Performance Improvement to Select Statement

Re: Possible Performance Improvement to Select Statement

From: Thorsten Jens <thojens_at_gmx.de>
Date: 3 Feb 2005 02:25:14 -0800
Message-ID: <1107426314.779296.101580@o13g2000cwo.googlegroups.com>


Paul Izzo wrote:

>
> select distinct pkvk.CUST_JOB_NR
> from pkvk,pkvp

^^^^^^^^^^^^^^^^

Why join when you only need data from one table?

> where pkvk.JOB_STATUS != 9
> and pkvp.CUST_JOB_NR = pkvk.CUST_JOB_NR
> and pkvp.CUST_JOB_TYPE = pkvk.CUST_JOB_TYPE
> and pkvk.CUST_JOB_NR
>
> not in (select distinct pkvk.CUST_JOB_NR
> from pkvp,pkvk
> where pkvk.JOB_STATUS != 9
> and pkvp.CUST_JOB_NR = pkvk.CUST_JOB_NR
> and pkvp.CUST_JOB_TYPE = pkvk.CUST_JOB_TYPE
> and pkvp.POSITIONS_STATUS != 9)

Thorsten Received on Thu Feb 03 2005 - 04:25:14 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US