Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Index optimizing in SP1
Message
General information
Forum:
Visual FoxPro
Category:
Visual FoxPro Beta
Title:
Index optimizing in SP1
Miscellaneous
Thread ID:
01059937
Message ID:
01059937
Views:
57
It looks like this was supposed to be fixed in SP1, "Indexes on STR() are penalized during Rushmore optimization if SET ANSI is OFF". Unfortunately, we're still seeing the same problem. We've got a 400MB table that has this index:
STR(VAL(CUST_NUM), 8) + SYS(11, TRANS_DATE)
Under VFP 8, this query is optimized:
SELECT * ;
  FROM custhist;
 WHERE STR(VAL(cust_num), 8)+SYS(11, TRANS_DATE) = "633621"    
Under VFP 9, even with the SP1, we don't get any optimization. Under VFP 8 we do.

It's easy enough to reproduce, try these in both VFP 8 & VFP 9:
SYS(3054, 11)
CREATE TABLE c:\testopt (cust_num C(8), trans_date D)
INDEX ON STR(VAL(CUST_NUM),8)+SYS(11,TRANS_DATE)  TAG custhist
SELECT * ;
  FROM testopt;
 WHERE STR(VAL(cust_num),8)+SYS(11,TRANS_DATE) = "  633621"
-Paul

RCS Solutions, Inc.
Blog
Twitter
Next
Reply
Map
View

Click here to load this message in the networking platform