Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> Re: cursor
I would try runing the SELECT part of the statement with some hardcoded values to see how long it takes (maybe it needs an index or some other tuning). If the table you are inserting into is heavily indexed that could slow the process down too. You could try dropping some or all of the indexes and recreating them after the data is inserted.
Sergey
In article <8trfvj$oor$1_at_nnrp1.deja.com>,
daud11_at_hotmail.com wrote:
> Part of my PL/SQL program has the code below and this part is very
slow.
>
> Is there a better way of writing it? Is cursor really slow?
>
> open c1;
> loop
> fetch c1 into rs1;
> exit when c1%notfound;
>
> insert into iq_smt_tmp_assy_partnum_rd
> (col1, col2......)
> select * from a_table where
> condition = rs1.column_name and
> condition2 = rs1.col_name2 etc
> end loop;
> Daud11
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
>
Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Thu Nov 02 2000 - 07:13:10 CST
![]() |
![]() |