indexing
Posted in 2004
Topics: General Discussion
hello all! a few indexing questions: If the columns I filter on in my query are a subset of the columns in an index, will the index be used? Also -- does the order in which the columns are specified in my filter matter? thank you tom
On Mon, 30 Aug 2004 14:33:39 -0400, tomL wrote: > hello all! > > a few indexing questions: > > If the columns I filter on in my query are a subset of the columns in an > index, will the index be used? If the subset includes the first 'n' columns of an index that index MAY be used depending on the optimizer's determination of the filter value of using that index versus some other versus a sequential scan. That depends mostly on the quality of the table's Data Distributions created with UPDATE STATISTICS MEDIUM/HIGH. See the Informix Performance Guide for details. > Also -- does the order in which the columns are specified in my filter > matter? In general, no, the optimizer reorders the comparisons it makes as needed to minimize the cost of the query. Art S. Kagel > thank you > tom