Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Foxpro database and speed
Message
De
26/02/2004 05:24:32
 
 
À
25/02/2004 15:07:31
Mike Yearwood
Toronto, Ontario, Canada
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00880597
Message ID:
00881012
Vues:
23
Hi Mike,

Besides, I've often found when putting a form property, like "thisform.cUserId", into an SQL query, the query fails, doesn't recognise the property. In those cases I've often had to set a local var to the prop first.

By the way, in my message I meant "hierachical reference to the property".

I'm interested in your analysis and tests. What exactly do you mean by "access method" - a method that fires when the property is accessed? It's a good tip to look out for in future.

Nice one

By the way, again, I can't run this query at all as I'm not the thread initiator :-)

Terry

>Hi Terry
>
>Absolutely right!
>
>To really show the danger of this technique, run the query and time it. Then add an access method to the .value property of the pcode_n10 class. Run the queries again. Someone could innocently add an access method to the class and the whole system could slow down. In my tests (just adding an access method to a form property) the query times inflated from .38 seconds to 2.4 seconds. That's with nothing firing in the access method.
>
>>Denis,
>>
>>I'd guess it's because VFP doesn't have to look up the hierachical reference to the var, for each record it "inspects" during the SQL. Instead it has a memory var "to hand"
>>
>>Terry
- Whoever said that women are the weaker sex never tried to wrest the bedclothes off one in the middle of the night
- Worry is the interest you pay, in advance, for a loan that you may never need to take out.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform