🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.cppbuilder.database.ado
2 messages
2 total messages Started by Curt Wed, 14 Sep 2005 16:05
Slow updatebatch (insert)
#585
Author: Curt
Date: Wed, 14 Sep 2005 16:05
8 lines
1301 bytes
I'm attempting to insert 10,000 records to a very simple MySQL table.  I use
a TADOConnection with a TADODataSet and cached updates.  The problem is that
the updatebatch process takes several minutes to complete.  Is there a
faster way to pump this many records into a table ?  From the MySQL command
line I can insert over 3000 records in less than a second.

Thanks,
Curt
Re: Slow updatebatch (insert)
#586
Author: Mark Guerrieri
Date: Thu, 15 Sep 2005 17:13
26 lines
1943 bytes
You could send the server (via the TADOConnection->Execute method) specific
ALTER TABLE commands before/after applying you batch updates do
disable/enable the updating of indexes while inserting.  I don't remeber the
specific commands, but you can look them at mysql.com under the INSERT speed
optimization section.

Also, you could write your data to a text file and send the server a LOAD
DATA INFILE command which is about as fast as using the MySQL command line.

Mark

"Curt" <noemailaddress> wrote in message
news:4328495a$3@newsgroups.borland.com...
> I'm attempting to insert 10,000 records to a very simple MySQL table.  I
use
> a TADOConnection with a TADODataSet and cached updates.  The problem is
that
> the updatebatch process takes several minutes to complete.  Is there a
> faster way to pump this many records into a table ?  From the MySQL
command
> line I can insert over 3000 records in less than a second.
>
> Thanks,
> Curt
>
>
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads