Re: Cost Model

Поиск
Список
Период
Сортировка
Искать
От
neto brpr
Тема
Re: Cost Model
Дата
Msg-id
CALhhvc1fWnq+2acUC4MoAXwiY3Wzj3+c9OpDvXgwzaihPO2C8w@mail.gmail.com
Ответ на
Re: Cost Model (David G. Johnston)
Список
Дерево обсуждения
Cost Model neto brpr <netobrpr@gmail.com>
Re: Cost Model "David G. Johnston" <david.g.johnston@gmail.com>
Re: Cost Model neto brpr <netobrpr@gmail.com>
Re: Cost Model Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: Cost Model neto brpr <netobrpr@gmail.com>
Re: Cost Model Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: Cost Model Andres Freund <andres@anarazel.de>
Re: Cost Model neto brpr <netobrpr@gmail.com>
Re: Cost Model "David G. Johnston" <david.g.johnston@gmail.com>
Re: Cost Model neto brpr <netobrpr@gmail.com>
Re: Cost Model "David G. Johnston" <david.g.johnston@gmail.com>
Re: Cost Model Neto BR <netobrpr@gmail.com>
Re: Cost Model Ashutosh Bapat <ashutosh.bapat@enterprisedb.com>


2017-12-20 16:37 GMT-02:00 David G. Johnston <david.g.johnston@gmail.com>:
On Wed, Dec 20, 2017 at 11:26 AM, neto brpr <netobrpr@gmail.com> wrote:
Dear David 
I have read documentation that you send, but it has only sequential page cost and random page cost parameters. What I need, would be a model of custo for Differentiate Read/Write (sequential and random), because in SSDs the reads and writes have different costs. If you or someone knows a patch or other solution, that allows you to configure individual parameters to:

- Sequential reading page cost
- cost of the random reading page
- sequential recording page cost
- Random recording page cost


​Please don't top-post.

OK, sorry! 

OK...reading more closely I don't see how "recording/writing" costs are important in decision making.  Either you have to write something, or you don't.​  If you do you updates pages in a buffer and generate WAL and then the system puts the data onto disk where they belong - the database itself doesn't care about that part and knowing how fast or slow it might happen would impact it behavior.  So PostgreSQL provides read settings to be tuned so it can decide between index and table scans on the table in question.

The system doesn't understand SSD or HDD but does understand tablespaces and I believe that many of these settings are able to be configured on a per-tablespace (or table?) basis.


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.

Regards 
Neto 

David J.



Livre de vírus. www.avast.com.
В списке pgsql-hackers по дате отправления
От: Tom Lane
Дата:
От: David G. Johnston
Дата:
Сообщение: Re: Cost Model
FAQ