Re: TABLESAMPLE patch - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: TABLESAMPLE patch
Date
Msg-id 55282233.9040903@gmx.net
Whole thread Raw
In response to Re: TABLESAMPLE patch  (Simon Riggs <simon@2ndQuadrant.com>)
List pgsql-hackers
On 4/9/15 7:47 PM, Simon Riggs wrote:
> Having a function-base implementation allows stratified sampling or
> other approaches suited directly to user's data.

How would you implement stratified sampling with this function
interface?  You'd need to pass the stratification criteria into the
function somehow.  But those would be column names or expressions.

> I don't think its reasonable to force all methods to offer both limits
> on numbers of rows or percentages. They may not be applicable.

Examples?

In a stratified sample I would still ask for X percent from each stratum
or Y rows from each stratum.




pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: Replication identifiers, take 4
Next
From: Peter Eisentraut
Date:
Subject: Re: TABLESAMPLE patch