Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Seek index help needed
Message
From
14/12/2001 11:45:58
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00594481
Message ID:
00594482
Views:
23
>Hello...
> I have a very large table with three fields, SSN(C), enter_date (datetime) and complete (logical). I am wanting to build an index which would provide the fastest performance with the seek command. My goal is to locate any matching social security numbers, with a complete file (.t. in complete) that have already had an application entered within the past 90 days using enter_date. (There could be more than 1.)
>Any suggestions?
>
>Thanks very much for your time.

You could create a combined index:
index on ssn + iif(complete, "1", "0") + str(enter_date - {^1900-01-01}
Or exclude the iif(complete), and use a filtered index.

HTH, Hilmar.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Reply
Map
View

Click here to load this message in the networking platform