Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Interesting result
Message
 
À
03/10/2013 12:20:25
Mike Yearwood
Toronto, Ontario, Canada
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01584697
Message ID:
01584740
Vues:
65
>>I have found that "" will match almost anything when comparing. So I either use
>>
>>!EMPTY() .AND. next_condition...
>>
>>or, I use the == comparison operator...
>
>EMPTY() is not Rushmore optimizable unless you add indexes on EMPTY() which is a bad idea because their selectivity is low.
>
>== is best. For instance you can use upper(alltrim(field))=="" to find all records with empty(field). It works in both SQL and Rushmore.
>
>I only use empty() if I am not doing anything involving rushmore or sql.

Are you sure upper(alltrim(field))=="" is Rushmore optimizable? Wouldn't you need an index on upper(alltrim(field)), which is a bad idea anyways? I use field == space(len(field)) instead of empty() to get optimization.
"The five senses obstruct or deform the apprehension of reality."
Jorge L. Borges?

"Premature optimization is the root of all evil in programming."
Donald Knuth, repeating C. A. R. Hoare

"To die for a religion is easier than to live it absolutely"
Jorge L. Borges
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform