Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Total of records after delete
Message
 
 
À
10/12/2009 11:39:13
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01438395
Message ID:
01438426
Vues:
43
>They are very small records. So 20 thousand records in
>a database running in a very powerfull machine that's
>not a problem these days.
>All operations I've done in the database are returned in
>some miliseconds.
>But, anyway, I will do some tests to check performance.
>Thanks!
>
I ran some tests and you're right, for 20K records the performance difference is negligible. For 200K records the performance difference is more pronounced.

Here is my test program
CLEAR ALL

LOCAL lnSeconds, lnRecords, lnI

CREATE CURSOR curTest (RecNum int, charfield C(30))

FOR lnI = 1 TO 300000
  INSERT INTO curTest VALUES (m.lni, PADR(m.lnI,30,'0'))
NEXT

DELETE FOR RecNum >200000

SET DELETED ON

SYS(1104)
lnSeconds = SECONDS()
SELECT COUNT(*) FROM curTest INTO ARRAY laTest
lnRecords = laTest[1]
RELEASE laTest

?'Select COUNT(*): ', SECONDS()-m.lnSeconds  

SYS(1104)
lnSeconds = SECONDS()
LOCAL lnSelect
lnSelect = SELECT()
SELECT curTest
COUNT TO lnRecords
SELECT (m.lnSelect)
RELEASE m.lnSelect
?'Change Area and COUNT: ',SECONDS()-m.lnSeconds

SYS(1104) 
lnSeconds = SECONDS()
SELECT 1 FROM curTest TO SCREEN noconsole
lnRecords = _tally
?'Select to screen: ', SECONDS()-m.lnSeconds  
CLOSE all
If it's not broken, fix it until it is.


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

Click here to load this message in the networking platform