Re: update problem?

From: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
To: Jörg Schulz <jschulz(at)sgbs(dot)de>
Cc: <pgsql-general(at)postgresql(dot)org>
Subject: Re: update problem?
Date: 2002-07-10 16:15:51
Message-ID: 20020710091347.R51645-100000@megazone23.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-novice

On Wed, 10 Jul 2002, [ISO-8859-1] Jrg Schulz wrote:

> Before the column was added explain said:
>
> > explain update test set a='x';
> > Seq Scan on test2 (cost=0.00..20.00 rows=1000 width=6)
>
> (btw: why rows=1000? there are 100.000 rows in the table)

Because you haven't vacuum analyzed since loading the data.
If you're doing an update of every row of a table, you almost
certainly want to at least do a normal vacuum (and possibly
a vacuum analyze) of the table afterwards.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Nathan Hill 2002-07-10 16:24:47 XML to Postgres conversion
Previous Message Darren Ferguson 2002-07-10 16:15:33 Re: [pgsql-general] DB GUI Design tool

Browse pgsql-novice by date

  From Date Subject
Next Message Vasco Amaral 2002-07-10 16:34:30 UDF examples. returning rows
Previous Message Stephan Szabo 2002-07-10 16:06:16 Re: update problem?