Article View: borland.public.cppbuilder.database.ado
Article #2530Performance damn LOW!!! Please fix my codes
From: booker
Date: Mon, 19 May 2003 09:14
Date: Mon, 19 May 2003 09:14
29 lines
1945 bytes
1945 bytes
My codes:
for(;node;node=node->mNext)
{
cmdstr.printf("insert int tbl_some values(some1,some2....somen)");
adoquery->SQL->Add(cmdstr);
}
adoquery->ExecSQL();
the loop may execute for more than 10000 times....runing in a PIII850
use 32 seconds(not including the ExecSQL). The speed is inacceptable......i
did some test and found that the slowest part is:
query->SQL->Add(cmdstr);
if i remove this line,the code only execute for 1500 ms ,i think it must
be the AnsiString allocation in the Add methord slow it down.
I know that Bulk Insert may greatlly inprove the performance ,but i
can't use it. because in my case,the appserver and sqlserver are in
different computer,so the bulk insert must be able to locate the file in the
appserver via UNC file path.This require the sqlserver to run in a Windows
Domain Acount,but i don't know how to setup a Windows Domain at all.
So can any body point me out a way to boost the performance?
Best regards,
Bob H
Technical Details
Message-ID:
<3ec8a054$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-01!sn-xit-08!supernews.com!small1.nntp.aus1.giganews.com!border1.nntp.aus1.giganews.com!nntp.giganews.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10698b,447c08d7d7d81fe,start X-Google-Attributes: gid10698b,public X-Google-ArrivalTime: 2003-05-19 02:28:08 PST From: "booker" <diablohsh@163.net> Newsgroups: borland.public.cppbuilder.database.ado Subject: Performance damn LOW!!! Please fix my codes Date: Mon, 19 May 2003 17:14:04 +0800 Lines: 31 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 NNTP-Posting-Host: 210.21.34.181 Message-ID: <3ec8a054$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1053335636 210.21.34.181 (19 May 2003 02:13:56 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-01!sn-xit-08!supernews.com!small1.nntp.aus1.giganews.com!border1.nntp.aus1.giganews.com!nntp.giganews.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail