Subject | Re: How to gat a good performance |
---|---|
Author | Adam |
Post date | 2005-12-07T22:29:47Z |
>It does and will!
> But why Firebird do not use a index when there are aggregate
> functions in query ?
The problem is that you did not provide a descending index for it, so
a full table scan was "cheaper" than using the index that was
available. Unlike other databases, Firebird's indices are
unidirectional only. This saves on space and allows higher density,
making the indices require less pages and hence a higher speed.
> And after the second execution, it will alway takes 3,4 seconds toDo yourself a favour and use a tool that can break down the time taken
> return a result.
> It seems that there no cache for the results.
into three categories.
1. Preparation Time: How long does it take for the optimiser to choose
the fastest plan.
2. Execution Time: How long does it take to do the work.
3. Fetch Time: How long does it take to return all those records.
You do not have to do anything to get it to cache information. It will
do it automatically, but for all we know, fetch time might be 3
seconds, the only way to speed that up is to have a faster network or
less data.
Adam