Skip site navigation (1) Skip section navigation (2)

Re: How to clock the time spent for query parsing and planning?

From: Igor <ischtein(at)gmail(dot)com>
To: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
Cc: "pgsql-performance(at)postgresql(dot)org" <pgsql-performance(at)postgresql(dot)org>
Subject: Re: How to clock the time spent for query parsing and planning?
Date: 2011-12-31 00:59:57
Message-ID: C83953B7-1362-40A6-A5FA-F323CC833E58@gmail.com (view raw or flat)
Thread:
Lists: pgsql-performance
Hi Pavel,

Thanks for your reply.

My understanding is that Explain provides measurements of query run time but does not include or specifies the timing for  planning and for running optimization algorithms. 

Pls let me know if my understanding is not  correct. In that case, how do I find out how much of query time is spent to prepare the query and how much time is spent executing it. 

Thanks,
James

On Dec 27, 2011, at 1:38 AM, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> wrote:

> Hello
> 
> 2011/12/23 Igor Schtein <ischtein(at)gmail(dot)com>:
>> I'd like to find some measurements/figures of query preparation and planning
>> time to justify the use of prepared statements and stored procedures.
>> I know that complex queries have larger preparation time. Though, is it
>> possible to explicitly measure the time the optimizer spends parsing and
>> planning for query execution?
> 
> You can use time for EXPLAIN statement
> 
> Regards
> 
> Pavel Stehule
> 
>> 
>> Thank you,
>> James

In response to

Responses

pgsql-performance by date

Next:From: Pavel StehuleDate: 2011-12-31 07:49:37
Subject: Re: How to clock the time spent for query parsing and planning?
Previous:From: Tom LaneDate: 2011-12-30 22:29:03
Subject: Re: Query performance - normal on 9.0.4, slow from 9.0.5 onwards

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group