Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Creating a temporary index?
Message
From
03/02/2000 11:25:27
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00325425
Message ID:
00326696
Views:
16
>>I'm creating an add-on VFP application to a FoxPro for Windows app. As part of it, I need to create a new index in the FoxPro Windows table. Can I create a temporary index? i.e. INDEX ON field1 + field2 to TEMP. Then at the form exit, erase the index.
>>
>>TIA
>
>Hi Ellen,
>
>Yes, you can. It will be standalone .IDX and you can delete it with no problems.

Another option is a .cdx (which can hold more than one tag), just make it have a different name from its table, like

INDEX ON field1 + field2 TAG TEMP of Whatever
INDEX ON field3 TAG TEMP2 of Whatever

it will create whatever.cdx with these two tags. This .cdx is independent from the table, i.e. it won't open automatically, and the table doesn't know it exists, so you will have to recreate it next time you want to use it, or Set Index To Whatever.cdx (and hope they're still in sync).

A standalone .idx uses old indexing techniques (as of 10 years ago) unless you add the keyword COMPACT - which uses the CDX technique on .idx files, making them slightly slower to create, but several times faster when used for selects and other stuff. Reminder: all these indexes will be used by the next Rushmore-izable operation, if Rushmore decides it may like them :)

[This was just a reminder for general use, because it seems like a thing that everyone's supposed to know, but then nobody's using it. Thanks for hosting, Nick]

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform