Re: Tuple sampling - Mailing list pgsql-patches

From Manfred Koizar
Subject Re: Tuple sampling
Date
Msg-id 8li3b0l68pbasfri8q2880pml3hd7kppf2@email.aon.at
Whole thread Raw
In response to Re: Tuple sampling  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Tuple sampling  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-patches
On Sun, 23 May 2004 17:32:36 -0400, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>I took out the TupleCount typedef and went
>back to using doubles for the tuple counts; this is more consistent with
>the coding style used elsewhere, and I really doubt that it's any
>slower.

Performance was not the primary motivation.  I found it confusing to
have doubles everywhere and not to know whether a variable is declared
as double, because
  . we need the fractional part (e.g. a probability)
  . or it should be able to hold an integral value of more than 32 bits.
So I just invented my own datatype for huge integers.  Long long would
have been a natural choice, but AFAIK its not available on all
platforms.

>I was initially convinced that your implementation of Knuth's algorithm
>S was all wet, so now there's a bunch of comments explaining why it's
>actually correct...

Thanks.  I like your explanation.  My justification for that change was
a lot more complicated.

Servus
 Manfred

pgsql-patches by date:

Previous
From: Fabien COELHO
Date:
Subject: Re: add build utilities in default install
Next
From: Neil Conway
Date:
Subject: updated list rewrite