pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Gaetano Mendola <mendola@bigfoot.com>
To: Dan Field <dof@llgc.org.uk>
Subject: Re: Memory usage on subselect
Date: Wed, 26 May 2004 18:29:42 +0200
Message-ID: <40B4C5F6.3010700@bigfoot.com> (raw)
In-Reply-To: <9ADF76EC-AF2C-11D8-9250-000A958E367A@llgc.org.uk>
References: <20040522175419.GB54296@dyatel.antar.bryansk.ru>
	<24527.1085329698@sss.pgh.pa.us>
	<20040523183249.GC54296@dyatel.antar.bryansk.ru>
	<D11F1F08-AD5F-11D8-9250-000A958E367A@llgc.org.uk>
	<10740.1085405857@sss.pgh.pa.us>
	<9ADF76EC-AF2C-11D8-9250-000A958E367A@llgc.org.uk>

Dan Field wrote:

> 
> On 24 May 2004, at 14:37, Tom Lane wrote:
> 
>> Dan Field <dof@llgc.org.uk> writes:
>>
>>> I have a similar problem with just one of my queries (although it isn't
>>> a sub select):
>>
>>
>> You really ought to vacuum and/or analyze occasionally.  The EXPLAIN
>> results show that the planner hasn't got any non-default statistics
>> for any of these tables.
> 
> 
> Wow, thanks for that. I'd been pulling my hair out for a couple of days 
> wondering where I was going wrong.
> I went from 45 second queries down to sub second query lengths  after a 
> simple vacuum full analyze.
> 
> I've now added nightly and monthly cron jobs to do this for me in future.
> 
> Out of curiosity, why is this deemed a DBA task rather than an automated 
> postgres task?
> 
> Once again, many thanks.

You have to use the pg_autovacuum demon.

Run the vacuum full and the reindex once in a week.


Regards
Gaetano Mendola







view thread (7+ messages)

Message-ID: <40B4C5F6.3010700@bigfoot.com>
Permalink:  ../40B4C5F6.3010700@bigfoot.com/
Also on:    postgresql.org/message-id/40B4C5F6.3010700@bigfoot.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-sql@postgresql.org
  Cc: mendola@bigfoot.com, dof@llgc.org.uk
  Subject: Re: Memory usage on subselect
  In-Reply-To: <40B4C5F6.3010700@bigfoot.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