Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
What is better and faster
Message
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Divers
Thread ID:
00977833
Message ID:
00978358
Vues:
32
>Our tests showed partial optimization for LIKE clause and full optimization for =. Now, I thought I read somewhere that VFP 9 has full optimizable LIKE, but I don't remember, where I read it, so do not know, if it's true.

The LIKE operator in the form LIKE "sometext%" is partialy optimized in VFP8 and fully optimized in VFP9 with proper indexes.
CREATE CURSOR test (fld1 C(10), fld2 C(10))
INDEX ON fld1 TAG fld1
INDEX ON DELETED() TAG Deleted
lcTxt = ""
SYS(3054,11, "lcTxt")
SELECT * FROM test ;
	WHERE fld1 LIKE "A%" ;
	INTO CURSOR test1

* Results
* VFP8
Using index tag Fld1 to rushmore optimize intermediate result
Using index tag Deleted to rushmore optimize intermediate result
Rushmore optimization level for intermediate result: partial
* VFP9 
Using index tag Fld1 to rushmore optimize intermediate result
Using index tag Deleted to rushmore optimize intermediate result
Rushmore optimization level for intermediate result: full
>I used SET ANSI OFF in order to use =, but I belive, it makes now everything not generic, since other back-ends use ANSI ON. So, it looks like I have to use LIKE clause if I want to easy switch back-end.
>
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform