> True, although thinking about it more, they're not being sent to the > same place. auto_explain goes to the log, and this goes to a view. > What about something like this: > progressive_explain = on | off > progressive_explain_inteval = 5s > If progressive_explain is off, then we don't populate the view. If > it's on, then we populate the view during query startup. Every time > the interval elapses, we update it again. If you want to update the > view just once at query startup and not thereafter, you can set > progressive_explain_interval = 0.
That also works. My concern is that with that approach there is a huge "hidden" change of execution behavior between setting progressive_explain_inteval to 0 and something greater than that. Setting to 0 doesn't do anything other than dumping the plain plan at query start. Setting any other value will enable instrumentation under the hood. This would have to be very well documented. I'm still more inclined to use: progressive_explain = off | explain | analyze progressive_explain_interval = any millisecond greater than a min threshold (currently 10ms). It doesn't make sense to be dumping the instrumented plan every 1ms for example, IMHO.