Statistics on views (execute a plan from within analyze)

Поиск
Список
Период
Сортировка
От Oscar Täckström
Тема Statistics on views (execute a plan from within analyze)
Дата
Msg-id 460D345D.6020005@uwaterloo.ca
обсуждение исходный текст
Ответы Re: Statistics on views (execute a plan from within analyze)  (Martijn van Oosterhout <kleptog@svana.org>)
Список pgsql-hackers
Hi,

I am working on a course project on implementing collection of statistics
on views in pgsql. The statistics will be used in conjunction with view
matching in the optimizer, to improve selectivity estimates.

For this to be possible, I need to be able to execute view definitions
from within the analyze code (so I can then sample the result set and
collect the statistics on the sampled tuples). Is there a preferred way
to do this? A simple solution is to use the SPI, but is this really
recommended for use from within this code? I don't want to materialize
the result set, but calculate the statistics directly in memory and just
throw away the tuples that's not part of the sample.

I would be very grateful for any hints about this?

Best

Oscar Täckström
PhD Student
University of Waterloo



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

Предыдущее
От: "Pavan Deolasee"
Дата:
Сообщение: HOT WIP Patch - version 6.3
Следующее
От: "Simon Riggs"
Дата:
Сообщение: One-time plans