🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.database.ado
Article #331

Too Slow

#331
From: Cenk
Date: Tue, 08 Aug 2006 15:04
32 lines
1748 bytes
Hi,

i have a code sample below,

TADODataSet *CountQuery = new TADODataSet(this);
  CountQuery->ConnectionString = "Provider=SQLOLEDB.1;Integrated 
Security=SSPI;Persist Security Info=False;Initial Catalog=Raw;Data 
Source=CENK";
  CountQuery->CommandTimeout = 0;


  if  (CountQuery->Active)
     CountQuery->Close ();


 CountQuery->CommandText = "select [bid],[fTime] from ["+table+"] order by 
[fTime] ASC";
 CountQuery->Open ();

  while (!CountQuery->Eof) -------> table has 1000000 rows of data inside 
but this loop takes appox. 45 minutes to complete!
  {

     v_bid.push_back(CountQuery->FieldByName ("bid")->AsFloat);

           v_time.push_back(CountQuery->FieldByName ("fTime")->AsDateTime);

           CountQuery->Next ();
        }

why is this too slow? any suggestions?
thanks 
Technical Details
Message-ID: <44d8a854@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: 10698b,9e074baf94073a9a,start
X-Google-Attributes: gid10698b,public
X-Google-Language: ENGLISH,ASCII-7-bit
Reply-To: "Cenk" <cenk1536@yahoo.com>
From: "Cenk" <cenk1536@yahoo.com>
Newsgroups: borland.public.cppbuilder.database.ado
Subject: Too Slow
Date: Tue, 8 Aug 2006 18:04:33 +0300
Lines: 34
Organization: Freelance
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2869
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2869
NNTP-Posting-Host: 81.214.143.82
Message-ID: <44d8a854@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1155049556 81.214.143.82 (8 Aug 2006 08:05:56 -0700)
Path: arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail