From: Ronan Dunklau <ronan.dunklau@aiven.io>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Hung Nguyen <hungnq1989@gmail.com>
Cc: pgsql-bugs@lists.postgresql.org, "rjuju123@gmail.com" <rjuju123@gmail.com>
Subject: Re: index cost estimation
Date: Wed, 06 Jul 2022 16:52:09 +0200
Message-ID: <2187702.iZASKD2KPV@aivenronan> (raw)
In-Reply-To: <2194637.1657118489@sss.pgh.pa.us>
References: <CABs3KGQnOkyQ42-zKQqiE7M0Ks9oWDSee=+Jx3-TGq=68xqWYw@mail.gmail.com>
<2834175.e9J7NaK4W3@aivenronan>
<2194637.1657118489@sss.pgh.pa.us>
Le mercredi 6 juillet 2022, 16:41:29 CEST Tom Lane a écrit :
> Hm, so it'd seem this probably could happen when comparing *any*
> non-btree index to a btree index, because I don't think we are
> particularly careful with CPU cost estimation for any of the
> other index types. If we do something about this, we probably
> have to look at all of them.
For gist and sp-gist, a descent cost is taken into account, by estimating the
tree height so that particular effect is mitigated. Whether the cpu cost
estimation is sensible regarding to btree is another topic, but at least the
index cost doesn't vanish when inside a loop.
Hash, brin and bloom are quite different, so maybe another examination would be
required but probably outside the scope of this bug report.
--
Ronan Dunklau
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-bugs@postgresql.org
Cc: ronan.dunklau@aiven.io, tgl@sss.pgh.pa.us, hungnq1989@gmail.com, rjuju123@gmail.com
Subject: Re: index cost estimation
In-Reply-To: <2187702.iZASKD2KPV@aivenronan>
* 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