Subject Re: [ib-support] Question on delete
Author Svein Erling Tysvaer
At 12:09 21.03.2003 +0100, you wrote:
>Louis,
>Thanks for your answer. I've modified my query and now the plan use primary
>key, but result is ... slower !!!!!

No surprise since using a plan is slower than using natural if the entire
table has to be scanned anyway.

>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 ).

Does this mean that my suggestion for rewriting your query did not improve
the speed? If so, I guess you have to write a stored procedure where you
FOR SELECT 'the subquery', and then delete from the main table for each row
returned.

HTH,
Set