Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id AA96CB5DCD8 for ; Wed, 26 Oct 2011 04:48:46 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 74009-06 for ; Wed, 26 Oct 2011 07:48:40 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.8.0-rc2 Received: from mail.csc.lt (mail.csc.lt [193.138.191.5]) by mail.postgresql.org (Postfix) with ESMTP id 9891EB5DCDF for ; Wed, 26 Oct 2011 04:48:38 -0300 (ADT) Received: (qmail 13701 invoked by uid 210); 26 Oct 2011 07:48:35 -0000 Received: from mail.nsoft.lt by mail (envelope-from , uid 201) with qmail-scanner-2.05st (clamdscan: 0.97/13851. spamassassin: 3.2.1. perlscan: 2.05st. Clear:RC:1(77.240.249.53):. Processed in 0.01144 secs); 26 Oct 2011 07:48:35 -0000 Received: from mail.nsoft.lt (77.240.249.53) by mail.csc.lt with SMTP; 26 Oct 2011 07:48:35 -0000 Received: from [192.168.16.113] (unknown [77.240.249.53]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mail.nsoft.lt (Postfix) with ESMTPS id 824018E1CC for ; Wed, 26 Oct 2011 10:48:33 +0300 (EEST) Message-ID: <4EA7BB51.4020904@nsoft.lt> Date: Wed, 26 Oct 2011 10:48:33 +0300 From: Julius Tuskenis Organization: UAB nSoft User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:7.0.1) Gecko/20110929 Thunderbird/7.0.1 MIME-Version: 1.0 To: pgsql-performance@postgresql.org Subject: Re: how to use explain analyze References: <8f370776-9394-46ad-b712-ceceaf02b279@hj4g2000vbb.googlegroups.com> In-Reply-To: <8f370776-9394-46ad-b712-ceceaf02b279@hj4g2000vbb.googlegroups.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-10 required=5 tests=BAYES_00=-1.9 X-Spam-Level: X-Archive-Number: 201110/214 X-Sequence-Number: 45436 Hello, Alan On 2011.10.25 17:12, alan wrote: > I'm new to postgres and was wondering how to use EXPLAIN ANALYZE .... > > Can I use the output from ANALYZE EXPLAIN to estimate or predict the > actual time > it would take for a given query to return? Explain analyze executes the query, so you get the actual execution time (not always accurate as some extra job must be done while executing the query to compute the rows and loops). > I ask because I'm writing a typical web app that allows the user to > build and submit a query Be carefull about that idea - especially if a user can write custom queries like "delete from important_table" > Thanks, > Alan > -- Julius Tuskenis Programavimo skyriaus vadovas UAB nSoft mob. +37068233050