Re: Bottleneck? - Mailing list pgsql-performance

From Scott Marlowe
Subject Re: Bottleneck?
Date
Msg-id dcc563d10908060003m3b487ee1h4da80dc5a7213aa1@mail.gmail.com
Whole thread Raw
In response to Re: Bottleneck?  (wkipjohn@gmail.com)
Responses Re: Bottleneck?  (Ip Wing Kin John <wkipjohn@gmail.com>)
List pgsql-performance
OK, two things.  First the row estimate starts going way off around
the time it gets to the hash aggregate / nested loop which seems to be
making the planner use a bad plan for this many rows.  You can try
issuing

set enable_nestloop = off;

before running the query and see if that makes it any faster.

Secondly, the first time you run this query you are reading the 1.8G
table sequentially, and at about 55MB/s, which isn't gonna get faster
without more / faster drives under your machine.

On Thu, Aug 6, 2009 at 12:50 AM, Ip Wing Kin John<wkipjohn@gmail.com> wrote:
> Here u go. Both in the same file.
>
> On Thu, Aug 6, 2009 at 4:48 PM, Scott Marlowe<scott.marlowe@gmail.com> wrote:
>> Much better... Looks like I got the second one...
>>
>> Can I get the first one too?  Thx.
>>
>> On Thu, Aug 6, 2009 at 12:46 AM, Ip Wing Kin John<wkipjohn@gmail.com> wrote:
>>> Hope you can get it this time.
>>>
>>> John
>>>
>>> On Thu, Aug 6, 2009 at 4:34 PM, Scott Marlowe<scott.marlowe@gmail.com> wrote:
>>>> Sorry man, it's not coming through.  Try it this time addressed just to me.
>>>>
>>>> On Thu, Aug 6, 2009 at 12:23 AM, Ip Wing Kin John<wkipjohn@gmail.com> wrote:
>>>>> Hi scott
>>>>>
>>>>> I attached the query plan with this email. The top one is the first
>>>>> run after I restarted my machine. And the bottom one is the second
>>>>> run.
>>>>>
>>>>> I am using PostgreSQL 8.3 on Solaris 10.
>>>>>
>>>>> cheers
>>>>>
>>>>> On Thu, Aug 6, 2009 at 4:15 PM, Scott Marlowe<scott.marlowe@gmail.com> wrote:
>>>>>> On Wed, Aug 5, 2009 at 11:21 PM, <wkipjohn@gmail.com> wrote:
>>>>>>> Sorry post again.
>>>>>>
>>>>>> Nope, still mangled.  Can you attach it?
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> John
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> When fascism comes to America, it will be intolerance sold as diversity.
>>>>
>>>
>>>
>>>
>>> --
>>> John
>>>
>>
>>
>>
>> --
>> When fascism comes to America, it will be intolerance sold as diversity.
>>
>
>
>
> --
> John
>



--
When fascism comes to America, it will be intolerance sold as diversity.

pgsql-performance by date:

Previous
From: Ip Wing Kin John
Date:
Subject: Re: Bottleneck?
Next
From: Ray Stell
Date:
Subject: Re: Bottleneck?