From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | pgsql-hackers(at)lists(dot)postgresql(dot)org |
Cc: | David Rowley <dgrowleyml(at)gmail(dot)com> |
Subject: | Re: Patch to fix FK-related selectivity estimates with constants |
Date: | 2020-10-27 17:58:56 |
Message-ID: | 1063434.1603821536@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
I wrote:
> Over in the thread at [1] it's discussed how our code for making
> selectivity estimates using knowledge about FOREIGN KEY constraints
> is busted in the face of EquivalenceClasses including constants.
> ...
> Attached is a patch series that attacks it that way.
I'd failed to generate a test case I liked yesterday, but perhaps
the attached will do. (While the new code is exercised in the
core regression tests already, it doesn't produce any visible
plan changes.) I'm a little nervous about whether the plan
shape will be stable in the buildfarm, but it works for me on
both 64-bit and 32-bit machines, so probably it's OK.
regards, tom lane
Attachment | Content-Type | Size |
---|---|---|
0003-add-a-test-case.patch | text/x-diff | 3.2 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Geoghegan | 2020-10-27 18:35:01 | Re: Deleting older versions in unique indexes to avoid page splits |
Previous Message | Justin Pryzby | 2020-10-27 17:43:18 | Re: CREATE TABLE .. PARTITION OF fails to preserve tgenabled for inherited row triggers |