Re: GROUP BY ROLLUP queries on views trigger full table scans (index usage not optimized) - Mailing list pgsql-bugs

From Richard Guo
Subject Re: GROUP BY ROLLUP queries on views trigger full table scans (index usage not optimized)
Date
Msg-id CAMbWs4911OFJSybB73rkxfV5L7H+XB1YG-vnAhN1wdQE=4-jYQ@mail.gmail.com
Whole thread Raw
In response to Re: GROUP BY ROLLUP queries on views trigger full table scans (index usage not optimized)  (Richard Guo <guofenglinux@gmail.com>)
Responses Re: GROUP BY ROLLUP queries on views trigger full table scans (index usage not optimized)
List pgsql-bugs
On Thu, Dec 18, 2025 at 5:56 PM Richard Guo <guofenglinux@gmail.com> wrote:
> Upon closer look, it seems that we do not need the syntactic scope
> check at all, as long as we ensure that phnullingrels is empty.  In
> this case, the PHV is either a no-op (from a reduced outer join) or
> used for identity separation (grouping sets).  In either case, the PHV
> is transparent regarding the value, so it should not prevent the
> underlying expression from matching the index.

Here is the updated version along the lines of this idea.

- Richard

Attachment

pgsql-bugs by date:

Previous
From: Richard Guo
Date:
Subject: Re: BUG #19353: Error XX000 if referencing expanded array in grouping set: variable not found in subplan target list
Next
From: Amit Langote
Date:
Subject: Re: BUG #19355: Attempt to insert data unexpectedly during concurrent update