Re: log_duration and \timing times repeatably much higher than "Total runtime" from explain analyze

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Greg Stark <gsstark(at)mit(dot)edu>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: log_duration and \timing times repeatably much higher than "Total runtime" from explain analyze
Date: 2003-10-11 16:54:00
Message-ID: 27207.1065891240@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Greg Stark <gsstark(at)mit(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2003-10-11 17:11:59 Re: [GENERAL] Partial indices...
Previous Message Alvaro Herrera 2003-10-11 16:04:32 Re: log_duration and \timing times repeatably much higher