On 2008-12-06, at 11:29, David Lee Lambert wrote:
>>
>
> I use "ORDER BY random() LIMIT :some_small_number" frequently to get
> a "feel"
> for data. That always builds the unrandomized relation and then
> sorts it. I
> guess an alternate path for single-table queries would be to
> randomly choose
> a block number and then a tuple number; but that would be biased
> toward long
> rows (of which fewer can appear in a block).
but that's going to be extremely slow, due to speed of random()
function.