How Informix determines Index
Posted in 2000
Topics: General Discussion
Hi, How does Informix determine the index for an SQL statement if the table has more than one index and how can a programmer try to use the best/fastest index? Thanks again Jordan
ASA GSI wrote: > > Hi, > > How does Informix determine the index for an SQL statement if the table has > more than one index and how can a programmer try to use the best/fastest > index? By calculating the relative estimated costs of performing a query in all possible ways and selecting the cheapest. You can make sure the statistics are updated to the most useful level which is to follow the recommendations for running UPDATE STATISTICS in the Performance Guide or getting my dostats utility which implements them for you. If you feel that you can tweak a particular query better you can use optimizer directives (see the manuals) to guide the optimizer. Be careful this may work for individual filter values but not for others or in the general case. The Informix optimizer is the best in the business. Art S. Kagel