Tuning Issue Urgent [message #60926] |
Sun, 14 March 2004 18:45 |
ora
Messages: 47 Registered: June 2002
|
Member |
|
|
Hi,
I have a query which is needed to run monthly, which pick all the relevant information about all the available policies from different tables and dump all the records into a table for further processing.
The problem is, there are about 6,00,000 policies in the database, and fetching this number of records and dumping the same in a table is really...
Now i want to know the best approach to do this. At query level it is properly tuned. now the question is should i use a single query e.g. insert into select ... or should i go for a cursor and issue commit after some number of records? Along with all that also suggest me about how to reduce the total time taken by the query.
|
|
|
Re: Tuning Issue Urgent [message #60984 is a reply to message #60926] |
Thu, 18 March 2004 00:13 |
IA
Messages: 91 Registered: March 2004
|
Member |
|
|
Hi,
I suggest writing a PL/SQL program using the FORALL BULK collect/insert statements. This avoids switching between SQL and PL/SQL engine, thus improving performance dramatically.
Cheers ... IA
|
|
|