Re: UPDATE 66k rows too slow

From: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>
To: Miguel Arroz <arroz(at)guiamac(dot)com>
Cc: Greg Smith <gsmith(at)gregsmith(dot)com>, pgsql-performance(at)postgresql(dot)org
Subject: Re: UPDATE 66k rows too slow
Date: 2008-03-10 23:22:31
Message-ID: 20080310162231.6f54c5cd@commandprompt.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Mon, 10 Mar 2008 23:17:54 +0000
Miguel Arroz <arroz(at)guiamac(dot)com> wrote:

> Hi!
>
> I read and did many stuff you pointed me too. Raised shared
> buffers to 180 MB, and tried again. Same results.
>
> I deleted the DB, created a new one and generated new test data.
> I know have 72k rows, and the same query finishes in... 9 seconds.
>
> I'm totally clueless. Anyway, two questions:
>
> 1) My working_mem is 2 MB. Does an UPDATE query like main depend
> on working_mem?
>
> 2) I still feel this is all very trial-and-error. Change value,
> run query, hope it solves the problem. Well, the DB itself knows what
> is doing. Isn't there any way to make it tell us that? Like "the
> working mem is too low" or anything else. I know the problem is not
> the checkpoints, at least nothing appears on the log related to that.
> But it irritates me to be in front of a such complex system and not
> being able to know what's going on.

What does iostat -k 1 tell you during the 9 seconds the query is
running?

Joshua D. Drake

- --
The PostgreSQL Company since 1997: http://www.commandprompt.com/
PostgreSQL Community Conference: http://www.postgresqlconference.org/
Donate to the PostgreSQL Project: http://www.postgresql.org/about/donate
PostgreSQL political pundit | Mocker of Dolphins

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFH1cK3ATb/zqfZUUQRAhllAJ9C9aL9o/4hzq9vZyRaY8J6DknP5QCePDfS
BxJ/umrVArStUJgG3oFYsSE=
=n0uC
-----END PGP SIGNATURE-----

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Miguel Arroz 2008-03-10 23:46:10 Re: UPDATE 66k rows too slow
Previous Message Miguel Arroz 2008-03-10 23:17:54 Re: UPDATE 66k rows too slow