>>>>I want to create an index on 2 fields, one is a character field and one is a logical field. I was thinking about this:
>>>>
>>>>INDEX ON Groupname + TRANSFORM(lgroup,"Y") tag Grouping
>>>>
>>>>Is there a better way to do this (or a reason I shouldn't)?
>>>
>>>Michael,
>>>
Compound indexes are not optimizable by Rushmore so you could be taking a performance risk by doing this.>>
>>Are you sure? Before I check it in a Help...
>>
>>> I would recommend just using the name and using a view to retrieve the data and order it by groupname and lgroup.
>>>
>>>Is there another reason to add the logical expression besides sorting?
>
>
>As far as I know compound indexes are optimizable as long as the left side of the expression exactly matches the index expression.
>
>e.g.
>LOCATE FOR Groupname + TRANSFORM(lgroup,"Y") = "SomeGroupName"
>
>should be optimized in the above example.
That's what I hoped to hear :) Let's wait for Larry response. He even was incorrect in his above statement or I interpreted it wrong. It would be a real disaster, if his statement is a true statement :)
If it's not broken, fix it until it is.
My Blog