Article View: borland.public.cppbuilder.database.ado
Article #193Re: Fastest Way to Insert a Number of Records via SQL
From: Vassiliev V. V.
Date: Tue, 05 Jun 2007 16:41
Date: Tue, 05 Jun 2007 16:41
32 lines
2340 bytes
2340 bytes
It is difficult to say without seeing your code and data why TADOTable is slow. If you have no BLOBs and not much columns, inserting 19000 rows should take ~1-2 minutes. Transactions can be batched. //------------------------------------------ Regards, Vassiliev V. V. http://www.managed-vcl.com - using .Net objects in Delphi for Win32 + ADO.Net http://www.oledbdirect.com - The fastest way to access MS SQL Server, MS Jet (Access) and Interbase (through OLEDB) "Dan" <Dan@do.not.spam> ???????/???????? ? ???????? ?????????: news:466580d1@newsgroups.borland.com... > Vassiliev V. V. wrote: >> For Access (but not for most other DBMS) try to use TADOTable with >> CursorLocation = crServer. > > I did this and then did a quick test off inserting 100 sets of 520 > records, and the time was exactly the same. > > Using transaction (open transaction, insert 5000 >> or 19000 rows, then commit transaction, then start new transation etc.) >> will >> also speed up inserts (again, for other DBMS this may or may be not >> true). >> For best results you may look at third-party components, but they may >> require more code. > > How can you batch transactions in this manner?
Technical Details
Message-ID:
<4665925c@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newspeer1.nwr.nac.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<46645ac3@newsgroups.borland.com> <466477c6$1@newsgroups.borland.com> <466580d1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10698b,d0a6c05550b4cac9 X-Google-Attributes: gid10698b,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit From: "Vassiliev V. V." <support@oledbdirect.com> Newsgroups: borland.public.cppbuilder.database.ado References: <46645ac3@newsgroups.borland.com> <466477c6$1@newsgroups.borland.com> <466580d1@newsgroups.borland.com> Subject: Re: Fastest Way to Insert a Number of Records via SQL Date: Tue, 5 Jun 2007 20:41:01 +0400 Lines: 34 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.3028 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3028 X-RFC2646: Format=Flowed; Response X-Antivirus: avast! (VPS 000747-1, 05.06.2007), Outbound message X-Antivirus-Status: Clean NNTP-Posting-Host: 85.93.138.132 Message-ID: <4665925c@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1181061724 85.93.138.132 (5 Jun 2007 09:42:04 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newspeer1.nwr.nac.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail