Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Group By Example in VFP 8
Message
De
23/07/2004 16:25:31
Luis Navas
Independent Consultant
Auckland, Nouvelle Zélande
 
 
À
23/07/2004 06:42:22
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00926827
Message ID:
00927457
Vues:
14
Thanks a lot.
Luis
>
>Thanks Fabio, just one question why should I Change This.Cajafecha2.Value with a variable?
>Luis
>

>
>Because VFP can reevaluate the property many times,
>and this is very slow
>
>
>CLEAR
>CREATE CURSOR myCursor ( f1 I)
>FOR k=1 TO 1000
>	INSERT INTO myCursor VALUES (RECCOUNT())
>NEXT
>INDEX ON f1 TAG f1
>x=CREATEOBJECT('myObject')
>x.myProperty	= 33
>* with a index
>x.AccessCount	= 0
>SELECT * INTO CURSOR TEMPORARY FROM myCursor WHERE F1=M.X.myProperty
>? "Accesses with Index :",m.x.AccessCount
>USE
>* without index
>x.AccessCount	= 0
>SELECT * INTO CURSOR TEMPORARY FROM myCursor WHERE F1+0 = M.X.myProperty
>? "Accesses without Index :",m.x.AccessCount
>
>DEFINE CLASS myObject AS Custom
>	myProperty = 0
>	AccessCount = 0
>	PROCEDURE myProperty_Access
>		this.AccessCount = m.this.AccessCount + 1
>		RETURN m.this.myProperty
>	ENDPROC
>
>ENDDEFINE
>
I never forget a face, but in your case I will make an exception :-)
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform