Data Warehousing Community Forum
February 09, 2012, 01:54:42 pm

Pages: [1]   Go Down
  Print  
Author Topic: insert using select ..... what happens at the backend?  (Read 692 times)
inquisite
DW Fresher
*

Reputation: +3/-0
Offline Offline

Posts: 7


View Profile
« on: March 16, 2010, 09:18:58 pm »

If i want to insert all records from another table I can use the following

INSERT INTO <table_name> <SELECT Statement>;

I would like to know how oracle handles this in the backend. What is the difference between running the above statement and running individual insert statements assuming that there are 100000 records.

By using a single statement does oracle parse the statement only once instead of parsing it 100000 times?

In 10g does oracle automatically do bulk insert by doing INSERT INTO <table_name> <SELECT Statement>Huh

Any inputs are appreciated.
Logged
Allegra
DW Apprentice
**

Reputation: +17/-0
Offline Offline

Posts: 75



View Profile
« Reply #1 on: March 19, 2010, 05:27:16 pm »

Per my knowledge,

"INSERT INTO <table_name> <SELECT Statement>" will not do parse for every single row processing.
Recently for a production fix, inserted 60 million records and just its finished in less than 2 minutes (that too with indexes)

Any DBA's can lighten up more.. and appreciated.. Wink
Logged

@llegr@
what do you call an Ant with an AK47 ?
Pages: [1]   Go Up
  Print  
 
Jump to: