pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Mark Stosberg <mark@summersault.com>
To: pgsql-performance@postgresql.org
Subject: getting the most of out multi-core systems for repeated complex SELECT statements
Date: Thu, 03 Feb 2011 10:08:35 -0500
Message-ID: <iiegdj$jtg$1@dough.gmane.org> (raw)


Each night we run over a 100,000 "saved searches" against PostgreSQL
9.0.x. These are all complex SELECTs using "cube" functions to perform a
geo-spatial search to help people find adoptable pets at shelters.

All of our machines in development in production have at least 2 cores
in them, and I'm wondering about the best way to maximally engage all
the processors.

Now we simply run the searches in serial. I realize PostgreSQL may be
taking advantage of the multiple cores some in this arrangement, but I'm
seeking advice about the possibility and methods for running the
searches in parallel.

One naive I approach I considered was to use parallel cron scripts. One
would run the "odd" searches and the other would run the "even"
searches. This would be easy to implement, but perhaps there is a better
way.  To those who have covered this area already, what's the best way
to put multiple cores to use when running repeated SELECTs with PostgreSQL?

Thanks!

    Mark




view thread (20+ messages)  latest in thread

Message-ID: <iiegdj$jtg$1@dough.gmane.org>
Permalink:  ../iiegdj$jtg$1@dough.gmane.org/
Also on:    postgresql.org/message-id/iiegdj$jtg$1@dough.gmane.org

 · 

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: mark@summersault.com
  Subject: Re: getting the most of out multi-core systems for repeated complex SELECT statements
  In-Reply-To: <iiegdj$jtg$1@dough.gmane.org>

* 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