datasalt/splout-db — pull request #36 by ivanprado (2014-02-14 18:51:14+00:00)
Title: Compact reservoir

I have modified the sampling mechanism. I would like to have a peer review on that to be sure I didn't introduce a big bug. The improvements are:

- More compact reservoir, as now it only launches one job per tablespace. That is big improvement for tablaspaces with many tables.
- Removing the use of memory. Now, samples are sorted using disk. That allows to use bigger samples when creating partition maps, so that partitions distribuition is closer to be even.
- Rename or RESERVOIR and DEFAULT to FULL_SCAN and RANDOM, which have more sense.
- The usage of RESERVOIR by default, as it is the one that really works. RANDOM did not work well on real environments.

I have updated the tests, and also tested it on a production environment.