Subject | Re: [firebird-support] IN predicate limit |
---|---|
Author | Dmitry Yemanov |
Post date | 2005-08-24T04:14:45Z |
"Adam" <s3057043@...> wrote:
50%?
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
scan.
Dmitry
>What amount of rows is your predicate expected to match? 5% of the table?
> (ID IN ('1','2','3',......,'1499') OR ID IN
> ('1500','1501','1502',......,'2002'))
50%?
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
scan.
> It seems that I can not get the PLAN using any of my normal tools. (ItPlan buffer (passed by the tool) is not big enough.
> 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?
Dmitry