pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Scott Marlowe <scott.marlowe@gmail.com>
To: Carlo Stonebanks <stonec.register@sympatico.ca>
Cc: pgsql-performance@postgresql.org
Subject: Re: How to avoid hashjoin and mergejoin
Date: Thu, 1 Nov 2007 16:38:35 -0500
Message-ID: <dcc563d10711011438p576f79cch525596e4799c685b@mail.gmail.com> (raw)
In-Reply-To: <fgdeia$763$1@news.hub.org>
References: <fgdeia$763$1@news.hub.org>

On 11/1/07, Carlo Stonebanks <stonec.register@sympatico.ca> wrote:
> I am comparing the same query on two different PG 8.2 servers, one Linux
> (8GB RAM) and one Windows (32GB RAM). Both have similar drives and CPU's.
>
> The Windows posgrestsql.config is pretty well tuned but it looks like
> someone had wiped out the Linux config so the default one was re-installed.
> All performance-related memory allocation values seem to be set to the
> defaults, but mods have been made: max_connections = 100 and shared_buffers
> = 32MB.
>
> The performance for this query is terrible on the Linux server, and good on
> the Windows server - presumably because the original Linux PG config has
> been lost. This query requires: that "set enable_seqscan to 'off';"

Have you run analyze on the server yet?

A few general points on performance tuning.  With 8.2 you should set
shared_buffers to a pretty big chunk of memory on linux, up to 25% or
so.  That means 32 Meg shared buffers is REAL low for a linux server.
Try running anywhere from 512Meg up to 1Gig for starters and see if
that helps too.  Also turn up work_mem to something like 16 to 32 meg
then restart the server after making these changes.

Then give us the explain analyze output with all the enable_xxx set to ON.

summary: analyze, increase shared_buffers and work_mem, give us explain analyze.



view thread (5+ messages)  latest in thread

Message-ID: <dcc563d10711011438p576f79cch525596e4799c685b@mail.gmail.com>
Permalink:  ../dcc563d10711011438p576f79cch525596e4799c685b@mail.gmail.com/
Also on:    postgresql.org/message-id/dcc563d10711011438p576f79cch525596e4799c685b@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: scott.marlowe@gmail.com, stonec.register@sympatico.ca
  Subject: Re: How to avoid hashjoin and mergejoin
  In-Reply-To: <dcc563d10711011438p576f79cch525596e4799c685b@mail.gmail.com>
  References: <fgdeia$763$1@news.hub.org> <dcc563d10711011438p576f79cch525596e4799c685b@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