pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Scott Marlowe <scott.marlowe@gmail.com>
To: Adonias Malosso <malosso@gmail.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: 4s query want to run faster
Date: Thu, 21 Feb 2008 15:25:35 -0600
Message-ID: <dcc563d10802211325t365388f1te340e7f9b7e18dd3@mail.gmail.com> (raw)
In-Reply-To: <8a5d3c890802211305v46c44e2awc5811f496caf0191@mail.gmail.com>
References: <8a5d3c890802211248k7d9dfbb5ndd645358a84130a7@mail.gmail.com>
	<dcc563d10802211258w65285c0bl9f9da18b9ed0fa92@mail.gmail.com>
	<8a5d3c890802211305v46c44e2awc5811f496caf0191@mail.gmail.com>

Well, all the row counts in expected and actual are pretty close.  I'm
guessing it's as optimized as it's likely to get.  you could try
mucking about with random_page_cost to force index usage, but indexes
are not always a win in pgsql, hence the seq scans etc...  If the
number of rows returned represents a large percentage of the total
number of rows in the table, then a seq scan is generally a win.  Note
that most all the time being spent in this query is on the Hash Join,
not on the seq scans.

Also, you should really update to 8.2.6 the latest 8.2 version.  Check
the release notes for the bugs that were fixed between 8.2.1 and 8.2.6



view thread (12+ messages)  latest in thread

Message-ID: <dcc563d10802211325t365388f1te340e7f9b7e18dd3@mail.gmail.com>
Permalink:  ../dcc563d10802211325t365388f1te340e7f9b7e18dd3@mail.gmail.com/
Also on:    postgresql.org/message-id/dcc563d10802211325t365388f1te340e7f9b7e18dd3@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 using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: scott.marlowe@gmail.com, malosso@gmail.com
  Subject: Re: 4s query want to run faster
  In-Reply-To: <dcc563d10802211325t365388f1te340e7f9b7e18dd3@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