I was able to significantly speed up a query that looks something as follows:
WITH MATERIALIZED t1 as (
SELECT x1, x2 from v1 where v1.id = :id
) select * from t1
Here, v1
is a view (unmaterialized). My question, where is the materialized result of t1
stored? Is it stored in buffer cache or disk? I'm concerned about computing several materialized versions of t1
for different values of id
and polluting my buffer cache or OS cache.