pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Dan Field <dof@llgc.org.uk>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-sql@postgresql.org
Subject: Re: Memory usage on subselect
Date: Wed, 26 May 2004 16:51:51 +0100
Message-ID: <9ADF76EC-AF2C-11D8-9250-000A958E367A@llgc.org.uk> (raw)
In-Reply-To: <10740.1085405857@sss.pgh.pa.us>
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>


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.

-- 
Dan Field <dof@llgc.org.uk> - Support Programmer: Cymru ar y we
cy_GB: http://www.cymruarywe.org
en_GB: http://www.walesontheweb.org




view thread (7+ messages)  latest in thread

Message-ID: <9ADF76EC-AF2C-11D8-9250-000A958E367A@llgc.org.uk>
Permalink:  ../9ADF76EC-AF2C-11D8-9250-000A958E367A@llgc.org.uk/
Also on:    postgresql.org/message-id/9ADF76EC-AF2C-11D8-9250-000A958E367A@llgc.org.uk

 · 

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-sql@postgresql.org
  Cc: dof@llgc.org.uk, tgl@sss.pgh.pa.us
  Subject: Re: Memory usage on subselect
  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>

* 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