Re: how does the planer to estimate row when i use order by and group by

Поиск
Список
Период
Сортировка
От Marti Raudsepp
Тема Re: how does the planer to estimate row when i use order by and group by
Дата
Msg-id CABRT9RBdQvdXjhY5qKEAkXvRqT+zBBazehqnV9hoAaOtDpYHDA@mail.gmail.com
обсуждение исходный текст
Ответ на how does the planer to estimate row when i use order by and group by  (楊新波 <silent0608@gmail.com>)
Список pgsql-performance
On Tue, Aug 12, 2014 at 5:59 AM, 楊新波 <silent0608@gmail.com> wrote:
> why does the planer estimate 200 rows when i use order by and group by .
> evn:postgresql 8.4 and 9.3

> Can anybody suggest something or explain this behavior?

Because the table is empty, analyze doesn't store any stats for the
table, so the planner uses some default guesses.

This is actually beneficial for cases where you have done some inserts
to a new table, and autovacuum hasn't gotten around to analyzing it
yet. And it rarely hurts because any query plan will be fast when
there's no data.

Regards,
Marti


В списке pgsql-performance по дате отправления:

Предыдущее
От: Mark Kirkwood
Дата:
Сообщение: Re: 60 core performance with 9.3
Следующее
От: Josh Berkus
Дата:
Сообщение: Re: 60 core performance with 9.3