Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
INDEX ON ... THEN ... TAG
Message
From
22/07/2020 11:20:43
 
 
To
22/07/2020 09:18:40
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
01675315
Message ID:
01675324
Views:
78
>
INDEX ON iKeyField THEN cLastName, cFirstName TAG main
>
By storing only iKeyField keys in the index, you'd do a binary search to find the key in the CDX, and then a second binary search to drill-down in the data for the THEN clause (which requires navigating the table in index order (over that key range) effectively, which you could do a second binary search on).

The THEN feature would add some slowness in updating keys, and it could be enabled or disabled with a SET THEN ON|OFF for bulk operations or when you know a hard REINDEX is coming, but if your goal is compactness or simplicity or if you have a read-only data set that you want in some particular viewing order within, it would speedup SQL queries which contain those order by fields, for example.
Previous
Reply
Map
View

Click here to load this message in the networking platform