Re: incorrect row estimates for primary key join

Поиск
Список
Период
Сортировка
От bricklen
Тема Re: incorrect row estimates for primary key join
Дата
Msg-id CAGrpgQ9=Oz5ZPgmP5JGfX_HHeHe1=z6m-JCMhhE=JautW7Xxtw@mail.gmail.com
обсуждение исходный текст
Ответ на incorrect row estimates for primary key join  (Ben <midfield@gmail.com>)
Ответы Re: incorrect row estimates for primary key join  (Ben <midfield@gmail.com>)
Список 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 по дате отправления:

Предыдущее
От: Ben
Дата:
Сообщение: incorrect row estimates for primary key join
Следующее
От: Ben
Дата:
Сообщение: Re: incorrect row estimates for primary key join