Re: incorrect row estimates for primary key join - Mailing list pgsql-performance

From Ben
Subject Re: incorrect row estimates for primary key join
Date
Msg-id 81857BFB-509B-45F5-A7CD-2716A3FFD46A@gmail.com
Whole thread Raw
In response to Re: incorrect row estimates for primary key join  (Marcin Mańk <marcin.mank@gmail.com>)
List pgsql-performance
On Jun 26, 2013, at 5:22 PM, Marcin Mańk wrote:

> On Wed, Jun 26, 2013 at 2:29 AM, Ben <midfield@gmail.com> wrote:
>
>> shouldn't an index scan definitely be fastest here?  you don't need to touch the whole table or index.  maybe there
somethingi have misconfigured here? 
>>
>
> How about you try increasing work_mem ? I think a hash join may be the
> best plan here, and it won't get chosen with low work_mem .

i will increase work_mem and experiment for the other queries, but the query which i was asking about in this
particularquestion was looking up the single smallest key in the primary key index, which seems like it shouldn't need
totouch more than one key, since it can just get the first one from an in-order index traversal.  of course with my
earlierbigtable/jointable join question increasing work_mem makes a lot of sense. 

best regards, ben



pgsql-performance by date:

Previous
From: Marcin Mańk
Date:
Subject: Re: incorrect row estimates for primary key join
Next
From: Shaun Thomas
Date:
Subject: Partitions not Working as Expected