Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Index optimizing in SP1
Message
From
18/10/2005 12:43:40
 
General information
Forum:
Visual FoxPro
Category:
Visual FoxPro Beta
Miscellaneous
Thread ID:
01059937
Message ID:
01059953
Views:
17
>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"
>
Not tested, but what about this index expression as a workaround:
INDEX ON PADL(TRANSFORM(CUST_NUM),8)+SYS(11,TRANS_DATE)  TAG custhist
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform