=?utf-8?B?UkU6IEhvdyBJbmZvcm1peCBkZXRlcm1pbmVzIEluZGV4?=
Posted in 2000
Ideally the query path is determined by the query optimizer.
The optimizer will analyze the SQL statement and select the
best query path.
It normally uses indexes for joins, sorting, groupings as
well as filtering. Of course sometimes a query is best executed
as sequential scan.
Informix identifies the best path through the use of statistics
that you or the DBA or somebody updates on a regular basis. If these
statistics are not up-to-date, Informix might choose a not-so-optimal
query path.
If you doubt Informix's optimizer, you can use Informix's optimizer
directives to force it to choose a specific path of your choosing.
And to determine if it is indeed the "best/fastest" you can use
SET EXPLAIN to generate the query path, and look at the cost.
More information is provided in the Informix's Performance Guide
which is available at Informix's web site.
-----Original Message-----
From: ASA GSI [mailto:jbruce@asaglobalserv.com]
Sent: Wednesday, August 16, 2000 1:43 PM
To: informix-list@iiug.org
Subject: How Informix determines Index
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