CREATE/REFRESH MATERIALIZED VIEW planner difference?

From: Philip Semanchuk <philip(at)americanefficient(dot)com>
To: PostgreSQL General <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: CREATE/REFRESH MATERIALIZED VIEW planner difference?
Date: 2021-06-01 18:00:16
Message-ID: A1370D92-8261-4FE2-9C4D-DC06EFF2C88C@americanefficient.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Vijaykumar Jain 2021-06-01 18:20:33 Re: CREATE/REFRESH MATERIALIZED VIEW planner difference?
Previous Message Swathi P 2021-06-01 15:09:39 Re: Query on postgres_fdw extension