Subject Re: [firebird-support] is there a way around the IN clause?
Author Gary Benade
Daniel
>>How many records are returned by this query?
2400
>>Which version of Firebird are you using?
1.5
>>Also, try the query without the ORDER BY clause, just to see if it's
>>not the PLAN SORT that is the bottleneck of your query.
Hmmm, you may be on to something there. 10 seconds now

Martijn
>Does adding this help:
>and orders.customerlink = c.link
Lucs query returns rows now, but it still takes 46 seconds

Helen
> And, after doing that, change the main search clause to:
> and (c.branchcode = 'SAN' OR 1=1)
The query took 15 minutes and totally maxed the server out
> (on the suspicion that you have a horrible long dup chain on that index)
Yes, the branchcode index has 54 distinct values in 500000 records, not good
at all

Thanks for your input - I am going to go and give this a really good think,
right after I make some fresh coffee
Gary