Re: Online Dynamic Server 7.3 : Index not used!
Posted in 2000
David Van Wallendael wrote in message <38A82D96.7FE95AA5@irislink.com>...
>Hello Everybody!
>
>I've recently migrated my unix server with the informix online 5.0 to
>informix dynamic server 7.3. My problem is this : When i make a simple
>query on a table, the index are not used
>
>Here's my table "fiche_ft" with the index :
>
>Column name Type Nulls
>
>fi_nume integer yes
>fi_zone char(3) yes
>fi_mot varchar(50,0) yes
>
>Index name Owner Type Cluster Columns
>
>ft1 informix dupls No fi_nume
>
>ft2 informix dupls No fi_mot
>
>ft3 informix dupls No fi_zone
>
>Here's the file sqexplain.out :
>===================
>
>QUERY:
>------
>SELECT ft.fi_nume FROM fiche_ft ft
>WHERE fi_zone != '4a' AND fi_mot LIKE 'ethos%'>
>Estimated Cost: 8888
>Estimated # of Rows Returned: 44593
>
>1) informix.ft: SEQUENTIAL SCAN
>
> Filters: (informix.ft.fi_zone != '4a' AND informix.ft.fi_mot LIKE
>'ethos%'
>
>As you can see , the index are not used...
>
>Did someone had already the same problem ?
>Did someone has an idea how to force the use of index ?
>
>thanks,
>
>David Van Wallendael
>www.irislink.com
>
David,
Set the environment variable OPTCOMPIND to 0. This should force the index
to be used.
Good luck,
-Tim