Re: slow update & index question

From: "Williams, Travis L, NPONS" <tlw(at)att(dot)com>
To: "Stephan Szabo" <sszabo(at)megazone23(dot)bigpanda(dot)com>
Cc: <pgsql-general(at)postgresql(dot)org>
Subject: Re: slow update & index question
Date: 2002-10-21 18:54:15
Message-ID: AB815D267EC31A4693CC24D234F8291602B031CE@ACCLUST02EVS1.ugd.att.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I did do a vacuum.. but I don't know what analyze does..

Travis

-----Original Message-----
From: Stephan Szabo [mailto:sszabo(at)megazone23(dot)bigpanda(dot)com]
Sent: Monday, October 21, 2002 1:51 PM
To: Williams, Travis L, NPONS
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: [GENERAL] slow update & index question

On Mon, 21 Oct 2002, Williams, Travis L, NPONS wrote:

> I have a script that is updating the DB by reading in a file with 467
> lines. Each file is named by the shelf the information was gotten
> from. Each line is tab seperated and consists of a column name and
> the value that it should be update to. The update line in the perl
> script looks like this: update table set "column name" = 'value' where
> "Shelf_Name" = '$shelf'
>
> Now this works.. but it takes almost 1 minute to do the updates.
> With nothing else at all touching the DB.. is this normal? The DB is
> index'd on the Shelf_Name column.. but how do I know if it is using
> the index.. or does that not even matter in this case?

You can use explain to determine whether it's using the index . You
might
want to vacuum and analyze the table in question as well.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Larry Rosenman 2002-10-21 18:55:29 Re: slow update & index question
Previous Message Stephan Szabo 2002-10-21 18:50:53 Re: slow update & index question