Re: Helping planner to chose sequential scan when it improves performance

From: David Rowley <dgrowleyml(at)gmail(dot)com>
To: "Patrick O'Toole" <patrick(dot)otoole(at)sturdy(dot)ai>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Helping planner to chose sequential scan when it improves performance
Date: 2023-06-25 19:48:27
Message-ID: CAApHDvo-NrtZ08bRvdmKo=iNEkLLL0VwTKBziES8t1vKtQKRyg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-performance

On Wed, 14 Jun 2023 at 07:28, Patrick O'Toole <patrick(dot)otoole(at)sturdy(dot)ai> wrote:
> Maybe we are barking up the wrong tree with the previous questions. Are there other configuration parameters we should consider first to improve performance in situations like the one illustrated?

random_page_cost and effective_cache_size are the main settings which
will influence plan A vs plan B. Larger values of
effective_cache_size will have the planner apply more seq_page_costs
to the index scan. Lower values of effective_cache_size will mean
more pages will be assumed to cost random_page_cost.

David

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2023-06-25 21:47:55 Re: bug or lacking doc hint
Previous Message Marc Millas 2023-06-25 19:46:12 Re: bug or lacking doc hint

Browse pgsql-performance by date

  From Date Subject
Next Message Jeff Janes 2023-06-27 12:47:44 Re: Helping planner to chose sequential scan when it improves performance
Previous Message Jeff Janes 2023-06-25 19:34:38 Re: Helping planner to chose sequential scan when it improves performance