Re: Gsoc2012 idea, tablesample - Mailing list pgsql-hackers

From Florian Pflug
Subject Re: Gsoc2012 idea, tablesample
Date
Msg-id 9C5FE8E4-488B-4598-B5F6-A70AF520B6AD@phlo.org
Whole thread Raw
In response to Re: Gsoc2012 idea, tablesample  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
List pgsql-hackers
On May11, 2012, at 16:03 , Kevin Grittner wrote:
>> [more complex alternatives]
> 
> I really think your first suggestion covers it perfectly; these more
> complex techniques don't seem necessary to me.

The point of the more complex techniques (especially the algorithm in
my second mail, the "reply to self") was simply to optimize the generation
of a random, uniformly distributed, unique and sorted list of TIDs.

The basic idea is to make sure we generate the TIDs in physical order,
and thus automatically ensure that they are unique. The reduces the memory
(or disk) requirement to O(1) instead of O(n), and (more importantly,
actually) makes the actual implementation much simpler.

best regards,
Florian Pflug



pgsql-hackers by date:

Previous
From: Fujii Masao
Date:
Subject: Re: Can pg_trgm handle non-alphanumeric characters?
Next
From: Fujii Masao
Date:
Subject: Re: incorrect handling of the timeout in pg_receivexlog