Hi
Sometimes I need to do some SQL tuning task, I usually do such tests on my test db.
After I excute a sql statments, I want to flush the buffer cache which containing SQL
statements and sql result, just like the command in Oracle "Alter system flush buffer_cache"
Is PG server provide a commond of this?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
Check out this SO answer,
See and clear Postgres caches/buffers?
回答2:
If you're developing on OSX (I haven't tested on linux), you can use purge
command to force disk cache to be purged (flushed and emptied). Then run your SQL query again and it should execute as if it were the first time.