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

From bricklen
Subject Re: incorrect row estimates for primary key join
Date
Msg-id CAGrpgQ9=Oz5ZPgmP5JGfX_HHeHe1=z6m-JCMhhE=JautW7Xxtw@mail.gmail.com
Whole thread Raw
In response to incorrect row estimates for primary key join  (Ben <midfield@gmail.com>)
Responses Re: incorrect row estimates for primary key join
List pgsql-performance
On Mon, Jun 24, 2013 at 3:18 PM, Ben <midfield@gmail.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');


pgsql-performance by date:

Previous
From: Ben
Date:
Subject: incorrect row estimates for primary key join
Next
From: Ben
Date:
Subject: Re: incorrect row estimates for primary key join