Re: Inquiry About Determining Parallel Plans for REFRESH MATERIALIZED VIEW

From: Zhang Mingli <zmlpostgres(at)gmail(dot)com>
To: Yugo Nagata <nagata(at)sraoss(dot)co(dot)jp>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Inquiry About Determining Parallel Plans for REFRESH MATERIALIZED VIEW
Date: 2025-01-16 07:05:22
Message-ID: df288329-1e2e-4fc2-9b20-c91f3a195036@Spark
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi

Zhang Mingli
www.hashdata.xyz
On Jan 16, 2025 at 14:04 +0800, Yugo Nagata <nagata(at)sraoss(dot)co(dot)jp>, wrote:
>
> You will be able to log the plan during the REFRESH by using auto_explain and setting
> log_analyze and log_nested_statements to on.

Hi Yugo,

Thank you for your help! That’s certainly a viable approach to logging the plan during the REFRESH operation.
However, I want to clarify that we’re particularly interested in examining the SQL cases. When there are numerous queries that may also include REFRESH, it can be challenging to sift through the logs and identify the specific query we want to analyze using SQL.

Ideally, it would be beneficial if we could obtain an explanation of the SQL associated with a REFRESH command, allowing us to see the SELECT plan without having to execute the REFRESH itself.
We could limit EXPLAIN utility command to only REFRESH , on the AS SELECT part, similar to how we can with CREATE TABLE AS, is it possible and worthwhile?

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Nisha Moond 2025-01-16 07:07:18 Re: Introduce XID age and inactive timeout based replication slot invalidation
Previous Message Nisha Moond 2025-01-16 07:05:16 Re: Introduce XID age and inactive timeout based replication slot invalidation