Re: Hybrid Hash/Nested Loop joins and caching results from subplans
Peter Geoghegan <pg@bowt.ie>
From: Peter Geoghegan <pg@bowt.ie>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Alvaro Herrera <alvherre@alvh.no-ip.org>,
David Rowley <dgrowleyml@gmail.com>, Andy Fan <zhihui.fan1213@gmail.com>, Andres Freund <andres@anarazel.de>, PostgreSQL Developers <pgsql-hackers@lists.postgresql.org>
Date: 2020-11-09T23:55:38Z
Lists: pgsql-hackers
On Mon, Nov 9, 2020 at 3:49 PM Tom Lane <tgl@sss.pgh.pa.us> wrote: > Alvaro Herrera <alvherre@alvh.no-ip.org> writes: > > Are you taking into account the possibility that generated machine code > > is a small percent slower out of mere bad luck? I remember someone > > suggesting that they can make code 2% faster or so by inserting random > > no-op instructions in the binary, or something like that. So if the > > difference between v8 and v9 is that small, then it might be due to this > > kind of effect. > > Yeah. I believe what this arises from is good or bad luck about relevant > tight loops falling within or across cache lines, and that sort of thing. > We've definitely seen performance changes up to a couple percent with > no apparent change to the relevant code. That was Andrew Gierth. And it was 5% IIRC. In theory it should be possible to control for this using a tool like stabilizer: https://github.com/ccurtsinger/stabilizer I am not aware of anybody having actually used the tool with Postgres, though. It looks rather inconvenient. -- Peter Geoghegan
Commits
-
Add Result Cache executor node (take 2)
- 9eacee2e62d8 14.0 landed
-
Add Result Cache executor node
- b6002a796dc0 14.0 landed
-
Allow estimate_num_groups() to pass back further details about the estimation
- ed934d4fa30f 14.0 landed
-
Allow users of simplehash.h to perform direct deletions
- ff53d7b159b9 14.0 landed
-
Cache if PathTarget and RestrictInfos contain volatile functions
- f58b230ed0db 14.0 landed
-
Fix pull_varnos' miscomputation of relids set for a PlaceHolderVar.
- 55dc86eca70b 14.0 cited