pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Philip Semanchuk <philip@americanefficient.com>
To: PostgreSQL General <pgsql-general@lists.postgresql.org>
Subject: CREATE/REFRESH  MATERIALIZED VIEW planner difference?
Date: Tue, 1 Jun 2021 14:00:16 -0400
Message-ID: <A1370D92-8261-4FE2-9C4D-DC06EFF2C88C@americanefficient.com> (raw)

Hi all,
Should I expect a planner difference between CREATE MATERIALIZED VIEW and REFRESH MATERIALIZED VIEW? We have a materialized view that uses 4 workers during CREATE but only one worker during REFRESH, and as a result the refresh takes much longer (~90 minutes vs. 30 minutes for the CREATE). So far this behavior has been 100% consistent.

I'm running both the CREATE and REFRESH on the same server (Postgres 11.9 on AWS Aurora). I don't think the refresh is using one worker in response to other things happening on the server because we’ve observed this happening when the server is not busy. We're not using the CONCURRENTLY option for REFRESH.

THanks
Philip




view thread (8+ messages)  latest in thread

Message-ID: <A1370D92-8261-4FE2-9C4D-DC06EFF2C88C@americanefficient.com>
Permalink:  ../A1370D92-8261-4FE2-9C4D-DC06EFF2C88C@americanefficient.com/
Also on:    postgresql.org/message-id/A1370D92-8261-4FE2-9C4D-DC06EFF2C88C@americanefficient.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: philip@americanefficient.com
  Subject: Re: CREATE/REFRESH  MATERIALIZED VIEW planner difference?
  In-Reply-To: <A1370D92-8261-4FE2-9C4D-DC06EFF2C88C@americanefficient.com>
  References: <A1370D92-8261-4FE2-9C4D-DC06EFF2C88C@americanefficient.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox