Re: Question about postmaster's CPU usage

From: Merlin Moncure <mmoncure(at)gmail(dot)com>
To: Kelphet Xiong <kelphet(at)gmail(dot)com>
Cc: Kevin Grittner <kgrittn(at)ymail(dot)com>, ktm(at)rice(dot)edu, ants(dot)aasma(at)eesti(dot)ee, "pgsql-performance(at)postgresql(dot)org" <pgsql-performance(at)postgresql(dot)org>
Subject: Re: Question about postmaster's CPU usage
Date: 2013-04-01 13:42:42
Message-ID: CAHyXU0ynObZ78d5Wjm+FSbqr7pB4k_eBBXubiSf7fOp2t69uwQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Sat, Mar 30, 2013 at 11:00 PM, Kelphet Xiong <kelphet(at)gmail(dot)com> wrote:
> I guess it is because postgres only uses a single thread to read
> the data or “pushing the data around in RAM” according to Kevin’s statement.
> Then my question is actually why postgres can not use the remaining
> 93.4%CPU.

postgres can use an arbitrary amount of threads to read data, but only
one per database connection.

> Btw, I also tried the command suggested by Ants Aasma, but got an error:
>
> explain (analyze on, timing off) select * from inventory;
> ERROR: syntax error at or near "analyze"
>
> LINE 1: explain (analyze on, timing off) select * from inventory;
>
> ^

Ability to manipulate timing was added in 9.2.

merlin

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Armand du Plessis 2013-04-01 22:35:32 Problems with pg_locks explosion
Previous Message Tom Lane 2013-04-01 00:52:59 Re: query plan estimate