Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 65AFE6500B4 for ; Wed, 30 Jul 2008 22:00:47 -0300 (ADT) Received: from postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 48714-02 for ; Wed, 30 Jul 2008 22:00:37 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mx00.pub.collaborativefusion.com (mx00.pub.collaborativefusion.com [206.210.89.199]) by postgresql.org (Postfix) with ESMTP id 36A676502AF for ; Wed, 30 Jul 2008 22:00:42 -0300 (ADT) Received: from working (198-144-37-131.static.vdsl.nidhog.net [198.144.37.131]) (AUTH: LOGIN wmoran, SSL: TLSv1/SSLv3,256bits,AES256-SHA) by wingspan with esmtp; Wed, 30 Jul 2008 21:00:40 -0400 id 0005643B.48910EB8.00014898 Date: Wed, 30 Jul 2008 20:59:22 -0400 From: Bill Moran To: tarcizioab@c3sl.ufpr.br Cc: pgsql-performance@postgresql.org Subject: Re: Difference between "Explain analyze" and "\timing" Message-Id: <20080730205922.ba73b732.wmoran@collaborativefusion.com> In-Reply-To: <50061.201.15.49.76.1217463555.squirrel@webmail.inf.ufpr.br> References: <50061.201.15.49.76.1217463555.squirrel@webmail.inf.ufpr.br> Organization: Collaborative Fusion Inc. X-Mailer: Sylpheed 2.5.0 (GTK+ 2.12.11; i386-portbld-freebsd7.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200807/262 X-Sequence-Number: 30862 tarcizioab@c3sl.ufpr.br wrote: > > Hello friends > > The commands "\timing" and "EXPLAIN ANALYZE" return values related to the > time of execution of the instruction. These values are "Time:" and "Total > runtime:" respectively. What is the difference between these values, and > the specific use of each command in queries? The time reported by explain will be the time it took the server to execute the query. The time reported by \timing is the time it takes the client (psql) to get the result. This will be the time the server took, plus any network delays and time required to process the query and result on the client side. -- Bill Moran Collaborative Fusion Inc. wmoran@collaborativefusion.com Phone: 412-422-3463x4023 **************************************************************** IMPORTANT: This message contains confidential information and is intended only for the individual named. If the reader of this message is not an intended recipient (or the individual responsible for the delivery of this message to an intended recipient), please be advised that any re-use, dissemination, distribution or copying of this message is prohibited. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message, which arise as a result of e-mail transmission. ****************************************************************