pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Dimitri Fontaine <dimitri@2ndQuadrant.fr>
To: Lello\, Nick <nick.lello@rentrakmail.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Running PostgreSQL as fast as possible no matter the consequences
Date: Mon, 08 Nov 2010 16:57:14 +0100
Message-ID: <m2mxpj6c6d.fsf@2ndQuadrant.fr> (raw)
In-Reply-To: <AANLkTik5pHrF_OO09iOBCjinq4z+9O8TSjS6kL_ozcJY@mail.gmail.com>
References: <AANLkTimcUYuutQeThCaP-077reGYWwdq-ssKwbPne8TO@mail.gmail.com>
	<AANLkTikVBTRkZCTiqzwRYemJhHLvwwrnA1WHguBpc5Qp@mail.gmail.com>
	<AANLkTin+ZRe5mEOj72ga8xOfbULpYn6kwH4hy_JCBYm2@mail.gmail.com>
	<AANLkTik5pHrF_OO09iOBCjinq4z+9O8TSjS6kL_ozcJY@mail.gmail.com>

"Lello, Nick" <nick.lello@rentrakmail.com> writes:
> A bigger gain can probably be had if you have a tightly controlled
> suite of queries that will be run against the database and you can
> spend the time to tune each to ensure it performs no sequential scans
> (ie: Every query uses index lookups).

Given a fixed pool of queries, you can prepare them in advance so that
you don't usually pay the parsing and planning costs. I've found that
the planning is easily more expensive than the executing when all data
fits in RAM.

Enter pgbouncer and preprepare :
  http://wiki.postgresql.org/wiki/PgBouncer
  http://preprepare.projects.postgresql.org/README.html

Regards,
-- 
Dimitri Fontaine
http://2ndQuadrant.fr     PostgreSQL : Expertise, Formation et Support



view thread (31+ messages)  latest in thread

Message-ID: <m2mxpj6c6d.fsf@2ndQuadrant.fr>
Permalink:  ../m2mxpj6c6d.fsf@2ndQuadrant.fr/
Also on:    postgresql.org/message-id/m2mxpj6c6d.fsf@2ndQuadrant.fr

 · 

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: dimitri@2ndQuadrant.fr, nick.lello@rentrakmail.com
  Subject: Re: Running PostgreSQL as fast as possible no matter the consequences
  In-Reply-To: <m2mxpj6c6d.fsf@2ndQuadrant.fr>

* 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