Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Optimizing a Select Distinct
Message
From
15/11/2006 07:31:22
Walter Meester
HoogkarspelNetherlands
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 8 SP1
Miscellaneous
Thread ID:
01169351
Message ID:
01169769
Views:
10
Hi Ben,


>Hi Walter,
>
>Your (and Thomas') suggestion is much faster than a "Select Distinct ..." but still takes some time for a large master table. To get almost instant response, "Index On...Unique" is the only way to go.

Which I was suggesting in my origninal email


>>If you are not deleteing from this table, you can also use a unique index and set the order to that and scan trough it.

>>If the periods are months for exaple and there are not to many distincs periods posible, you could also enumerate through the posible periods and use a KEYMATCH() or SEEK() to see whether that period has been recorded.

Walter,
Previous
Reply
Map
View

Click here to load this message in the networking platform