Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: Insert Performance question
BULK INSERT example
DECLARE
tCOC_CODCLI DBMS_SQL.NUMBER_TABLE;
tCOC_CTACORR DBMS_SQL.NUMBER_TABLE;
tCUOTAS DBMS_SQL.NUMBER_TABLE;
tCOC_COMISION DBMS_SQL.NUMBER_TABLE;
tCOC_COMISION_EXITO DBMS_SQL.NUMBER_TABLE;
BEGIN SELECT CUF_CODCLI, CUF_CTACORR, NVL(( CUF_DBCUO - CUF_CRCUO ),0 ) CUOTAS BULK COLLECT INTO tCOC_CODCLI, tCOC_CTACORR, tCUOTAS FROM CUENTASF WHERE NOT NVL(( CUF_DBCUO - CUF_CRCUO ),0 )=0; FOR i IN 1..tCOC_CTACORR.count LOOP
tCOC_COMISION_EXITO(i) := ROUND( nPeso * nParComisionExito, 2 );
END LOOP;
FORALL I IN 1..tCOC_CTACORR.count
INSERT INTO FON.COMCLI_RW
( COC_CODCLI, COC_CTACORR, COC_FECHA, COC_COMISION, COC_DSC,
COC_COMISION_EXITO )
VALUES
( tCOC_CODCLI(i), tCOC_CTACORR(i), dFecha, tCOC_COMISION(i), cDs,
tCOC_COMISION_EXITO(i) )
;
Juan Carlos Reyes Pacheco
OCP
-------Original Message-------
From: oracle-l_at_freelists.org
Date: 07/27/04 17:02:47
To: oracle-l_at_freelists.org
Subject: RE: Insert Performance question
Juan,
0) already increased 1) nope we are using sql laoder to insert into 2nd table 3) we can't do this since other users might be reading using indexes inreal application mode
Thanks
--Harvinder
-----Original Message-----
From: oracle-l-bounce_at_freelists.org
[mailto:oracle-l-bounce_at_freelists.org] On Behalf Of Juan Carlos Reyes
Pacheco
Sent: Tuesday, July 27, 2004 3:50 PM
To: oracle-l_at_freelists.org
Subject: Re: Insert Performance question
Hi, Harvinder some ideas
0) incrase your table size to amount required. 1) could you use sql loader instad of insert? 2) if not try append and set to nologging mode and do a full backupafter.
-- Archives are at http://www.freelists.org/archives/oracle-l/ FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html ----------------------------------------------------------------- ---------------------------------------------------------------- Please see the official ORACLE-L FAQ: http://www.orafaq.com ---------------------------------------------------------------- To unsubscribe send email to: oracle-l-request_at_freelists.org put 'unsubscribe' in the subject line. -- Archives are at http://www.freelists.org/archives/oracle-l/ FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html ----------------------------------------------------------------- ---------------------------------------------------------------- Please see the official ORACLE-L FAQ: http://www.orafaq.com ---------------------------------------------------------------- To unsubscribe send email to: oracle-l-request_at_freelists.org put 'unsubscribe' in the subject line. -- Archives are at http://www.freelists.org/archives/oracle-l/ FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html ----------------------------------------------------------------- ---------------------------------------------------------------- Please see the official ORACLE-L FAQ: http://www.orafaq.com ---------------------------------------------------------------- To unsubscribe send email to: oracle-l-request_at_freelists.org put 'unsubscribe' in the subject line. -- Archives are at http://www.freelists.org/archives/oracle-l/ FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html -----------------------------------------------------------------Received on Tue Jul 27 2004 - 16:09:24 CDT