Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
The mean of FLUSH
Message
From
27/04/2003 23:15:13
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
27/04/2003 23:10:25
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00782079
Message ID:
00782087
Views:
17
>>I agree it is a hassle.
>>
>>But under what circumstances would you suggest that it be done automatically? TableUpdate()? Or REPLACE if you don't use buffering?
>
>I'm not talking about buffering at all. This has been the case since many versions of VFP. FLUSH was introduced to allow the cache to be written to disk. I basically don't understand why VFP would create a cache instead of just putting it directly on disk. Some might say it provides a performance issue. But, I'd say that with the product we have now, there shouldn't be any difference if that would be direct.

Precisely without buffering, there might very well be a performance penalty.

Consider this case:
APPEND BLANK
REPLACE Field1 with Value1
REPLACE Field2 with Value2
REPLACE Field3 with Value3
FLUSH
With an implicit FLUSH, each separate REPLACE command would write to disk separately - and that would be much slower than writing to disk thrice, once for each REPLACE command.

Of course, I know that the three REPLACE commands can be combined into one - but do all programmers do this?
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform