Re: log_duration and \timing times repeatably much higher than "Total runtime" from explain analyze - Mailing list pgsql-general

From Tom Lane
Subject Re: log_duration and \timing times repeatably much higher than "Total runtime" from explain analyze
Date
Msg-id 27207.1065891240@sss.pgh.pa.us
Whole thread Raw
In response to Re: log_duration and \timing times repeatably much higher than "Total runtime" from explain analyze  (Greg Stark <gsstark@mit.edu>)
Responses Re: log_duration and \timing times repeatably much higher than "Total runtime" from explain analyze  (Greg Stark <gsstark@mit.edu>)
List pgsql-general
Greg Stark <gsstark@mit.edu> writes:
> What's really strange is that some other
> queries perform fine but this one and a few others reliably takes this long
> and behaves this way under explain analyze. It's as if there's something
> specific about this query that triggers the delay.

You haven't shown us the query (naughty naughty) but I'm wondering about
extremely-expensive-to-evaluate immutable functions.  An immutable
function applied to constant arguments will be evaluated in the planner.
The difference between total time and run time has to be essentially all
parse/rewrite/plan time, and the query doesn't look complex enough to be
needing a full second to plan without some, um, outside help.

            regards, tom lane

pgsql-general by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: log_duration and \timing times repeatably much higher
Next
From: Tom Lane
Date:
Subject: Re: Partial indices...