Re: very slow update query

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Ilija Vidoevski <ilija(dot)vidoevski(at)yahoo(dot)com>
Cc: "pgsql-novice(at)postgresql(dot)org" <pgsql-novice(at)postgresql(dot)org>
Subject: Re: very slow update query
Date: 2012-07-30 19:10:35
Message-ID: 4217.1343675435@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Ilija Vidoevski <ilija(dot)vidoevski(at)yahoo(dot)com> writes:
> Explain query plan is:

> "Update on finarh (cost=0.00..12049.99 rows=177714 width=172)"
> " -> Seq Scan on finarh (cost=0.00..12049.99 rows=177714 width=172)"

> Why execution time is so loooong ?

EXPLAIN ANALYZE output might be more informative. One thing it would
tell us is if the time is going into foreign key checks, for instance.
You've provided no information whatever about the table's schema, so
it's impossible to guess if the time is going into the actual updates,
or index updates, or constraint checks, or TOAST overhead, or what.

There's some info here about the type of information that's useful
when trying to debug a performance problem:
http://wiki.postgresql.org/wiki/Slow_Query_Questions

regards, tom lane

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Tom Lane 2012-07-30 19:21:01 Re: 8.4.12 log truncation not working?
Previous Message Ilija Vidoevski 2012-07-30 18:22:33 Re: very slow update query