Problem in Data insertion [message #601972] |
Thu, 28 November 2013 00:46 |
|
stalin4d
Messages: 226 Registered: May 2010 Location: Chennai, Tamil Nadu, Indi...
|
Senior Member |
|
|
Hi,
I have a query, i m inserting 100 rows into 2 different tables assume t1 and t2 from a base table 'T' through
a procedure, well both the 2 tables t1 and t2 will be deleted before running the procedure, which inserts the datas in just a second.
I am doing the above process for a test only, but the actual thing is both t1 and t2 has more than 12k records,
so when i insert the same 100 rows into both table without deleting the previous 12k records, it just take 1 to 2 mins
to insert, so my question is inserting into empty tables does faster than a table with available records?
pls explain, i hope you can understand my question!
|
|
|
|
Re: Problem in Data insertion [message #601987 is a reply to message #601972] |
Thu, 28 November 2013 02:43 |
Lalit Kumar B
Messages: 3174 Registered: May 2013 Location: World Wide on the Web
|
Senior Member |
|
|
stalin4d wrote on Thu, 28 November 2013 12:16 when i insert the same 100 rows into both table without deleting the previous 12k records, it just take 1 to 2 mins
to insert, so my question is inserting into empty tables does faster than a table with available records?
1 to 2 minutes time just to insert 100 rows? Are you sure? It shouldn't take more than a second or two(or may be couple of seconds), but a minute or two is too much time consumed. Please post what you are doing. Better generate trace as suggested by cookiemonster.
|
|
|
|
Re: Problem in Data insertion [message #601991 is a reply to message #601989] |
Thu, 28 November 2013 03:44 |
|
Littlefoot
Messages: 21818 Registered: June 2005 Location: Croatia, Europe
|
Senior Member Account Moderator |
|
|
stalin4d- t1 and t2 will be deleted before running the procedure
- when i insert the same 100 rows into both table without deleting the previous 12k records, it just take 1 to 2 mins
If these tables will be deleted (when it comes to production, I presume), then why do you test how the procedure behaves when tables aren't empty?
How do you plan to delete these tables? TRUNCATE will probably be faster than DELETE. Note that you'll have to use FORMS_DDL in order to run it (as TRUNCATE is a DDL).
[Updated on: Thu, 28 November 2013 03:45] Report message to a moderator
|
|
|