Bulk insert dummy data into table [message #598144] |
Thu, 10 October 2013 11:55 |
debasisp
Messages: 10 Registered: February 2010 Location: BANGALORE,INDIA
|
Junior Member |
|
|
I have a table emp as mentioned below:
SELECT * FROM EMP_TEST;
EMP_TEST
-----------------------------------------------------
ENO EFIRSTNAME ESECONDNAME DEPTNO
1 JOHN PAI 10
2 ABC DEF 20
3 EFG GHI 30
Now the primary key in this above table is pk_emp_test_eno on eno.
I have a requirement where i need to dump some dummy data (600000000 numbers of data ) into the emp_test based on these existing data without disabling the constraints (maintaining unique constraint for each record). And while inserting i want to commit after every 1000 insertion.
Could you please help me in bulk inserting dummy datas into the table as it is taking much more time to insert into the same.
Regards,
Striker
|
|
|
Re: Bulk insert dummy data into table [message #598146 is a reply to message #598144] |
Thu, 10 October 2013 12:00 |
|
BlackSwan
Messages: 26766 Registered: January 2009 Location: SoCal
|
Senior Member |
|
|
never do in PL?SQL that which can be done in plain SQL
why not just CREATE VIEW?
Why is any new table needed?
>And while inserting i want to commit after every 1000 insertion.
Above only make whole process SLOWER & increases the probability that ORA-01555 Snapshot Too Old error gets thrown
[Updated on: Thu, 10 October 2013 12:00] Report message to a moderator
|
|
|
Re: Bulk insert dummy data into table [message #598147 is a reply to message #598146] |
Thu, 10 October 2013 12:07 |
debasisp
Messages: 10 Registered: February 2010 Location: BANGALORE,INDIA
|
Junior Member |
|
|
I dont want to create any view on my table. I want to insert dummy data on the existing table. Actually it is required to gather statistics for the same table. That is why we need to insert (6000000000) data into a table which is having just 1000 of records. This is only required to gather statistic. I used for loop to insert into the same but its taking lot of time.
Could you please guide?
Many thanks
|
|
|
|
|
|