From: Ronan Dunklau <ronan.dunklau@aiven.io>
To: Alexander Korotkov <aekorotkov@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Michael Paquier <michael@paquier.xyz>
Cc: pgsql-hackers@lists.postgresql.org
Subject: Re: Fix gin index cost estimation
Date: Fri, 02 Dec 2022 13:58:27 +0100
Message-ID: <10184681.nUPlyArG6x@aivenlaptop> (raw)
In-Reply-To: <CAPpHfdtFYZjv41djYjNcJUuZhDKUu9eJSthKmmDWE-azAZjn5g@mail.gmail.com>
References: <3188617.44csPzL39Z@aivenronan>
<13151261.uLZWGnKmhe@aivenlaptop>
<CAPpHfdtFYZjv41djYjNcJUuZhDKUu9eJSthKmmDWE-azAZjn5g@mail.gmail.com>
Le vendredi 2 décembre 2022, 12:33:33 CET Alexander Korotkov a écrit :
> Hi, Ronan!
> Thank you for your patch. Couple of quick questions.
> 1) What magic number 50.0 stands for? I think we at least should make
> it a macro.
This is what is used in other tree-descending estimation functions, so I used
that too. Maybe a DEFAULT_PAGE_CPU_COST macro would work for both ? If so I'll
separate this into two patches, one introducing the macro for the other
estimation functions, and this patch for gin.
> 2) "We only charge one data page for the startup cost" – should this
> be dependent on number of search entries?
Good point, multiplying it by the number of search entries would do the trick.
Thank you for looking at this !
Regards,
--
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-hackers@postgresql.org
Cc: ronan.dunklau@aiven.io, aekorotkov@gmail.com, tgl@sss.pgh.pa.us, michael@paquier.xyz, pgsql-hackers@lists.postgresql.org
Subject: Re: Fix gin index cost estimation
In-Reply-To: <10184681.nUPlyArG6x@aivenlaptop>
* 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