pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Miroslav Šulc <miroslav.sulc@startnet.cz>
Cc: John Arbash Meinel <john@arbash-meinel.com>
Cc: PGSQL mailing list <pgsql-performance@postgresql.org>
Subject: Re: How to read query plan
Date: Sun, 13 Mar 2005 14:54:33 -0500
Message-ID: <19293.1110743673@sss.pgh.pa.us> (raw)
In-Reply-To: <423497FE.6040908@startnet.cz>
References: <42345D24.8070104@startnet.cz>
	<4234692E.3050802@arbash-meinel.com>
	<42347407.2000202@startnet.cz>
	<423478B1.7080106@arbash-meinel.com>
	<18381.1110741354@sss.pgh.pa.us>
	<423497FE.6040908@startnet.cz>

=?windows-1250?Q?Miroslav_=8Aulc?= <miroslav.sulc@startnet.cz> writes:
> I've just tried to uncomment the settings for these parameters with with 
> no impact on the query speed.

> shared_buffers = 48000          # min 16, at least max_connections*2, 
> 8KB each
> work_mem = 1024         # min 64, size in KB
> maintenance_work_mem = 16384    # min 1024, size in KB
> max_stack_depth = 2048          # min 100, size in KB

Hmm.  Given the small size of the auxiliary tables, you'd think they'd
fit in 1MB work_mem no problem.  But try bumping work_mem up to 10MB
just to see if it makes a difference.  (BTW, you do know that altering
the .conf file doesn't in itself do anything?  You have to SIGHUP the
postmaster to make it notice the change ... and for certain parameters
such as shared_buffers, you actually have to stop and restart the
postmaster.  You can use the SHOW command to verify whether a change
has taken effect.)

> I have checked this and there are some JOINs smallint against integer. 
> Is that problem?

That probably explains why some of the joins are merges instead of
hashes --- hash join doesn't work across datatypes.  Doesn't seem like
it should be a huge problem though.  I was more concerned about the
possibility of slow locale-dependent string comparisons.

			regards, tom lane



view thread (37+ messages)  latest in thread

Message-ID: <19293.1110743673@sss.pgh.pa.us>
Permalink:  ../19293.1110743673@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/19293.1110743673@sss.pgh.pa.us

 · 

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: tgl@sss.pgh.pa.us, miroslav.sulc@startnet.cz, john@arbash-meinel.com
  Subject: Re: How to read query plan
  In-Reply-To: <19293.1110743673@sss.pgh.pa.us>

* 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