Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
What are the best indexes to have for a filter ?
Message
From
11/01/2005 06:40:02
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
00975956
Message ID:
00975974
Views:
10
Yes, you will not need the combined index.

If you must set a filter which can not be completely optimized, it's important to put the search criteria which can be optimized first. Here are a few examples of searchec which can be optimized:

SET FILTER TO Department=cDep and Section=cSec and Unit=cUnit
SET FILTER TO Department=cDep and ((Section=cSec and Unit=cUnit1) or (Section=cSec and Unit=cUnit2))
SET FILTER TO Department=cDep and Section=cSec and (Unit=cUnit1 or Unit=cUnit2)
SET FILTER TO (Department=cDep1 and Section=cSec1 and Unit=cUnit1) or (Department=cDep2 and Section=cSec2 and Unit=cUnit2)


>Ok so i will create three separate index tags. Does this mean i do not need an dditional index which has the 3 fields concatenated together (department+section+unit) ?
>
>What do you mean by examples of records ? You want to know the fields or the data in the table ?
>
>Thanks again
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform