pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Shawn <postgres@xmtservices.net>
Cc: pgsql-performance@postgresql.org <pgsql-performance@postgresql.org>
Subject: Re: Slow Query
Date: Sat, 01 Sep 2007 14:09:54 -0400
Message-ID: <22800.1188670194@sss.pgh.pa.us> (raw)
In-Reply-To: <20070901102947.0c0a50a3@boffin.xmtservices.net>
References: <20070901102947.0c0a50a3@boffin.xmtservices.net>

Shawn <postgres@xmtservices.net> writes:
> update shawns_data set alias = null;

> Alias is a type varchar(8)

> The table has 26 fields per record and there are about 15,700
> records.  The server hardware is a dual QUAD-CORE Intel 2 GHz XEON dell
> 2950 server with 4 drive SAS RAID-5 array, and 16G of RAM.  The OS is
> Slackware 11 with some updatews and Postgres v8.2.4 built from source.

> Even after VACUUM this simple line takes 35 sec to complete.

Seems like a lot.  Table bloat maybe (what does VACUUM VERBOSE say about
this table)?  An unreasonably large number of indexes to update?
Foreign key checks?  (Though unless you have FKs pointing at alias,
I'd think 8.2 would avoid needing to make any FK checks.)

Could we see EXPLAIN ANALYZE output for this operation?  (If you don't
really want to zap the column right now, wrap the EXPLAIN in
BEGIN/ROLLBACK.)

			regards, tom lane



view thread (112+ messages)  latest in thread

Message-ID: <22800.1188670194@sss.pgh.pa.us>
Permalink:  ../22800.1188670194@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/22800.1188670194@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, postgres@xmtservices.net
  Subject: Re: Slow Query
  In-Reply-To: <22800.1188670194@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