From: | Shaun Thomas <sthomas(at)optionshouse(dot)com> |
---|---|
To: | Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com> |
Cc: | "M(dot) D(dot)" <lists(at)turnkey(dot)bz>, Craig James <cjames(at)emolecules(dot)com>, <pgsql-performance(at)postgresql(dot)org> |
Subject: | Re: hardware advice |
Date: | 2012-09-27 21:01:26 |
Message-ID: | 5064BEA6.3000506@optionshouse.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-performance |
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(at)optionshouse(dot)com
______________________________________________
See http://www.peak6.com/email_disclaimer/ for terms and conditions related to this email
From | Date | Subject | |
---|---|---|---|
Next Message | David Boreham | 2012-09-27 21:04:51 | Re: hardware advice |
Previous Message | Scott Marlowe | 2012-09-27 20:55:58 | Re: hardware advice |