473,395 Members | 1,870 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 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 4136
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: Frank Millman | last post by:
Hi all This is a question about the performance trade-off between two methods of storing data. One method is to create a separate attribute for each piece of data, and get/set the value...
10
by: AlexS | last post by:
Hi, I wonder if anybody can comment if what I see is normal in FW 1.1 and how to avoid this. I have .Net assembly, which creates literally thousands of temporary strings and other objects...
4
by: djc | last post by:
the aspnet_wp.exe process in taking up lots of memory. Right now just the one main page loads and imediately goes to the top of the memory usage list with around 32MB of memory usage. The page only...
1
by: premgrps | last post by:
Hi, I have a table of a million records and wrote a CGI-PERL script to display the results based on the user input. The results might be anywhere from 100 to 1000 per query and presently I am...
14
by: Gotisch | last post by:
Hi, we are currently writing an mostly singlethreaded (game)server application in c#. But we are encountering problems with the Garbage Collector: After a certain time but also apparently...
4
by: Michel Esber | last post by:
Hello, DB2 V8 LUW FP 11. My applications eventually takes a very long time to process simple insert statements. Here´s the output of a event monitor: Text : INSERT INTO MyTable...
11
by: pradeepss | last post by:
I am developing an application which grab a comma delimited file and inserts them into a database. but while inserting it gives me an error. the code is below. Do While Not EOF(iDrop) Line...
1
by: Hennie7863 | last post by:
Hi, I've a strange problem with a INSERT query. It's taking a long time to execute. The format is like this : INSERT INTO table1 SELECT .. FROM table2 Executing the SELECT .. FROM table2 is...
1
by: hockeymtl | last post by:
Hy all, ( sql server 2000 ) I have trouble with my indexes in my database after I inserted lots of data in some user tables ( 10000 + insert ). I need to pinpoint where to look to solve my problem....
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.