Subject | Re: [ib-support] Question on delete |
---|---|
Author | Paolo Fainelli |
Post date | 2003-03-21T11:09:42Z |
Louis,
Thanks for your answer. I've modified my query and now the plan use primary
key, but result is ... slower !!!!!
It seems that FB ( version 1.02 ) scan mytable from the beginning to the
end. Using Interbase PlanAnalizer I discover that subquery need 2ms to
complete , original query more than 3 sec.
Maybe it's better to rewrite this query in another way ( I'm using delphi ).
Paolo
Thanks for your answer. I've modified my query and now the plan use primary
key, but result is ... slower !!!!!
It seems that FB ( version 1.02 ) scan mytable from the beginning to the
end. Using Interbase PlanAnalizer I discover that subquery need 2ms to
complete , original query more than 3 sec.
Maybe it's better to rewrite this query in another way ( I'm using delphi ).
Paolo
> I have used techniques like adding other WHERE phrases to solve this typeof
> problem in the past. In you situation, assuming all the ID values are >0,
> I would write the query as follows:condition> ))
>
>
>
> delete from mytable
>
> where (mytable.id > 0)
>
> and (mytable.id in ( select id from listtable where <search
>
>
>
> HTH
>
>
>
> Louis Kleiman
>
> SSTMS, Inc.
>