Don't do any type of TRIM on an index expression. It will actually slow things down. Fox works best on fixed length indeces.
>Hello!
>I have a FoxPro application, that handles large volume of data. The tables have simple indexes defined on its fields. In an attempt to speed up my queries, I modified my indexes to match my queries. I read about Rushmore optimization and altered the indexes so that they obey the Rushmore principles.
> - My indexes look exactly like the query.i.e if my query defines a criteria as 'Alltrim(Upper(fieldname))', I have an index defined as alltrim(upper(fieldname)). I did this because I read that the optimization will be turned off, if the indexes are altered.
>
> - I have avoided the use of $,At(),Empty() functions.
>
> - Most tables have 4-7 indexes defined.
>
>After making these changes, my quries take longer. I am trying to find out why this happens. Any help would be much appreciated.
>
>Thanks in advance.
>
>Ria
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer