KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: The Value of FLUSH BUFFERS(*)
PRODUCT: 4D | VERSION: 11.5 | PLATFORM: Mac & Win
Published On: June 17, 2011

In 4D v11 SQL Release 5 the FLUSH BUFFERS command was enhanced to accept a * parameter.

This feature is not useful in a general case, but can be useful for troubleshooting. This causes FLUSH BUFFERS to not only perform its normal flush operation but also to perform a purge of the cache.

In the ideal, normal situations this command is totally unnecessary as 4D manages the purging automatically. However if problems are suspected this command provides some extra insight:

  • If, after the command executes, the used cache is 0 (or near 0) this indicates that the cache is healthy since most objects could be purged.
  • If, after the command executes, the used cache is not near 0 (and no other operations are occurring that might be refilling the cache) this indicates that some objects could not be purged from the cache. This could indicate a problem

Thus FLUSH BUFFERS(*) can be useful for checking the "health" of the cache.

USE CAUTION: after purging the contents of the cache it must be refilled with data again if the database is in use so performance may suffer after the purge.

Note: This command should be executed on the server.

See Also: