472,096 Members | 1,329 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,096 software developers and data experts.

lots of time taking when inserting 1000 records


Hi..
I'm facing a problem during inserting records in Mysql database. My
table consists of 9 fields. When i try to insert 1000 records to this
table using for loop it takes a lot of time.. nearly 5 mins. How can i
reduce this time?? Can u plz help me to reduce this insertion time...

Thanks in advance
Kokul
--
kokul_k
------------------------------------------------------------------------
kokul_k's Profile: http://www.dbtalk.net/m572
View this thread: http://www.dbtalk.net/t321618

Jul 26 '06 #1
2 4038
kokul_k wrote:
Hi..
I'm facing a problem during inserting records in Mysql database. My
table consists of 9 fields. When i try to insert 1000 records to this
table using for loop it takes a lot of time.. nearly 5 mins. How can i
reduce this time?? Can u plz help me to reduce this insertion time...
Insert multiple items with single query:
insert into tablename(id,name) values(1,'Jack'),(2,'Jill'),(3,'Bob');
Jul 26 '06 #2
kokul_k ha scritto:
I'm facing a problem during inserting records in Mysql database. My
table consists of 9 fields. When i try to insert 1000 records to this
table using for loop it takes a lot of time.. nearly 5 mins. How can i
reduce this time?? Can u plz help me to reduce this insertion time...
You can read this page from mysql.org http://tinyurl.com/bjyl9 that
have some methods for optimizing the performance of insert statement.

Jul 27 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

9 posts views Thread by Frank Millman | last post: by
10 posts views Thread by AlexS | last post: by
4 posts views Thread by djc | last post: by
4 posts views Thread by Michel Esber | last post: by
1 post views Thread by Hennie7863 | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.