Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Is there another way to index a table?
Message
From
21/05/1999 08:06:46
 
 
To
21/05/1999 07:27:09
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00221286
Message ID:
00221301
Views:
12
>Is there another way to index a table with
>using INDEX ON my_fld TO inx_name?
>
>I want to ORDER BY a group of records
>that are contained in a filter using SET FILTER TO something.
>I do not want to use INDEX TO or the SELECT statement.
>Any ideas?

You have a bunch of options:

(1) You can add a FOR clause to an index to filter the set of records available when that index is active. While the index can't be used for Rushmore optimization, it does provide the fastest sorted, filtered access to a table on a record by record basis without using a SQL Select to extract a cursor. Since the index only contains the records meeting the conditions of the FOR clause, you don't have the horrid performance hit moving from one filtered record to the next for a non-optimizable filter condition. Filtered indexes can be either standalone .IDX files or tags in a .CDX file.

(2) You can extract a set of records using the SORT verb, with the same type of FOR statement. SORT will respect any filters set on the file at the moment. I see no advantage to this over a SQL Select, but whatever trips your trigger...

(3) You can use a parameterized view to access the filtered subset of records; once you're using a parameterized view, you can index the view if necessary. If you set up the view properly, you can make changes to the view and update the table from the view.
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform