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

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

Comments

  • 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
  • Hi Adam, Please run select clear_caches(); Thanks Bhawana
  • Perfect. Thank you both.
  • verticauser810verticauser810 Vertica Customer

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

  • Jim_KnicelyJim_Knicely - Select Field - Administrator

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

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Emoji
Image
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file