Re: Changing the default random_page_cost value - Mailing list pgsql-hackers

From wenhui qiu
Subject Re: Changing the default random_page_cost value
Date
Msg-id CAGjGUAJJqw2rXZifS1xnHa8BvAjQ+8DmE-qymLabM3_kZXT3MQ@mail.gmail.com
Whole thread Raw
In response to Re: Changing the default random_page_cost value  (David Rowley <dgrowleyml@gmail.com>)
List 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

Thanks 



pgsql-hackers by date:

Previous
From: wenhui qiu
Date:
Subject: Re: POC: make mxidoff 64 bits
Next
From: Tatsuo Ishii
Date:
Subject: Re: Row pattern recognition