Re: OWS performance problem
Posted in 1997
Guy Germonpre wrote: > > Hi > > I have an Informix Online Workgroup server 7.20.UC2 on SCO Unix 5.0.2 > After first install, it was dead slow. I did an update statistics high > and it worked much quicker. > > One problem stays : > if I have a composed index (A,B) and i do a select "where A="X" and B > matches "*Y*" it takes > minutes before i have an answer. If I drop the index, it is much > quicker. > > sqexlain.out says that with the index, OWS uses the index, without, he > does a seq.scan. I changed OPTCOMPIND to 0, I did an update statistics > high on A and on B without result. > > HELP ! > > Guy Hi Guy, 1st solution: Change the order of your indexed columns to ( B, A ), if possible. 2nd solution: Set OPTCOMPIND=2 and do an UPDATE STATISTICS HIGH FOR table(A). 3rd solution: Transform your where-clause to WHERE A || "" = "X" and B matches "*Y*" The 3rd solution will work always; it prevents the optimizer from using the index. Please, make note of this trick. You will find this part of your program quicker, if it is documented. Maybe you will have a special optimizer directive in the next future ;-) Bye Stefan