Re: auto_explain sample rate - Mailing list pgsql-hackers

From Craig Ringer
Subject Re: auto_explain sample rate
Date
Msg-id CAMsr+YFXQ+G_9MHfoRvVo83knPbcaCCS7+P+dft_qJY45cFeEQ@mail.gmail.com
Whole thread Raw
In response to Re: auto_explain sample rate  (Andres Freund <andres@anarazel.de>)
Responses Re: auto_explain sample rate  (Julien Rouhaud <julien.rouhaud@dalibo.com>)
List pgsql-hackers


On 3 June 2015 at 20:04, Andres Freund <andres@anarazel.de> wrote:
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.

---
 Craig Ringer                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services

pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Re: [GENERAL] 9.4.1 -> 9.4.2 problem: could not access status of transaction 1
Next
From: Noah Misch
Date:
Subject: Restore-reliability mode