Message-Id: <10674.121443@fatcity.com> From: "Koivu, Lisa" Date: Wed, 8 Nov 2000 12:14:46 -0500 Subject: RE: Performance tuning This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. ------_=_NextPart_001_01C049A7.680DB50E Content-Type: text/plain; charset="iso-8859-1" Markus, you need to send the list your explain plan in order for anyone to suggest any changes/hints. Lisa -----Original Message----- From: Marcos.Vera@msconsultores.com.pe [mailto:Marcos.Vera@msconsultores.com.pe] Sent: Wednesday, November 08, 2000 11:17 AM To: Multiple recipients of list ORACLE-L Subject: RE: Performance tuning hi gurus ....sorry im trying to optimize this query ... unfortunately it takes nearly 20 seconds .....(it's a lot) ... recpla --> 800000 records Suplot --> 100000 records ... SELECT PLA_FOL_LOT, PLA_FOL_PLA,PLA_PER_DEV_REM,PLA_IDE_EMP,PLA_FEC_CAJ,PLA_TOT_OBL_INF, PLA_TOT_VOL_INF,PLA_TOT_APO_EMP_INF, PLA_TOT_APO_SEG_INF,PLA_TOT_COM_POR_INF, PLA_PER_DEV_REM,decode(lot_num_pro,'140','AC','PN') status ,PLA_IND_TIP_PLA FROM RECPLA, Suplot WHERE PLA_IDE_EMP ='10004918' and Pla_fol_lot = lot_fol_lot and (lot_tip_lot = '12' or lot_tip_lot = '13') union all SELECT pla_fol_lot, PLA_FOL_PLA,PLA_PER_DEV_REM,PLA_IDE_EMP,PLA_FEC_CAJ,PLA_TOT_OBL_INF, PLA_TOT_VOL_INF,PLA_TOT_APO_EMP_INF, PLA_TOT_APO_SEG_INF,PLA_TOT_COM_POR_INF, PLA_PER_DEV_REM,decode(pla_fol_lot,'0','PN','AC') status ,PLA_IND_TIP_PLA FROM RECPLA WHERE PLA_IDE_EMP ='10004918' and ( Pla_fol_lot = '0' OR Pla_fol_lot not in (select lot_fol_lot from suplot where (lot_tip_lot = '12' or lot_tip_lot = '13') ) ); sorry about english .... Markus ... -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: INET: Marcos.Vera@msconsultores.com.pe Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 San Diego, California -- Public Internet access / Mailing Lists -------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru@fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). ------_=_NextPart_001_01C049A7.680DB50E Content-Type: text/html; charset="iso-8859-1" RE: Performance tuning

Markus, you need to send the list your explain plan in order for anyone to suggest any changes/hints.

Lisa

-----Original Message-----
From: Marcos.Vera@msconsultores.com.pe
[mailto:Marcos.Vera@msconsultores.com.pe]
Sent: Wednesday, November 08, 2000 11:17 AM
To: Multiple recipients of list ORACLE-L
Subject: RE: Performance tuning






hi gurus ....sorry im trying to optimize this query ...
unfortunately it takes nearly 20 seconds .....(it's a lot) ...
recpla --> 800000 records
Suplot  --> 100000 records ...

SELECT PLA_FOL_LOT,
PLA_FOL_PLA,PLA_PER_DEV_REM,PLA_IDE_EMP,PLA_FEC_CAJ,PLA_TOT_OBL_INF,
PLA_TOT_VOL_INF,PLA_TOT_APO_EMP_INF,
PLA_TOT_APO_SEG_INF,PLA_TOT_COM_POR_INF,
PLA_PER_DEV_REM,decode(lot_num_pro,'140','AC','PN') status ,PLA_IND_TIP_PLA
FROM RECPLA, Suplot
WHERE PLA_IDE_EMP ='10004918'
and Pla_fol_lot = lot_fol_lot
and (lot_tip_lot = '12' or  lot_tip_lot =  '13')
union all
SELECT pla_fol_lot,
PLA_FOL_PLA,PLA_PER_DEV_REM,PLA_IDE_EMP,PLA_FEC_CAJ,PLA_TOT_OBL_INF,
PLA_TOT_VOL_INF,PLA_TOT_APO_EMP_INF,
PLA_TOT_APO_SEG_INF,PLA_TOT_COM_POR_INF,
PLA_PER_DEV_REM,decode(pla_fol_lot,'0','PN','AC') status ,PLA_IND_TIP_PLA
FROM RECPLA
WHERE PLA_IDE_EMP ='10004918'
and ( Pla_fol_lot = '0' OR
      Pla_fol_lot not in (select lot_fol_lot from suplot where (lot_tip_lot =
'12' or  lot_tip_lot =  '13') )
     );

sorry about english ....

Markus ...


--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author:
  INET: Marcos.Vera@msconsultores.com.pe

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru@fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).