Re: TABLESAMPLE patch

Поиск
Список
Период
Сортировка
От Tomas Vondra
Тема Re: TABLESAMPLE patch
Дата
Msg-id 54EA7584.8050509@2ndquadrant.com
обсуждение исходный текст
Ответ на Re: TABLESAMPLE patch  (Petr Jelinek <petr@2ndquadrant.com>)
Список pgsql-hackers
Hi,

On 22.2.2015 18:57, Petr Jelinek wrote:
> Tomas noticed that the patch is missing error check when TABLESAMPLE
> is used on view, so here is a new version that checks it's only used 
> against table or matview.
> 
> No other changes.

Curious question - could/should this use page prefetch, similar to what
bitmap heap scan does? I believe the answer is 'yes'.

With SYSTEM that should be rather straightforward to implement, because
it already works at page level, and it's likely to give significant
performance speedup, similar to bitmap index scan:

http://www.postgresql.org/message-id/CAHyXU0yiVvfQAnR9cyH=HWh1WbLRsioe=mzRJTHwtr=2azsTdQ@mail.gmail.com

With BERNOULLI that might be more complex to implement because of the
page/tuple sampling, and the benefit is probably much lower than for
SYSTEM because it's likely that at least one tuple will be sampled.

I'm not saying it has to be done in this CF (or that it makes the patch
uncommitable).

For example, this seems like a very nice project for the GSoC (clear
scope, not too large, ...).

-- 
Tomas Vondra                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



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

Предыдущее
От: Tomas Vondra
Дата:
Сообщение: Re: Abbreviated keys for text cost model fix
Следующее
От: Andrew Dunstan
Дата:
Сообщение: Re: Allow "snapshot too old" error, to prevent bloat