Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to clear firebird query cache?

How do I clear the firebird query cache to execute my performance tests ?

The example in SqlServer here

Tks

like image 701
Rodrigo Farias Rezino Avatar asked Oct 07 '22 20:10

Rodrigo Farias Rezino


1 Answers

Andrei is correct -- Firebird heavily relies on the OS file system cache. Firebird will cache a small amount of pages internally (check the buffers property on your database) however it's generally a very small amount of data. Classic defaults to something like 75 pages? I've seen suggestions of about 1000 pages elsewhere, which comes out to 8 or 16 MB depending on page size.

In lieu of restarting the OS to clear the file system cache, you could put your database on its own mount. Then to completely clear the cache you could stop Firebird, unmount/mount the partition and start Firebird again. That would invalidate the file system cache.

This shouldn't be too painful -- unlike other databases, Firebird does not have to scan the data files on start and replay transactions in a transaction log. The translation log is essentially combined with the data file by using careful writes.

like image 105
nater Avatar answered Oct 10 '22 01:10

nater