Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Total of records after delete
Message
 
 
À
10/12/2009 12:07:51
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:
01438430
Vues:
37
>>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
>>
>
>
>Don't forget to Set Talk Off for "'Change Area and COUNT'"

Good point - I'm getting consistent winner of change area and count.

I guess it would probably make sense to open multiple tables to make this test program more real life...
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