public inbox for [email protected]
help / color / mirror / Atom feedFrom: wenhui qiu <[email protected]>
To: Greg Sabino Mullane <[email protected]>
Cc: pgsql-hackers <[email protected]>
Subject: Re: Changing the default random_page_cost value
Date: Fri, 25 Oct 2024 11:56:57 +0800
Message-ID: <CAGjGUAJJqw2rXZifS1xnHa8BvAjQ+8DmE-qymLabM3_kZXT3MQ@mail.gmail.com> (raw)
In-Reply-To: <CAApHDvqNxnsirEv7NiTn_ZghFDjinHSaFJuTqx19M8a04WWmQg@mail.gmail.com>
References: <CAKAnmmK_nSPYr53LobUwQD59a-8U9GEC3XGJ43oaTYJq5nAOkw@mail.gmail.com>
<[email protected]>
<CAKAnmmKxOq8i4JCfc6AzThuetLPenGaOQu25m0EeOhanaQdhLw@mail.gmail.com>
<[email protected]>
<CAApHDvrRzq_XO=4PPamY6gr8OLquVXYBMen8+=op0UjmF6vk0g@mail.gmail.com>
<CAKAnmmKHzk63bnMZAb5Z5rnYcPjeq+Wfg3pmcnK9rV6cKX2y0A@mail.gmail.com>
<CAApHDvqNxnsirEv7NiTn_ZghFDjinHSaFJuTqx19M8a04WWmQg@mail.gmail.com>
HI Greg Sabino Mullane
Another thing is that you simply change the configuration template is
not effective,
need to modify the DEFAULT_RANDOM_PAGE_COST values
{
{"random_page_cost", PGC_USERSET, QUERY_TUNING_COST,
gettext_noop("Sets the planner's estimate of the cost of a "
"nonsequentially fetched disk page."),
NULL,
GUC_EXPLAIN
},
&random_page_cost,
DEFAULT_RANDOM_PAGE_COST, 0, DBL_MAX,
NULL, NULL, NULL
},
src/include/optimizer/cost.h
/* defaults for costsize.c's Cost parameters */
/* NB: cost-estimation code should use the variables, not these constants!
*/
/* If you change these, update backend/utils/misc/postgresql.conf.sample */
#define DEFAULT_SEQ_PAGE_COST 1.0
#define DEFAULT_RANDOM_PAGE_COST 4.0
#define DEFAULT_CPU_TUPLE_COST 0.01
#define DEFAULT_CPU_INDEX_TUPLE_COST 0.005
#define DEFAULT_CPU_OPERATOR_COST 0.0025
#define DEFAULT_PARALLEL_TUPLE_COST 0.1
#define DEFAULT_PARALLEL_SETUP_COST 1000.0
Thanks
>
>
>
>
view thread (3+ messages)
reply
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: [email protected]
Cc: [email protected], [email protected]
Subject: Re: Changing the default random_page_cost value
In-Reply-To: <CAGjGUAJJqw2rXZifS1xnHa8BvAjQ+8DmE-qymLabM3_kZXT3MQ@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox