On 2015-06-03 18:54:24 +0800, Craig Ringer wrote: > OK, here we go.
Hm. Wouldn't random sampling be better than what you do? If your queries have a pattern to them (e.g. you always issue the same 10 queries in succession), this will possibly only show a subset of the queries.
I think a formulation in fraction (i.e. a float between 0 and 1) will also be easier to understand.
Could be, yeah. I was thinking about the cost of generating a random each time, but it's going to vanish in the noise compared to the rest of the costs in query execution.