Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
What is better and faster
Message
 
 
À
19/01/2005 04:32:45
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:
00978527
Vues:
38
>First off: I believe if you set ansi off, the results should be different, so any comparison might be unfair just on the number of returned values for index expressions and the resulting data set - but I am a bit blurry at the moment from not enough sleep<g>.
>
>
>select ... from ... where cl_name =="GREE" and cf_name == "MAR" and cM_Initial == ""
>should be equal to
lcName = padr("GREE",25,"_") + padr("MAR",20,"_")+padr("",1,"_")
>select ... from ... where cl_name + cf_name + cm_Initial == m.lcName
>
Hi Tomas,

First of all, you're a little bit mistaken. If I use underscore "_", the two expressions are different. They would we the same, if I use space.

Secondly, I wanted to search by part of the name, that's why I used SET ANSI OFF. But since LIKE clause is fully optimized in VFP9 with % I may want to use it and this way my view would be SQL Server compatible...

We found few bugs in VFP9, but we hadn't chance to test, if they are VFP9 bugs or Mere Mortals related. So I am not sure when we're going to switch to 9 but hopefully soon.

>If your table is non-trivial, always include the MDot: it gets searched for every record.

I personally always use mdot out of the habit I got from my prev. work by adapting Mike's Asherman coding style, which I liked very much. I probably didn't put it here because it was just an example.

>For measuring "targeted" speed differences I'ld recommend putting the table and index onto another computer with a bottleneck connection: either use an old 10 MBit hub or serial connection to simulate a busy LAN - Probably then the second version will be faster if the table has many records. If speed is of utmost importance for this, also try out seek / scan while.
>
>my 0.02 EUR
>
Thanks again.
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform