pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jim C. Nasby <jnasby@pervasive.com>
To: Andrus <eetasoft@online.ee>
Cc: pgsql-performance@postgresql.org
Subject: Re: Why date index is not used
Date: Fri, 9 Jun 2006 10:54:02 -0500
Message-ID: <20060609155402.GW45331@pervasive.com> (raw)
In-Reply-To: <e6bgd4$1vgk$2@news.hub.org>
References: <44887875.8000502@fuzzy.cz>
	<01de01c68b37$33e22a80$8300a8c0@tridecap.com>
	<e6bgd4$1vgk$2@news.hub.org>

On Fri, Jun 09, 2006 at 12:40:26PM +0300, Andrus wrote:
> > Actually It looks to me like the sorting is the slow part of this query.
> > Maybe if you did create an index on both kuupaev and kellaaeg it might
> > make the sorting faster.
> 
> Thank you. It makes query fast.
> 
> > Or maybe you could try increasing the server's
> > work mem.  The sort will be much slower if the server can't do the whole
> > thing in ram.
> 
> I have W2K server with 0.5 GB RAM
> there are only 6 connections open ( 6 point of sales) to this server.
> shared_buffes is 10000
> I see approx 10 postgres processes in task manager each taking about 30 MB
> ram
> 
> Server prefomance is very slow: Windows swap file size is 1 GB
> 
> For each sale a new row will be inserted to this table. So the file size
> grows rapidly every day.
> Changing work_mem by 1 MB  increares memory requirment by 10 MB since I may
> have 10 processes running. Sorting in memory this table requires very large
> amout of work_mem for each process address space.
> 
> I think that if I increase work_mem  then swap file will became bigger and
> perfomance will decrease even more.
> 
> How to increase perfomance ?

Do you have effective_cache_size set correctly? You might try dropping
random_page_cost down to 2 or so.

Of course you could just put more memory in the machine, too.
-- 
Jim C. Nasby, Sr. Engineering Consultant      jnasby@pervasive.com
Pervasive Software      http://pervasive.com    work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf       cell: 512-569-9461



view thread (11+ messages)

Message-ID: <20060609155402.GW45331@pervasive.com>
Permalink:  ../20060609155402.GW45331@pervasive.com/
Also on:    postgresql.org/message-id/20060609155402.GW45331@pervasive.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: jnasby@pervasive.com, eetasoft@online.ee
  Subject: Re: Why date index is not used
  In-Reply-To: <20060609155402.GW45331@pervasive.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