Re: Gsoc2012 idea, tablesample

Поиск
Список
Период
Сортировка
От Qi Huang
Тема Re: Gsoc2012 idea, tablesample
Дата
Msg-id BAY159-W2914D3B136B8733DCFD1A7A33F0@phx.gbl
обсуждение исходный текст
Ответ на Re: Gsoc2012 idea, tablesample  (Stephen Frost <sfrost@snowman.net>)
Ответы Re: Gsoc2012 idea, tablesample  (Stephen Frost <sfrost@snowman.net>)
Список pgsql-hackers
> > 2. It's not very useful if it's just a dummy replacement for "WHERE
> > random() < ?". It has to be more advanced than that. Quality of the
> > sample is important, as is performance. There was also an
> > interesting idea of on implementing monetary unit sampling.

> In reviewing this, I got the impression (perhaps mistaken..), that
> different sampling methods are defined by the SQL standard and that it
> would simply be us to implement them according to what the standard
> requires.

> > I think this would be a useful project if those two points are taken
> > care of.

> Doing it 'right' certainly isn't going to be simply taking what Neil did
> and updating it, and I understand Tom's concerns about having this be
> more than a hack on seqscan, so I'm a bit nervous that this would turn
> into something bigger than a GSoC project.


As Christopher Browne mentioned, for this sampling method, it is not possible without scanning the whole data set. It improves the sampling quality but increases the sampling cost. I think it should also be using only for some special sampling types, not for general. The general sampling methods, as in the SQL standard, should have only SYSTEM and BERNOULLI methods. 

Best Regards and Thanks
Huang Qi Victor
Computer Science of National University of Singapore

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

Предыдущее
От: Greg Stark
Дата:
Сообщение: Re: Gsoc2012 idea, tablesample
Следующее
От: Stephen Frost
Дата:
Сообщение: Re: Gsoc2012 idea, tablesample