Re: hardware advice
От | Shaun Thomas |
---|---|
Тема | Re: hardware advice |
Дата | |
Msg-id | 5064BEA6.3000506@optionshouse.com обсуждение исходный текст |
Ответ на | Re: hardware advice (Scott Marlowe <scott.marlowe@gmail.com>) |
Ответы |
Re: hardware advice
|
Список | 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@optionshouse.com ______________________________________________ See http://www.peak6.com/email_disclaimer/ for terms and conditions related to this email
В списке pgsql-performance по дате отправления: