Re: TABLESAMPLE patch
От | Simon Riggs |
---|---|
Тема | Re: TABLESAMPLE patch |
Дата | |
Msg-id | CA+U5nMJCTrmJ+pJ=dS3RaBfKPzu8dGzZfbKeBWxs9h9N2ffTjQ@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: TABLESAMPLE patch (Simon Riggs <simon@2ndQuadrant.com>) |
Ответы |
Re: TABLESAMPLE patch
|
Список | pgsql-hackers |
On 9 April 2015 at 04:52, Simon Riggs <simon@2ndquadrant.com> wrote: > TABLESAMPLE BERNOULLI could work in this case, or any other non-block > based sampling mechanism. Whether it does work yet is another matter. > > This query should be part of the test suite and should generate a > useful message or work correctly. The SQL Standard does allow the WITH query given. It makes no mention of the obvious point that SYSTEM-defined mechanisms might not work, but that is for the implementation to define, AFAICS. The SQL Standard goes on to talk about "possibly non-deterministic" issues. Which in Postgres relates to the point that the results of a SampleScan will never be IMMUTABLE. That raises the possibility of planner issues. We must, for example, never do inner join removal on a sampled relation - we don't do that yet, but something to watch for. On balance, in this release, I would be happier to exclude sampled results from queries, and only allow sampling against base tables. -- Simon Riggs http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, RemoteDBA, Training & Services
В списке pgsql-hackers по дате отправления: