Insert into table slows down query [message #476426] |
Thu, 23 September 2010 04:40 |
dev_777
Messages: 32 Registered: June 2010
|
Member |
|
|
When i run a script that does a select from a single table (table has 33521868 records)the query is executed in about .094 seconds. I use the exact same query to insert into a temporary table and the query takes 10 minutes and more.
What should I be doing to speed up this process. Also tried using hints and it does not speed up the insert.
Thanks
|
|
|
|
Re: Insert into table slows down query [message #476734 is a reply to message #476427] |
Fri, 24 September 2010 18:07 |
rleishman
Messages: 3728 Registered: October 2005 Location: Melbourne, Australia
|
Senior Member |
|
|
Didn't any alarm bells go off when Oracle "returned" 34M rows in less than one-tenth of a second?
Roachcoach has it right; you have only SELECTed the FIRST PAGE of rows, not all of them. When you run the INSERT, it does not return until every single row is processed.
Ross Leishman
|
|
|
|