Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Indexing on multiple fields...
Message
From
09/10/2002 15:47:16
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00709355
Message ID:
00709497
Views:
12
Hello Doru,

>>
>>index on cfield1+dtos(dfield2) tag tag2
>>
>>Creating an index tag containing more than one field does not help for Rushmore purposes. If you need to run queries that involve these fields in the WHERE clause, you need an index on each indivual field for Rushmore to kick in (with regards to those fields).
>
>Are you sure about that? I believe that if you use the exact index expression in the WHERE you get full optimization.

Hmmm...good point. I don't tend to concatenate fields together in the where clause. I suppose you mean like:
select * from table1 where cfield1+dtos(dfield2)="abcd1   "+dtos(date())
I guess this would be optimized (maybe someone will chime in), given the above index expression. I would normally construct the query like the following, which would require a separate index on each field:
select * from table where cfield1="abcd1" and dfield2=date()
Steve Gibson
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform