Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
UDF's second rate citizen in Rushmore ?
Message
De
19/09/2006 13:29:59
 
 
À
19/09/2006 12:56:52
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
01151219
Message ID:
01155176
Vues:
54
>>T1=SECONDS()
>>? "BAD: this uses TFF1 and is optimized"
>>SELECT count(FF) FROM ALIAS() INTO ARRAY AX
>>? SECONDS()-T1
>
>Does it really make use of TFF1? optimizing Count() can be done if rushmore sees, that the count() is equal to reccount(). Due To SET DELETED OFF that is valid, as there is no filter in effect. So I think this time rushmore in fact uses the reccount() stored in the table header to optimize the query, not an index.
>
>Bye, Olaf.

You are correct, but it still BAD because RECCOUNT() is an optimization also it:
CREATE CURSOR cc (ff i)
DIMENSION AX[1000000,1]
APPEND FROM ARRAY AX
INSERT INTO cc VALUES (2)

CLEAR

SET DELETED OFF
T1=SECONDS()
* THIS uses RECCOUNT()
COUNT
? SECONDS()-T1

T1=SECONDS()
* THIS don't uses RECCOUNT()
CALCULATE CNT()
? SECONDS()-T1

T1=SECONDS()
* THIS uses RECCOUNT()
SELECT count(*) FROM ALIAS() INTO ARRAY AX
? SECONDS()-T1
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform