Re: incorrect row estimates for primary key join

From: bricklen <bricklen(at)gmail(dot)com>
To: Ben <midfield(at)gmail(dot)com>
Cc: "pgsql-performance(at)postgresql(dot)org list" <pgsql-performance(at)postgresql(dot)org>
Subject: Re: incorrect row estimates for primary key join
Date: 2013-06-24 23:23:26
Message-ID: CAGrpgQ9=Oz5ZPgmP5JGfX_HHeHe1=z6m-JCMhhE=JautW7Xxtw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Mon, Jun 24, 2013 at 3:18 PM, Ben <midfield(at)gmail(dot)com> wrote:

>
> create table jointable (
> id1 integer not null,
> id2 date not null,
> id3 integer not null,
> id4 time not null,
> id5 integer not null
> );
>
> and then perform a join against this table.
>

Is it safe to assume you ANALYZEd the jointable after creating it? (I
assume so, just checking)

> as you increase the number of rows in jointable, the planner switches to a
> sort + merge. in this case jointable has roughly 2 million rows.
>

Can you post the output of:

SELECT version();
SELECT name, current_setting(name), source
FROM pg_settings
WHERE source NOT IN ('default', 'override');

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Ben 2013-06-24 23:48:47 Re: incorrect row estimates for primary key join
Previous Message Ben 2013-06-24 22:18:11 incorrect row estimates for primary key join