> On Aug 21, 2022, at 12:55 PM, Kenny Bachman <kenny.bachman17@xxxxxxxxx> wrote: > > How can we explain the cache doesn't work as expected? I mean, I expect more performant the second or third time running because of the cache. However, every time I run it I get the same exec time value. Take a look at system paging activity, and at pg IO waits. (For the latter, I think you have to enable tracking in postgresql.conf.) Also take a peek at CPU usage--if cache is doing what you expect here, then CPU should go to 100% on one or more cores.