pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Robert Haas <robertmhaas@gmail.com>
To: Vlad Arkhipov <arhipov@dc.baikal.ru>
Cc: pgsql-performance@postgresql.org
Subject: Re: Optimization idea
Date: Fri, 23 Apr 2010 07:05:53 -0400
Message-ID: <y2y603c8f071004230405r5fcef546l3da84c407ce2655a@mail.gmail.com> (raw)
In-Reply-To: <4BD10805.9060004@dc.baikal.ru>
References: <4BD0161A.4010908@dc.baikal.ru>
	<4BD0430C.1050308@2ndquadrant.com>
	<4BD10805.9060004@dc.baikal.ru>

On Thu, Apr 22, 2010 at 10:37 PM, Vlad Arkhipov <arhipov@dc.baikal.ru> wrote:
> I don't think this is just an issue with statistics, because the same
> problem arises when I try executing a query like this:

I'm not sure how you think this proves that it isn't a problem with
statistics, but I think what you should be focusing on here, looking
back to your original email, is that the plans that are actually much
faster have almost as much estimated cost as the slower one.  Since
all your data is probably fully cached, at a first cut, I might try
setting random_page_cost and seq_page_cost to 0.005 or so, and
adjusting effective_cache_size to something appropriate.

...Robert



view thread (21+ messages)  latest in thread

Message-ID: <y2y603c8f071004230405r5fcef546l3da84c407ce2655a@mail.gmail.com>
Permalink:  ../y2y603c8f071004230405r5fcef546l3da84c407ce2655a@mail.gmail.com/
Also on:    postgresql.org/message-id/y2y603c8f071004230405r5fcef546l3da84c407ce2655a@mail.gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-performance@postgresql.org
  Cc: robertmhaas@gmail.com, arhipov@dc.baikal.ru
  Subject: Re: Optimization idea
  In-Reply-To: <y2y603c8f071004230405r5fcef546l3da84c407ce2655a@mail.gmail.com>
  References: <4BD0161A.4010908@dc.baikal.ru> <4BD0430C.1050308@2ndquadrant.com> <4BD10805.9060004@dc.baikal.ru> <y2y603c8f071004230405r5fcef546l3da84c407ce2655a@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox