Subject | Re: [firebird-support] Re: Slow execution of first query |
---|---|
Author | M Tuttle (KS) |
Post date | 2005-11-24T13:34:37Z |
Greetings Noco,
How many records are being returned by your query's result set? I may be
wrong, but I'm guessing that IBExpert and DBWorkbench both limit the number
of records record in the result set to the number that will display in the
interface, which will of course vastly speed up the execution time. I do
not know the query you use, but IBQuery has a BufferChunks property and if
you are using a TClientDataset then you can use the PacketRecords property
to limit your result set to the number of records that can show in your user
interface.
Just a guess mind you...
Mike
How many records are being returned by your query's result set? I may be
wrong, but I'm guessing that IBExpert and DBWorkbench both limit the number
of records record in the result set to the number that will display in the
interface, which will of course vastly speed up the execution time. I do
not know the query you use, but IBQuery has a BufferChunks property and if
you are using a TClientDataset then you can use the PacketRecords property
to limit your result set to the number of records that can show in your user
interface.
Just a guess mind you...
Mike
----- Original Message -----
From: "Nico Callewaert" <ncw@...>
To: <firebird-support@yahoogroups.com>
Sent: Thursday, November 24, 2005 7:06 AM
Subject: [firebird-support] Re: Slow execution of first query
> Hi Pavel,
>
> You know what is funny : when I first execute that SQL statement in
> IBExpert, and then I open my application, there is no delay, it's
> fast immediatly ...
>
> Nico
>
> --- In firebird-support@yahoogroups.com, Pavel Menshchikov
> <developer@l...> wrote:
> >
> > Hello Nico,
> >
> > NC> The connection to the DB is fast, it's only the first time
> > NC> the "Query.Open" statement is executed. The next 10 or 20
> times I
> > NC> open the query, it's always fast.
> > Then, my guess is that's server-side caching. Can you execute the
> > query via ibexpert/(similar tool)... to get additional info about
> > executing the statement (I mean, time to prepare, time to execute,
> > reads, writes, etc. for the first time and for the second)?
> >
> > NC> I know this is not the right list
> > NC> to ask, but is it possible with FIBPlus to load the metadata at
> > NC> startup of the application ?
> > You may turn metadata caching on. But it is a database metadata,
> not a
> > query metadata. Look at TpFIBDatabase properties - you'll find it
> > there (AFAIR).
> >
> >
> >
> > --
> > Best regards,
> > Pavel Menshchikov
> > http://www.ls-software.com
> >
>
>
>
>
>
>
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
> Visit http://firebird.sourceforge.net and click the Resources item
> on the main (top) menu. Try Knowledgebase and FAQ links !
>
> Also search the knowledgebases at http://www.ibphoenix.com
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
> Yahoo! Groups Links
>
>
>
>
>
>
>
>
>