Re: Performance degradation of REFRESH MATERIALIZED VIEW

From: Andres Freund <andres(at)anarazel(dot)de>
To: Tomas Vondra <tomas(dot)vondra(at)enterprisedb(dot)com>
Cc: Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>, Michael Paquier <michael(at)paquier(dot)xyz>, Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>, Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Pavan Deolasee <pavan(dot)deolasee(at)gmail(dot)com>, Anastasia Lubennikova <a(dot)lubennikova(at)postgrespro(dot)ru>, Jeff Janes <jeff(dot)janes(at)gmail(dot)com>, Paul Guo <guopa(at)vmware(dot)com>
Subject: Re: Performance degradation of REFRESH MATERIALIZED VIEW
Date: 2021-05-18 18:44:30
Message-ID: 20210518184430.syeg6wqre6uh65q6@alap3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On 2021-05-18 20:34:08 +0200, Tomas Vondra wrote:
> Yeah, I see your point. I agree it's unfortunate there's no way to disable
> freezing during REFRESH MV. For most users that trade-off is probably fine,
> but for some cases (matviews refreshed often, or cases where it's fine to
> pay more but later) it may be an issue.
>
> From this POV, however, it may not be enough to optimize the current
> freezing code - it's always going to be a bit slower than before.

But the intrinsic overhead is *tiny*. Setting a few bits, with the other
costs amortized over a lot of pages. As far as I can tell the measurable
overhead is that the increased WAL logging - which is not necessary.

Greetings,

Andres Freund

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2021-05-18 18:57:19 Re: Performance degradation of REFRESH MATERIALIZED VIEW
Previous Message Tomas Vondra 2021-05-18 18:43:41 Re: Performance degradation of REFRESH MATERIALIZED VIEW