Re: Simple query showing 270 hours of CPU time

From: PFC <lists(at)peufeu(dot)com>
To: "Dan Harris" <fbsd(at)drivefaster(dot)net>, "PostgreSQL Performance" <pgsql-performance(at)postgresql(dot)org>
Subject: Re: Simple query showing 270 hours of CPU time
Date: 2007-07-20 16:55:02
Message-ID: op.tvrvx0sjcigqcu@apollo13
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance


> Today, I looked at 'top' on my PG server and saw a pid that reported 270
> hours of CPU time. Considering this is a very simple query, I was
> surprised to say the least. I was about to just kill the pid, but I
> figured I'd try and see exactly what it was stuck doing for so long.

If you are using connection pooling, or if your client keeps the
connections for a long time, this backend could be very old...
With PHP's persistent connections, for instance, backends restart when
you restart the webserver, which isn't usually very often.

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Josh Berkus 2007-07-20 17:03:31 Re: [PERFORM] 8.2 -> 8.3 performance numbers
Previous Message Tom Lane 2007-07-20 16:42:05 Re: Simple query showing 270 hours of CPU time