Subject | Re: Generic User Criteria Table |
---|---|
Author | Tom Conlon |
Post date | 2007-01-30T10:32:52Z |
Hi there Svein,
Thanks for your response.
(FYI the example I gave was a cut-down version of the real thing).
believe). That and using the same index repeatedly for every element
in the IN clause!
Thanks for the suggestion for reorganising the output SQL, I'll be
taking some of it on board. Part of the reason for the layout is the
generation takes place centrally (and for different situations). i.e
the joins are generated in one place and the where clause for more
definite types of other criteria generated elsewhere.
determine the wisdom of ignoring an index and performing a table scan
or not?
Thanks for your response.
(FYI the example I gave was a cut-down version of the real thing).
> but unless you have more complex cases where the 'in list' gets muchThis was indeed part of the problem (1500 items is the max, I
> bigger (there is a limit as to how many items there can be, at least
believe). That and using the same index repeatedly for every element
in the IN clause!
Thanks for the suggestion for reorganising the output SQL, I'll be
taking some of it on board. Part of the reason for the layout is the
generation takes place centrally (and for different situations). i.e
the joins are generated in one place and the where clause for more
definite types of other criteria generated elsewhere.
> How many different values are there in CRITERIACOLUMN?Is this really true? Surely the selectivity of the index would
> If there are only a handful,
> NATURAL could be a better option than using an index.
determine the wisdom of ignoring an index and performing a table scan
or not?
> HTH, SetYes, it did!