Re: Changing the default random_page_cost value
От | wenhui qiu |
---|---|
Тема | Re: Changing the default random_page_cost value |
Дата | |
Msg-id | CAGjGUAJJqw2rXZifS1xnHa8BvAjQ+8DmE-qymLabM3_kZXT3MQ@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Changing the default random_page_cost value (David Rowley <dgrowleyml@gmail.com>) |
Список | pgsql-hackers |
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
В списке pgsql-hackers по дате отправления: