Subject | Re: [ib-support] Re: Very Slow Query |
---|---|
Author | Daniel Rail |
Post date | 2002-08-06T23:34:17Z |
At 06/08/2002 07:18 PM, you wrote:
statement? Also, what are your indexes?
Daniel Rail
Senior System Engineer
ACCRA Med Software Inc. (www.accramed.ca)
>Didnt work.What didn't work? Did it took the same time as your first
statement? Also, what are your indexes?
Daniel Rail
Senior System Engineer
ACCRA Med Software Inc. (www.accramed.ca)
>Thanks anyway
>--- In ib-support@y..., Daniel Rail <daniel@a...> wrote:
> > At 06/08/2002 05:37 PM, you wrote:
> > >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
> > Try:
> >
> > SELECT Cliente.Nome
> > FROM Cliente
> > WHERE EXISTS (SELECT *
> > FROM Cliente_Mailing
> > WHERE (Cliente_Mailing.id_cliente=Cliente.id_cliente)
> > AND (Cliente_Mailing.id_mailing in [8, 9]))
> > ORDER BY Nome