Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SET FILTER TO
Message
De
04/04/2018 10:33:26
Metin Emre
Ozcom Bilgisayar Ltd.
Istanbul, Turquie
 
 
À
28/03/2018 11:59:45
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
01659042
Message ID:
01659139
Vues:
46
Creating an index with status won't help with IIF(INLIST(state, "AZ", "TN", "WI", "TX", "KY", "FL"), unit+DTOS(dob), "!" + Space(10)) != "!" part.

If I were Sandy and select sql wasn't an option I would be create an index like :
index on tran(Id)+ssn+status+unit+DTOS(dob)

and then:
set key to "5321"+"333224444"+"OUT"

This will be fast (I would be some mistake(s) with creating index but point is that: create correct complex index and set key will be so fast. set filter works every time but would be misses index sometimes because of logic).

>>Hello.
>>Lets say I have a SET FILTER TO... statement such as
>>
>>SELECT client
>>SET FILTER TO Id = 5321 and SSN = "333224444" and status = "OUT" and IIF(INLIST(state, "AZ", "TN", "WI", "TX", "KY", "FL"), unit+DTOS(dob), "!" + Space(10)) != "!"
>>
>>I'm new to VFP. But, I don't know anyone who would write something like this. But I found this line in one of our PRGs.
>>I think this is slowing our calculation process.
>>
>>All the fields are indexed except for STATUS and STATE.
>>What I want to know is will indexing STATUS and STATE fields help speed this up?
>>
>>TIA.
>
>Yes, since both Status and State are mentioned in the Set Filter line, index tags on these fields will speed things up. But be aware that you should only index them ONCE, and never again. Like this:
>
>
Use Client exclusive
>Index on Status tag Status
>Index on State tag State
>These lines will create (or add to) a file called Client.cdx, and this file will be automatically "used" and updated hereafter.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform