Re: Removing unneeded self joins

Поиск
Список
Период
Сортировка
От David Rowley
Тема Re: Removing unneeded self joins
Дата
Msg-id CAKJS1f85vtEVqTHReduJd-n2SOOPJDB-=a302HXtUFJ7LfcoGQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Removing unneeded self joins  (Andres Freund <andres@anarazel.de>)
Ответы Re: Removing unneeded self joins  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On 17 May 2018 at 11:00, Andres Freund <andres@anarazel.de> wrote:
> Wonder if we shouldn't just cache an estimated relation size in the
> relcache entry till then. For planning purposes we don't need to be
> accurate, and usually activity that drastically expands relation size
> will trigger relcache activity before long. Currently there's plenty
> workloads where the lseeks(SEEK_END) show up pretty prominently.

While I'm in favour of speeding that up, I think we'd get complaints
if we used a stale value.  We could have uses pg_class.relpages all
along, but it would cause the planner to not work so well in face of
the relation changing size significantly between analyze runs.

FWIW the major case where that does show up is when generating a plan
for a partitioned table with many partitions then pruning all but a
few of them.

-- 
 David Rowley                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services


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

Предыдущее
От: David Rowley
Дата:
Сообщение: Re: Removing unneeded self joins
Следующее
От: David Rowley
Дата:
Сообщение: Re: Incorrect comment in get_partition_dispatch_recurse