From: Shaun Thomas <sthomas@optionshouse.com>
To: Scott Marlowe <scott.marlowe@gmail.com>
Cc: M. D. <lists@turnkey.bz>
Cc: Craig James <cjames@emolecules.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: hardware advice
Date: Thu, 27 Sep 2012 16:01:26 -0500
Message-ID: <5064BEA6.3000506@optionshouse.com> (raw)
In-Reply-To: <CAOR=d=02nGu3fMppkVZWeiDYOpWrXi1PT2ZSxx-fZ+Uxp2WuOw@mail.gmail.com>
References: <5064A4DC.5090304@turnkey.bz>
<CAFwQ8rf4Cnt9Ksd+3GbkkWtZ3NM+hYukd1gKRLmsihXnKzVteA@mail.gmail.com>
<5064BB1E.4090904@turnkey.bz>
<CAOR=d=02nGu3fMppkVZWeiDYOpWrXi1PT2ZSxx-fZ+Uxp2WuOw@mail.gmail.com>
On 09/27/2012 03:55 PM, Scott Marlowe wrote:
> Have you tried re-writing this query first? Is there a reason to have
> a bunch of subselects instead of joining the tables? What pg version
> are you running btw? A newer version of pg might help too.
Wow, yeah. I was just about to say something about that. I even pasted
it into a notepad and started cutting it apart, but I wasn't sure about
enough of the column sources in all those subqueries.
It looks like it'd be a very, very good candidate for a window function
or two, and maybe a few CASE statements. But I'm about 80% certain it's
not very efficient as is.
--
Shaun Thomas
OptionsHouse | 141 W. Jackson Blvd. | Suite 500 | Chicago IL, 60604
312-444-8534
sthomas@optionshouse.com
______________________________________________
See http://www.peak6.com/email_disclaimer/ for terms and conditions related to this email
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: sthomas@optionshouse.com, scott.marlowe@gmail.com, lists@turnkey.bz, cjames@emolecules.com
Subject: Re: hardware advice
In-Reply-To: <5064BEA6.3000506@optionshouse.com>
* 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