🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Asynchronous queries

#1375
From: Arnie Mauer
Date: Wed, 28 Jul 2004 14:18
30 lines
1796 bytes
"Star" <---> wrote in message
news:4106de81$1@newsgroups.borland.com...
> Hi,
>
> I have very big table (about 50 million records). I usually make
some
> queries on this table, and it can take
> several minutes to run. Is there anyway to start getting records as
soon as
> there is one available?
>
> I thought I could use something like this:
>
> ADODataSet1->CommandText = "SELECT Code From Subs_Subjects";
>
> ADODataSet1->ExecuteOptions = ADODataSet1->ExecuteOptions <<
eoAsyncFetch;
> ADODataSet1->Open();
>
> Is that the way to do it? Should I get an event for every new record
> returned? In that case, what event should I look at?
>
> Thanks

One thing that helps, for SQL Server anyway, is adding the phrase "
OPTION (FAST 50)" to the end of the SQL statement.  This indicates you
want rows returned quickly.  Another mechanism is to limit the number
of rows returned by setting the TADOQuery's MaxRecords property.

- Arnie
Technical Details
Message-ID: <4107b5bd$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <4106de81$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10698b,e0caeb4fee49b407
X-Google-Attributes: gid10698b,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Arnie Mauer" <xxx@nowhere.net>
Newsgroups: borland.public.cppbuilder.database.ado
References: <4106de81$1@newsgroups.borland.com>
Subject: Re: Asynchronous queries
Date: Wed, 28 Jul 2004 10:18:00 -0400
Lines: 32
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1437
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441
NNTP-Posting-Host: 24.151.53.89
Message-ID: <4107b5bd$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1091024317 24.151.53.89 (28 Jul 2004 07:18:37 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail