pg.ddx.io pgsql-performance@postgresql.org mailing list archive
help / color / mirror / Atom feed From: Pierre C <lists@peufeu.com>
To: pgsql-performance@postgresql.org <pgsql-performance@postgresql.org>
Subject: Re: Postgres refusing to use >1 core
Date: Wed, 11 May 2011 13:06:53 +0200
Message-ID: <op.vvbc5r1ieorkce@apollo13> (raw )
In-Reply-To: <4DC9E733.8040809@postnewspapers.com.au >
References: <BANLkTimohiUa6rOYdxYTwqmvSUg2CRYMHg@mail.gmail.com >
<4DC81A3F020000250003D433@gw.wicourts.gov >
<BANLkTimNTLqQgQeyu=FPOn-5x6F4XnVBJA@mail.gmail.com >
<4DC81D56020000250003D438@gw.wicourts.gov >
<BANLkTi=FH4rX-7OtS9ozjuyXQTNTiRqCmg@mail.gmail.com >
<BANLkTinwkj7syvKkYzU_O7DD14EMzk2Zmg@mail.gmail.com >
<BANLkTi=BvGMvsBNq8DUt=_MPJXZjcC0TWg@mail.gmail.com >
<4DC8B893.3060908@postnewspapers.com.au >
<BANLkTimi+2nviLvWU4zKGtG688+Z84DF6w@mail.gmail.com >
<4DC9E733.8040809@postnewspapers.com.au >
> I suspect your app is doing lots of tiny single-row queries instead of
> efficiently batching things. It'll be wasting huge amounts of time
> waiting for results. Even if every query is individually incredibly
> fast, with the number of them you seem to be doing you'll lose a LOT of
> time if you loop over lots of little SELECTs.
Using unix sockets, you can expect about 10-20.000 queries/s on small
simple selects per core, which is quite a feat. TCP adds overhead, so it's
slower. Over a network, add ping time.
In plpgsql code, you avoid roundtrips, data serializing, and context
switches, it can be 2-4x faster.
But a big SQL query can process millions of rows/s, it is much more
efficient.
view thread (46+ messages) latest in thread
Message-ID: <op.vvbc5r1ieorkce@apollo13>
Permalink: ../op.vvbc5r1ieorkce@apollo13/
Also on: postgresql.org/message-id/op.vvbc5r1ieorkce@apollo13
copy link · copy postgr.es
reply Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: lists@peufeu.com
Subject: Re: Postgres refusing to use >1 core
In-Reply-To: <op.vvbc5r1ieorkce@apollo13>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox