🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: ADO slower than BDE!!?

#4949
From: Harold Howe (TeamB)
Date: Tue, 04 Sep 2001 16:07
34 lines
2616 bytes
> By setting the properties of the table as you said, the 14 minutes reduced
> to 6 minutes which was still very much, so I decided to forget about the
> filtering method and used a Query with a rather complex SQL statement
which
> reduced the to time to less than a minute.

Do you have BCB5 enterprise, or did you buy adoexpress update pack? If you
have the enterprise version, here is a technique that I have had success
with.

When you need to process a lot of records and you want to use ado, set up an
ado query with a forward only server side cursor. Then, put down a dataset
provider and point it to the ado query. Next, put down a TClientDataSet, and
point it at the provider.

When you need to load the records, set the Active property of the
clientdataset to true. This will in turn activate the ado query, and fetch
all of its rows into the clientdataset. Once you get the rows into the
client dataset, you can manipulate them in a variety of ways. You can set
the filter property like you needed. If your filter is simple, you might get
better results by creating an index on the clientdataset.

Clientdataset's make great little in memory tables for manipulating data. My
guess is that with a cds, you could get performance on par with the original
BDE query, or even faster. If you need to edit rows and right them back, the
CDS provides an easy way to iterate the dataset and figure out which records
have changed (you could the build in resolving mechanism of midas, but I
usually don't bother with that, I update the data manuall). Note that if you
don't need to edit data, then set the LogChanges property of the
clientdataset to false.

Harold Howe [TeamB]
http://www.bcbdev.com
Technical Details
Message-ID: <3b94fc28_1@dnews>
Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!isdnet!newsfeed.online.be!newsfeed01.sul.t-online.de!t-online.de!dnews
References: <3b910b75_1@dnews> <3b918db1.2506525@forums.inprise.com> <3b9460ac_1@dnews>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10698b,f5b85ddade8637c4
X-Google-Attributes: gid10698b,public
X-Google-ArrivalTime: 2001-09-04 09:14:37 PST
From: "Harold Howe \(TeamB\)" <hhowe@bcbdev.com>
Newsgroups: borland.public.cppbuilder.database.ado
References: <3b910b75_1@dnews> <3b918db1.2506525@forums.inprise.com> <3b9460ac_1@dnews>
Subject: Re: ADO slower than BDE!!?
Date: Tue, 4 Sep 2001 11:07:33 -0500
Lines: 36
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4522.1200
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
NNTP-Posting-Host: 12.152.193.134
Message-ID: <3b94fc28_1@dnews>
X-Trace: dnews 999619624 12.152.193.134 (4 Sep 2001 09:07:04 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!isdnet!newsfeed.online.be!newsfeed01.sul.t-online.de!t-online.de!dnews