Subject RE: [firebird-support] 'select' with delays ref/eDN5012844953
Author Dennis
Hi Alexandre



Firebird version 1.5.3.4870

The second run of the query is faster because of the cached data indeed, how
can we reduce the 1st delay? It this 15seconds a normal delay?



The query is:

select * from reg_header

where

(reg_header.rpl_deleted=0) <-- this doesn't make difference

and (

((merch_fromstore_innerc='agse.1228991')and(merch_iss_regtype=0))

or ((merch_tostore_innerc='agse.1228991')and(merch_rec_regtype=0))

)

Indicies:

MERCH_FROMSTORE_INNERC,MERCH_ISS_REGTYPE,RPL_DELETED

MERCH_TOSTORE_DESC,MERCH_REC_REGTYPE,RPL_DELETED



Which indexes must exist to support this query?



Kind regards

Dennis

_____

From: firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.com] On Behalf Of Alexandre Benson
Smith
Sent: Friday, January 12, 2007 8:28 PM
To: firebird-support@yahoogroups.com
Subject: Re: [firebird-support] 'select' with delays ref/eDN5012844953



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?
>
>
>

Probably because on the second run the data are already on cache.

But, the first thing...

Tell us:

FB version and show us the query...

> Thank you in advance.
>
> Dennis
>
>
>

see you !

--
Alexandre Benson Smith
Development
THOR Software e Comercial Ltda
Santo Andre - Sao Paulo - Brazil
www.thorsoftware.com.br





[Non-text portions of this message have been removed]