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=2azs...@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 -- Sent via pgsql-hackers mailing list (firstname.lastname@example.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers