From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andres Freund <andres@anarazel.de>
Cc: David Rowley <dgrowleyml@gmail.com>
Cc: Scott Ribe <scott_ribe@elevated-dev.com>
Cc: PostgreSQL General <pgsql-general@lists.postgresql.org>
Subject: Re: bad JIT decision
Date: Sat, 25 Jul 2020 10:23:14 -0400
Message-ID: <672183.1595686994@sss.pgh.pa.us> (raw)
In-Reply-To: <20200725001605.vrlncip4fx3esv3b@alap3.anarazel.de>
References: <7736C40E-6DB5-4E7A-8FE3-4B2AB8E22793@elevated-dev.com>
<CAApHDvoGfCqiF-20k4OLgawyubezBbpBpdfJ0SuphbbK0KEVUw@mail.gmail.com>
<629715.1595630222@sss.pgh.pa.us>
<20200725001605.vrlncip4fx3esv3b@alap3.anarazel.de>
Andres Freund <andres@anarazel.de> writes:
> On 2020-07-24 18:37:02 -0400, Tom Lane wrote:
>> Yeah. I'm fairly convinced that the v12 defaults are far too low,
>> because we are constantly seeing complaints of this sort.
> I think the issue is more that we need to take into accoutn that the
> overhead of JITing scales ~linearly with the number of JITed
> expressions. And that's not done right now. I've had a patch somewhere
> that had a prototype implementation of changing the costing to be
> #expressions * some_cost, and I think that's a lot more accurate.
Another thing we could try with much less effort is scaling it by the
number of relations in the query. There's already some code in the
plancache that tries to estimate planning effort that way, IIRC.
Such a scaling would be very legitimate for the cost of compiling
tuple-deconstruction code, and for other expressions it'd kind of
amount to an assumption that the expressions-per-table ratio is
roughly constant. If you don't like that, maybe some simple
nonlinear growth rule would work.
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: tgl@sss.pgh.pa.us, andres@anarazel.de, dgrowleyml@gmail.com, scott_ribe@elevated-dev.com
Subject: Re: bad JIT decision
In-Reply-To: <672183.1595686994@sss.pgh.pa.us>
References: <7736C40E-6DB5-4E7A-8FE3-4B2AB8E22793@elevated-dev.com> <CAApHDvoGfCqiF-20k4OLgawyubezBbpBpdfJ0SuphbbK0KEVUw@mail.gmail.com> <629715.1595630222@sss.pgh.pa.us> <20200725001605.vrlncip4fx3esv3b@alap3.anarazel.de> <672183.1595686994@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox