Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Performance in network
Message
From
03/01/2001 13:11:55
 
 
To
03/01/2001 06:17:52
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00458442
Message ID:
00459001
Views:
27
>
>Table Name: Member
>1. Card_No
>2. Name
>3. Address
>4. Zip Code
>Indexes:
>1. PCard_No                    Card_No                   Primary
>2. Card_Type                   LEFT(Card_No, 3)          Regular
>3. Card_No                     Card_No                   Regular

>SQL:
>SELECT Card_no, Name, Address ;
>FROM Member ;
>WHERE LEFT(Card_NO, 3) = tcCardType ;
>INTO CURSOR mymember
>
There are many deleted records? You can try adding another tag:
index on deleted() tag deleted

Anyway, the difference seems to big to be this problem. If you're working with directly with VFP tables (not views), and your parameter tcCardType is already 3 characters long (else you can force it), you can discard the Card_Type tag and use:

>
>SQL:
>SELECT Card_no, Name, Address ;
>FROM Member ;
>WHERE Card_NO = tcCardType ;
>INTO CURSOR mymember
>
As you have an index on Card_no, it will be optimized, and you'll have the same results if you have SET EXACT OFF.

Try this and tell me what happens.

Good luck.
Previous
Reply
Map
View

Click here to load this message in the networking platform