Re: totally different plan when using partitions + request

Поиск
Список
Период
Сортировка
От Richard Huxton
Тема Re: totally different plan when using partitions + request
Дата
Msg-id 4A84239C.2080803@archonet.com
обсуждение исходный текст
Ответ на Re: totally different plan when using partitions + request  (Scara Maccai <m_lists@yahoo.it>)
Ответы Re: totally different plan when using partitions + request
Список pgsql-general
Scara Maccai wrote:
> I'm still looking into it, but it seems the difference in the 2 plans is due to the fact that when using partitions,
theplanner adds the time it would take to index-scan the empty "root" table. 
> But that table will never contain any data...
>
> Is there any chance to have the partitioning mechanism know that a table will always contain no data, because only
inheritingtable will contain data? 
>
> Having the planner line:
>     -> Index Scan using teststscell13_pkey on teststscell13 data1 (cost=0.0..3.9 rows=1 width=16) (actual
time=0.006..0.006rows=0 loops=285) 
>
> doesn't make any sense: that table will never have any data.
> I'd like to have a way to tell that to Postgresql...

It's one index probe and takes virtually no time at all. That's not your
problem.

--
   Richard Huxton
   Archonet Ltd

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

Предыдущее
От: Philip Rhoades
Дата:
Сообщение: PostgreSQL for Firefox Bookmarks?
Следующее
От: Scara Maccai
Дата:
Сообщение: Re: totally different plan when using partitions + request