Skip to main content

Is it possible to somehow remove cache before a query execution?

  • August 15, 2013
  • 5 replies
  • 2 views

Adam_Štěpánek01
This might a be a bit weird question but I am trying to measure the performance of Vertica against other database systems and other utilities in a specific application area. This measurement involves executing four different queries, each of them on basically the same data but with different scope. What I am trying to achieve is to execute each of them as if it was ad-hoc and no cache was involved in the process. In other words, it is clear that if I execute a query on a half of the rows of the table and consequently on the whole table, the second one will take comparatively less time. Is it possible to avoid this? Is it possible to somehow erase the cache before a query execution? Thank you. Adam

5 replies

Sharon_Cutter
Forum|alt.badge.img
  • Participating Frequently
  • August 15, 2013
There's information on clearing both the Vertica caches and the file system caches in the CLEAR_CACHES() section of the SQL Reference Manual. --Sharon

Bhawana
Forum|alt.badge.img
  • Participating Frequently
  • August 15, 2013
Hi Adam, Please run select clear_caches(); Thanks Bhawana

Adam_Štěpánek01
Perfect. Thank you both.

verticauser810
Forum|alt.badge.img
  • Participating Frequently
  • May 11, 2021

I did not find information on what cache the CLEAR_CACHES() function affects. What is being cached in that cache?


Jim_Knicely
Forum|alt.badge.img+2
  • Participating Frequently
  • May 11, 2021

The Vertica internal cache stores the decompressed blocks from disk (i.e. the ROS cache)