Re: Cost Model - Mailing list pgsql-hackers

From Ashutosh Bapat
Subject Re: Cost Model
Date
Msg-id CAFjFpReU_V7t0BLUAwMOc-vSScHBHxq2wikK8NJ_j7_ZZnPf+Q@mail.gmail.com
Whole thread Raw
In response to Re: Cost Model  (Neto BR <netobrpr@gmail.com>)
List pgsql-hackers


On Thu, Dec 21, 2017 at 3:09 PM, Neto BR <netobrpr@gmail.com> wrote:


2017-12-20 17:32 GMT-02:00 David G. Johnston <david.g.johnston@gmail.com>:
On Wed, Dec 20, 2017 at 12:26 PM, neto brpr <netobrpr@gmail.com> wrote:

About what you said, that some settings can be configured by Tablespace?
I have already seen this in IBM DB2, but in Postgresql as far as I know, for example the Random_page_cost and Seq_page_cost parameters are configured for the Integer Database and not for Tablespace, ok?. 
You or someone can tell me if cost parameters can be configured by Tablespace, this would be useful for me, thinking of a server that has hybrid storage environment (HDD x SSDs), I could leave some in a tablespace with HDD adapted settings and the same way for when I have an SSD disk.

​ALTER TABLESPACE​



A question about setting random_page_cost and seq_page_cost per tablespace.
If these values ​​are set to tablespace, will the random_page_cost and seq_page_cost parameters of the postgresql.conf file be ignored for the Tablespace that have been configured for these parameters?

On the page pointed by the link, the explanation of tablespace_option says
"Setting either value for a particular tablespace will override the planner's usual estimate of the cost of reading pages from tables in that tablespace, as established by the configuration parameters of the same name (see seq_page_cost, random_page_cost, effective_io_concurrency).". This means the tablespace specific values will override the ones in configuration i.e. postgresql.conf. Answer to your question is yes.

--
Best Wishes,
Ashutosh Bapat
EnterpriseDB Corporation
The Postgres Database Company

pgsql-hackers by date:

Previous
From: Jesper Pedersen
Date:
Subject: Re: [HACKERS] Proposal: Local indexes for partitioned table
Next
From: Feike Steenbergen
Date:
Subject: Fix permissions check on pg_stat_get_wal_senders