Re: Redundant qualifier elimination

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Denis Smirnov <darthunix(at)gmail(dot)com>
Cc: Matheus Alcantara <matheusssilv97(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Redundant qualifier elimination
Date: 2026-08-14 16:27:47
Message-ID: 3766950.1786724867@sss.pgh.pa.us
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Denis Smirnov <darthunix(at)gmail(dot)com> writes:
> So I think:

> 1. The patch needs a VOLATILE check and planning-time tests.
> 2. It fixes the selectivity estimate but does not fix the JIT regression.
> 3. The main problem is the JIT cost decision: it uses total plan cost but does
> not account for the number or size of generated JIT functions.

For the record, I do not think we should accept this patch, even
if the problems you mention get fixed. It would impose nontrivial
costs on every query --- roughly O(N^2) in the number of restriction
clauses --- in order to fix badly-written queries, and that is not
a tradeoff I like. We could doubtless improve the cost by expending
lots more engineering effort, but it's still catering to badly
written queries, and we have better places to put the effort.

(There have been plenty of previous discussions along this same line,
btw.)

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Paul A Jungwirth 2026-08-14 16:28:05 Re: CREATE OR REPLACE MATERIALIZED VIEW
Previous Message Pierre Forstmann 2026-08-14 15:55:31 Re: [PATCH] Do not flush BufFile for regular temp files