🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Improving query speed

#814
From: Daniel Stevenson
Date: Thu, 12 May 2005 07:57
40 lines
2657 bytes
I could be asnwering something totally different to what you are asking....
but the tests I performed were a while ago, I use two TADOQuerys but rather
than creating a second TADOQuery and putting it in master-detail, I rewrote
the SQL in the second TADOQuery to reflect the selection within the first
TADOQuery.

I have a feeling that this was faster than allowing the Queries to perform
their own master-detail data filtering.  I could be wrong but I think
master-detail relationships were good for TADOTables and not TADOQueries.

This way you are only extracting from the server the data that is being used
at the time that it is required.

hmm, I think this may only good if you are wanting to break up the data
retreival from the server and not do it all in one big hit...and if you are
not using all the data.

In my application I use around 100+ tables all with 10,000's  of data and
gave up on using Master-Detail relationships due the way our application was
being used and the delays in using Master-Detail relationships and always
recreate the SQL to filter the data related to the first query.

I hope this helps.

"Tumurbaatar S." <nospam_tumur@magicnet.mn> wrote in message
news:4253aa28@newsgroups.borland.com...
> To improve speed of two TADOQuery comp-s linked as master-detail,
> I changed some default values of them:
>
> CacheSize > 1 (default is 1, but I use 1000)
> CursorLocation=clUseClient (by default)
> CursorType=ctStatic (default ctKeyset)
> LockType=ltReadOnly (default ltOptimistic)
> Prepared=true (default false)
>
> Am I doing right? Anything wrong or more to add?
> Also I need to minimize a server load and do the most things
> on a client side, as much as possible.  Any suggestions?
>
>
Technical Details
Message-ID: <42830c62@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!fr.ip.ndsoftware.net!news-out.newsgroups.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail
References: <4253aa28@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10698b,163cdffa7452f010
X-Google-Attributes: gid10698b,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Daniel Stevenson" <daniel@ocreage.com.au>
Newsgroups: borland.public.cppbuilder.database.ado
References: <4253aa28@newsgroups.borland.com>
Subject: Re: Improving query speed
Date: Thu, 12 May 2005 17:57:19 +1000
Lines: 42
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: 202.174.233.53
Message-ID: <42830c62@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1115884642 202.174.233.53 (12 May 2005 00:57:22 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!fr.ip.ndsoftware.net!news-out.newsgroups.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail