Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Which Is Better???
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00458477
Message ID:
00458501
Vues:
23
>>>>I am updating a series of PRG's to optimize them for speed and to get them ready to convert into classes.
>>
>>>FWIW, to make the statement fully optimzable, go back to the space(10) option and change the $ code to:
>>>NOT (Cdm.new_cpt = "Q" OR Cdm.new_cpt = "H" OR Cdm.new_cpt = "Z")
>>
>>NOT INLIST(SUBSTR(Cdm.New_cpt, 1, 1), "Q", "H", "Z") is optimizable, easy to read, and easy to add new codes to. If EXACT is ON you will need to use SUBSTR().
>
>Or LEFT(). I think that would be faster than SUBSTR() since only one parameter has to be evaluated.

OK, OK, uncle. :-) I forgot about Inlist(). However, in order for inlist to be optimizable, I think the underlying function needs to optimzable. Both Left() and Substr() would have to have an index built on them in order to be optimzable.

And yes I also forgot about the Set Exact settings. However, since I never use SET EXACT ON, I wasn't worried about it. I use == if I want an exact match.

FYI, Jim Booth wrote an article in the June issue of FoxTalk explaing far more eloquently than I why this is a good idea. If you don't have the hard copy, it's available for on-line subscribers.
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform