Re: forcing index use with OWS/NT
Posted in 1998
Topics: Performance & Tuning, SQL Development & Query Writing, Connectivity: ESQL/C, 4GL & Embedded SQL, Server Administration
mjgator@sibretown.com wrote: <72vr4d$4rc$1@nnrp1.dejanews.com>... >I am mystified. Running Online Workgroup Server on NT. D4GL front end. >Have a table, POLICY, with 15 or so columns. Unique index on Polno (the >policy #), duplicate index on polsetup (date) and polname (Char 35). Have a >QBE screen set up. If client enters SMI* in the policy name field (polname) >and queries, it does a brute force sequential search...OR uses the polno >index (according to set explain). I have tried dropping the polname index >and making a composite of polname/polno...and then one of polno/polname. >Nada. The select statement does an ORDER BY POLNO since even though I want >all the names SMI*, I want them delivered in policy order. Is this my >problem? When I try this in DBACCESS with no ordering, etc, it ignores the >polname index. > >Originally this identical query/screens/table was on old I4GL on SE and worked >perfectly. > >-----------== Posted via Deja News, The Discussion Network ==---------- >http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own Hi, it is a standard informix-problem. The Informix optimizer does sometimes mysterious things ... If you've got OWS 7.3x or higher you can use the new SQL-Command "USE-INDEX" and name the index you want to use. If you have not: Try Reading the complete record or first read another field that is not part of an index Best regds. Thomas Thomas.Lankes@t-online.de