Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Total of records after delete
Message
 
 
To
10/12/2009 12:07:51
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01438395
Message ID:
01438430
Views:
38
>>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform