Subject Re: [firebird-support] how do i speed this up?
Author Alexandre Benson Smith
martinknappe wrote:
> hi,
> i have here the script of a database:
>
> http://www.yourfilehost.com/media.php?cat=other&file=script.sql
>
>
> now, i've created the database and inserted some 200 000 random
> entries in table 'dicentries'
> when i execute the following query:
>
> select first 1 id from dicentries where (asterm = '' and id > 0)
> or
> (asterm > '' and id > 0) order by asterm ascending, id ascending
>
> it takes around 8 seconds to execute!
> will i have to put up with this or does any of you see a way to speed
> this up?
>
> thanx very much,
>
> martin
>
>
Martin,

Show us the plan

Are your indices statistics up to date ?

see you !

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