From: Justin Pryzby <pryzby@telsasoft.com>
To: Jeff Janes <jeff.janes@gmail.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: distinguish index cost component from table component
Date: Fri, 3 Jan 2020 10:03:15 -0600
Message-ID: <20200103160315.GL12066@telsasoft.com> (raw)
In-Reply-To: <CAMkU=1xcf-igvHSrta+gnTgE+K+Cnc-F=7z8G6YJTHwNSCyP1Q@mail.gmail.com>
References: <20200103141427.GK12066@telsasoft.com>
<CAMkU=1xcf-igvHSrta+gnTgE+K+Cnc-F=7z8G6YJTHwNSCyP1Q@mail.gmail.com>
On Fri, Jan 03, 2020 at 09:33:35AM -0500, Jeff Janes wrote:
> Of course this doesn't really answer your question, as the
> separately-reported costs of a bitmap heap and bitmap index scan are
> unlikely to match what the costs would be of a regular index scan, if they
> were reported separately.
I think the cost of index component of bitmap scan would be exactly the same
as the cost of the original indexscan.
>> Or maybe explain should report it.
>
> I wouldn't be optimistic about getting such a backwards-incompatible change
> accepted (plus it would surely add some small accounting overhead, which
> again would probably not be acceptable). But if you do enough tuning work,
> perhaps it would be worth carrying an out-of-tree patch to implement that.
> I wouldn't be so interested in writing such a patch, but would be
> interested in using one were it available somewhere.
I did the attached in the simplest possible way. If it's somehow possible get
the path's index_total_cost from the plan, then there'd be no additional
overhead.
Justin
Attachments:
[text/x-diff] v1-0001-explain-show-index_total_cost.patch (0B, ../20200103160315.GL12066@telsasoft.com/2-v1-0001-explain-show-index_total_cost.patch)
download
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 using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: pryzby@telsasoft.com, jeff.janes@gmail.com
Subject: Re: distinguish index cost component from table component
In-Reply-To: <20200103160315.GL12066@telsasoft.com>
* 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