pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Philip Semanchuk <philip@americanefficient.com>
Cc: Vijaykumar Jain <vijaykumarjain.github@gmail.com>
Cc: PostgreSQL General <pgsql-general@lists.postgresql.org>
Subject: Re: CREATE/REFRESH MATERIALIZED VIEW planner difference?
Date: Tue, 01 Jun 2021 14:51:05 -0400
Message-ID: <2847072.1622573465@sss.pgh.pa.us> (raw)
In-Reply-To: <B0F16A2D-25EC-4EFE-8F51-1ADAFF07E47B@americanefficient.com>
References: <A1370D92-8261-4FE2-9C4D-DC06EFF2C88C@americanefficient.com>
	<CAM+6J951DRJDRYC-78YaN9ak38SpVxmw2a6FtL9rTFjYesDT7w@mail.gmail.com>
	<B0F16A2D-25EC-4EFE-8F51-1ADAFF07E47B@americanefficient.com>

Philip Semanchuk <philip@americanefficient.com> writes:
> I can confirm that it’s not waiting on a lock. In addition, through the AWS CPU utilization monitor I can see that the REFRESH uses one CPU/worker whereas the CREATE uses four. This is consistent with the EXPLAIN ANALYZE for the CREATE which says it uses four workers.

Hm.  I tried to reproduce this here, and in a simple test case I get
parallelized plans for both CREATE and REFRESH.  Are you sure the
REFRESH is running with the same server parameter settings?

>> also, can you share the plans  where you see the diff.

> Unless I misunderstand, there is no plan for a REFRESH.

EXPLAIN isn't bright about that, but if you enable auto_explain,
it will log the plan for a REFRESH's query.

			regards, tom lane





view thread (8+ messages)  latest in thread

Message-ID: <2847072.1622573465@sss.pgh.pa.us>
Permalink:  ../2847072.1622573465@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/2847072.1622573465@sss.pgh.pa.us

 · 

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: tgl@sss.pgh.pa.us, philip@americanefficient.com, vijaykumarjain.github@gmail.com
  Subject: Re: CREATE/REFRESH MATERIALIZED VIEW planner difference?
  In-Reply-To: <2847072.1622573465@sss.pgh.pa.us>
  References: <A1370D92-8261-4FE2-9C4D-DC06EFF2C88C@americanefficient.com> <CAM+6J951DRJDRYC-78YaN9ak38SpVxmw2a6FtL9rTFjYesDT7w@mail.gmail.com> <B0F16A2D-25EC-4EFE-8F51-1ADAFF07E47B@americanefficient.com> <2847072.1622573465@sss.pgh.pa.us>

* 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