Re: demystifying nested loop vs. merge join query plan choice

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Sandeep Gupta <gupta(dot)sandeep(at)gmail(dot)com>
Cc: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: demystifying nested loop vs. merge join query plan choice
Date: 2013-07-31 19:55:44
Message-ID: 8099.1375300544@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Sandeep Gupta <gupta(dot)sandeep(at)gmail(dot)com> writes:
> details regarding buffer usage:
> [ 100% buffer hit rate ]

Your database is evidently fully cached in memory. If that's the
operating mode you expect, you need to change the planner's cost
parameters, in particular reduce random_page_cost to equal seq_page_cost.
There is plenty of material about this on the PG wiki or in the
pgsql-performance archives.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Wells Oliver 2013-08-01 01:29:34 Implicitly casting integer to bigint (9.1)
Previous Message Sandeep Gupta 2013-07-31 19:34:17 Re: demystifying nested loop vs. merge join query plan choice