Subject | Re: [firebird-support] 'select' with delays ref/eDN5012844953 |
---|---|
Author | Svein Erling Tysvaer |
Post date | 2007-01-12T13:37:37Z |
Please tell us some more, Dennis.
Which version of Firebird?
What program/components do you use and how do you do things (extracted
parts of the code are sometimes useful)?
When you say 'delay on open' do you mean only the time opening the query
only or do you also include the time connecting to the database, start
the transaction and prepare your query? If so, which of these parts is
taking too long?
As for things being slower with order by, it may be due to your
components displaying records before loading all of them. This is most
visible if your WHERE clause isn't very selective.
Set
Dennis wrote:
Which version of Firebird?
What program/components do you use and how do you do things (extracted
parts of the code are sometimes useful)?
When you say 'delay on open' do you mean only the time opening the query
only or do you also include the time connecting to the database, start
the transaction and prepare your query? If so, which of these parts is
taking too long?
As for things being slower with order by, it may be due to your
components displaying records before loading all of them. This is most
visible if your WHERE clause isn't very selective.
Set
Dennis wrote:
> Delay on first open of indexes.
>
> There is a table where has 170000 records, using an index with 3 keys using
> and 'order by' in the script. No outer joins (seems simple)!
>
> Question 1
>
> The first query delays about 15 seconds, if we try to execute it again the
> same it takes about 1 second. How can we face the first delay?
>
> Question 2
>
> There is an 'order by' statement, where delays too much 1/sec (on the same
> query), without the 'order by' it takes less than 1/10sec. There is an index
> with this field only, without this index it takes about 2 seconds. May I
> reduce this delay in less than 1 second?
>
> The above time is under good cpu server conditions, when the server is
> 'working' these times take much longer, because of that I try to reduce the
> one second.