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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Optimising PL/SQL Script. Takes 2 days to run.

Re: Optimising PL/SQL Script. Takes 2 days to run.

From: Hanspeter 'Happl' Oberlin <happl_at_mail.com>
Date: Tue, 21 Jan 2003 16:38:02 +0100
Message-ID: <happl-F06145.16374721012003@chello212017086164.14.vie.surfer.at>


In article <7f966bc5.0301210517.5d3b54ae_at_posting.google.com>,  david_at_fitzg.com (David FitzGerald) wrote:

I would change the following things:

> start_date := '23-Jan-2003';

start_date := to_date('23012003','ddmmyyyy');

> for ctr in 0..6 LOOP
> insert into FORECAST
> values(this_item.item, item.location, start_date+ctr,'0');
> END LOOP;

insert into FORECAST values(..., start_date,'0');
insert into FORECAST values(..., start_date+1,'0');
insert into FORECAST values(..., start_date+2,'0');
insert into FORECAST values(..., start_date+3,'0');
insert into FORECAST values(..., start_date+4,'0');
insert into FORECAST values(..., start_date+5,'0');
insert into FORECAST values(..., start_date+6,'0');


Are indexes created on table FORECAST? if yes, you should drop them before inserting so many rows.

Greetings from Switzerland -- Gruesse aus der Schweiz Happl Received on Tue Jan 21 2003 - 09:38:02 CST

Original text of this message

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