Subject Re: [ib-support] Very Slow Query
Author Ivan Prenosil
...
> It Takes about 24 minutes
...
> it takes 1 second

Are these times to get whole result or just first rows ?
What are plans for both queries ?
How many rows are there for "id_mailing=9" and for "id_mailing=8" ?


Does anything change when you use explicit join syntax (FROM tab1 JOIN tab2 ON ...) ?
When you drop ORDER BY clause ?
When you update statistics for indexes ?

Ivan
http://www.volny.cz/iprenosil/interbase

----------
> From: las19682000 <las_@...>
> To: ib-support@yahoogroups.com
> Subject: [ib-support] Very Slow Query
> Date: 6. srpna 2002 22:37
>
> Hi, i have about 400,000 records on my table Cliente and about
> 400,000 on
> Cliente_Mailing and when i run this query:
>
> Select Cliente.Nome
> From Cliente,Cliente_Mailing Where
> (Cliente_Mailing.id_mailing=9 or Cliente_Mailing.id_mailing=8)
> and Cliente.id_cliente=Cliente_Mailing.id_cliente
> Order by nome
>
> It Takes about 24 minutes
>
> But if i test only Cliente_Mailing.id_mailing=9 like this:
> Select Cliente.Nome
> From Cliente,Cliente_Mailing Where
> (Cliente_Mailing.id_mailing=9)
> and Cliente.id_cliente=Cliente_Mailing.id_cliente
> Order by nome
>
> it takes 1 second
>
> Why and how to speed the top query