Re: Partitioning and performance

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Partitioning and performance
Дата
Msg-id 19015.1432831858@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Partitioning and performance  (Ravi Krishna <sravikrishna3@gmail.com>)
Ответы Re: Partitioning and performance
Re: Partitioning and performance
Список pgsql-general
Ravi Krishna <sravikrishna3@gmail.com> writes:
> Perhaps I was not clear. The planner is excluding partitions which can
> not contain the rows looked up in the WHERE clause. However it is
> still scanning the parent table.

Sure, because you don't have a constraint forbidding the parent from
having a matching row, no?

In older versions of PG there wasn't any way around this, but recent
versions allow you to mark a constraint as NO INHERIT, which would
let you attach such a constraint to the parent only.

By and large, though, this doesn't really matter, since an empty
parent table won't cost anything much to scan.  If it's significant
relative to the child table access time then you probably didn't
need partitioning in the first place.

            regards, tom lane


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

Предыдущее
От: Jan Lentfer
Дата:
Сообщение: Re: Partitioning and performance
Следующее
От: Ravi Krishna
Дата:
Сообщение: Re: Partitioning and performance