Skip to main content
Notice removed Draw attention by guettli
Bounty Ended with Evan Carroll's answer chosen by guettli
Tweeted twitter.com/StackDBAs/status/988949832135069697
vs
Source Link
guettli
  • 1.6k
  • 5
  • 24
  • 51

I read this article about PostgreSQL performance on SSD:

https://amplitude.engineering/how-a-single-postgresql-config-change-improved-slow-query-performance-by-50x-85593b8991b0

These two configurations seem to be important random_page_cost vs seq_page_cost

Since both parameters need to match the particular hardware I wonder if it is possible to automatically detect the matching values?

Update

I have these steps on my mind:

  1. Script creates some dummy tables
  2. Scripts inserts data to the tables
  3. Script does some queries
  4. Script shows matching values for random_page_cost and seq_page_cost
  5. Human or an automated system takes these values and updates the config. This step is not part of the question.

I read this article about PostgreSQL performance on SSD:

https://amplitude.engineering/how-a-single-postgresql-config-change-improved-slow-query-performance-by-50x-85593b8991b0

These two configurations seem to be important random_page_cost vs seq_page_cost

Since both parameters need to match the particular hardware I wonder if it is possible to automatically detect the matching values?

Update

I have these steps on my mind:

  1. Script creates some dummy tables
  2. Scripts inserts data to the tables
  3. Script does some queries
  4. Script shows matching values
  5. Human or an automated system takes these values and updates the config. This step is not part of the question.

I read this article about PostgreSQL performance on SSD:

https://amplitude.engineering/how-a-single-postgresql-config-change-improved-slow-query-performance-by-50x-85593b8991b0

These two configurations seem to be important random_page_cost vs seq_page_cost

Since both parameters need to match the particular hardware I wonder if it is possible to automatically detect the matching values?

Update

I have these steps on my mind:

  1. Script creates some dummy tables
  2. Scripts inserts data to the tables
  3. Script does some queries
  4. Script shows matching values for random_page_cost and seq_page_cost
  5. Human or an automated system takes these values and updates the config. This step is not part of the question.
added 306 characters in body
Source Link
guettli
  • 1.6k
  • 5
  • 24
  • 51

I read this article about PostgreSQL performance on SSD:

https://amplitude.engineering/how-a-single-postgresql-config-change-improved-slow-query-performance-by-50x-85593b8991b0

These two configurations seem to be important random_page_cost vs seq_page_cost

Since both parameters need to match the particular hardware I wonder if it is possible to automatically detect the matching values?

Update

I have these steps on my mind:

  1. Script creates some dummy tables
  2. Scripts inserts data to the tables
  3. Script does some queries
  4. Script shows matching values
  5. Human or an automated system takes these values and updates the config. This step is not part of the question.

I read this article about PostgreSQL performance on SSD:

https://amplitude.engineering/how-a-single-postgresql-config-change-improved-slow-query-performance-by-50x-85593b8991b0

These two configurations seem to be important random_page_cost vs seq_page_cost

Since both parameters need to match the particular hardware I wonder if it is possible to automatically detect the matching values?

I read this article about PostgreSQL performance on SSD:

https://amplitude.engineering/how-a-single-postgresql-config-change-improved-slow-query-performance-by-50x-85593b8991b0

These two configurations seem to be important random_page_cost vs seq_page_cost

Since both parameters need to match the particular hardware I wonder if it is possible to automatically detect the matching values?

Update

I have these steps on my mind:

  1. Script creates some dummy tables
  2. Scripts inserts data to the tables
  3. Script does some queries
  4. Script shows matching values
  5. Human or an automated system takes these values and updates the config. This step is not part of the question.
Notice added Draw attention by guettli
Bounty Started worth 50 reputation by guettli
Source Link
guettli
  • 1.6k
  • 5
  • 24
  • 51

Autodetect ‘random_page_cost’ vs ‘seq_page_cost’

I read this article about PostgreSQL performance on SSD:

https://amplitude.engineering/how-a-single-postgresql-config-change-improved-slow-query-performance-by-50x-85593b8991b0

These two configurations seem to be important random_page_cost vs seq_page_cost

Since both parameters need to match the particular hardware I wonder if it is possible to automatically detect the matching values?