Subject Re: [firebird-support] IN predicate limit
Author Dmitry Yemanov
"Adam" <s3057043@...> wrote:
> (ID IN ('1','2','3',......,'1499') OR ID IN
> ('1500','1501','1502',......,'2002'))

What amount of rows is your predicate expected to match? 5% of the table?
Do you understand that if ID is indexed (I suppose it is) your query will
force 2000 separate index scans? Unless the output covers only a few
percents of the huge table, I really doubt this is faster than a natural

> It seems that I can not get the PLAN using any of my normal tools. (It
> comes back blank). On further investigation, it is actually coming up
> with a sensible plan, (IBPlanalyzer and IBAdmin both show it making
> indexed reads and it is definately not doing a table scan). What would
> cause this, and is it something I should be concerned about?

Plan buffer (passed by the tool) is not big enough.