Home » SQL & PL/SQL » SQL & PL/SQL » Insert statements (Oracle 11g)
Insert statements [message #609828] Wed, 12 March 2014 15:56 Go to next message
srinivas.k2005
Messages: 404
Registered: August 2006
Senior Member

Hi,

I have a scenario here.
. I have 4 insert statements inside an anonymous block. Order of execution of insert statements as below.

1. Insert into tablea select column_names from table1
2. Insert into tablea select column_names from table2
3. Insert into tablea select column_names from table3
4. Insert into tablea select column_names from table4
5. commit


If execute the anonymous block, it is taking more than 6 hours to execute.
But if I execute each select statements one by one, each select statement is taking maximum of 10 minutes to execute.

Is this due to memory issue?? What is the cause of the issue?? Please advise.

Please also note that the maximum records returned by each query is 10.

Regards,
SRK



Re: Insert statements [message #609832 is a reply to message #609828] Wed, 12 March 2014 17:36 Go to previous messageGo to next message
srinivas.k2005
Messages: 404
Registered: August 2006
Senior Member

Any suggestions Help please....


Regards,
SRK
Re: Insert statements [message #609833 is a reply to message #609832] Wed, 12 March 2014 19:20 Go to previous messageGo to next message
cookiemonster
Messages: 13920
Registered: September 2008
Location: Rainy Manchester
Senior Member
trace the session to see where the time is being spent.
Re: Insert statements [message #610808 is a reply to message #609833] Mon, 24 March 2014 09:57 Go to previous messageGo to next message
srinivas.k2005
Messages: 404
Registered: August 2006
Senior Member
Thank you
Re: Insert statements [message #610818 is a reply to message #610808] Mon, 24 March 2014 12:38 Go to previous message
Michel Cadot
Messages: 68647
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

Given your response time I think your queries ones are good. Razz

Previous Topic: generate xls file through pl/sql
Next Topic: Problem in external table
Goto Forum:
  


Current Time: Fri Apr 26 20:48:54 CDT 2024