Re: inheritance: planning time vs children number vs column number

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: inheritance: planning time vs children number vs column number
Дата
Msg-id 22075.1299000834@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: inheritance: planning time vs children number vs column number  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-performance
I wrote:
> Marc Cousin <cousinmarc@gmail.com> writes:
>> Yes, for the same test case, with a bit of data in every partition and
>> statistics up to date, planning time goes from 20 seconds to 125ms for the 600
>> children/1000 columns case. Which is of course more than acceptable.

> [ scratches head ... ]  Actually, I was expecting the runtime to go up
> not down.  Maybe there's something else strange going on here.

Oh, doh: the failing pg_statistic lookups are all coming from the part
of estimate_rel_size() where it tries to induce a reasonable tuple width
estimate for an empty table (see get_rel_data_width).  Probably not a
case we need to get really tense about.  Of course, you could also argue
that this code is stupid because it's very unlikely that there will be
any pg_statistic entries either.  Maybe we should just have it go
directly to the datatype-based estimate instead of making a boatload
of useless pg_statistic probes.

            regards, tom lane

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

Предыдущее
От: Maciek Sakrejda
Дата:
Сообщение: Re: Two different execution plans for similar requests
Следующее
От: sverhagen
Дата:
Сообщение: Performance trouble finding records through related records