Received: from localhost (maia-5.hub.org [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id D20CC9FBADE for ; Tue, 6 Mar 2007 11:37:47 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-new, port 10024) with ESMTP id 24787-03 for ; Tue, 6 Mar 2007 11:36:57 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.4 Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.168]) by postgresql.org (Postfix) with ESMTP id 70B1F9FBAA4 for ; Tue, 6 Mar 2007 11:37:08 -0400 (AST) Received: by ug-out-1314.google.com with SMTP id k3so212588ugf for ; Tue, 06 Mar 2007 07:37:04 -0800 (PST) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=nUbtxnX3qiiIrtBTeb8QtD8vMfT4zzOroOlb4SpDpm/DZ7HZPWJVbjOAcPJtkbu8q3pixkLxf55i8fE+rXmTHf7F/hSqCLqs1SIMFJXdOzFgKgQedXfXN0zyAx70ZWWqBoNzVxGlw/QWQBUsuONGOn/gOERbCZWDQNHX4jFtwXI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=SpmzejQquTyvefO5luQVIPvKrgCwF8HB1/UtGcYiO5AhHSdmVtT5iq1A75GizIxqk5bCAnAE5NPNY2XeC95+SoSrF+dWAq5PY/e7CBRiU1ZtYFBvT+0j6o9foE9Uvfn3S4+fyenvc/mDKkqCv14vQTVbH31RlGEH1biD3f0H6y8= Received: by 10.114.173.15 with SMTP id v15mr1769057wae.1173195423255; Tue, 06 Mar 2007 07:37:03 -0800 (PST) Received: by 10.114.166.8 with HTTP; Tue, 6 Mar 2007 07:37:03 -0800 (PST) Message-ID: Date: Tue, 6 Mar 2007 10:37:03 -0500 From: "=?ISO-8859-1?Q?Rodrigo_De_Le=F3n?=" To: PostgreSQL , Pgadmin-Support Subject: Re: [SQL] Time of executed query In-Reply-To: <55c095e90703060520s3e4a1feej65f56cee46fd6700@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <55c095e90703060520s3e4a1feej65f56cee46fd6700@mail.gmail.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200703/21 X-Sequence-Number: 6736 On 3/6/07, Ezequias Rodrigues da Rocha wrote: > Hi list, > > It is possible to retrieve the time of a SQL statement leads to > execute ? I would like to put in my application how much time each > operation leads to finish. > > Any suggestion ? > > -- > Ezequias Rodrigues da Rocha > http://ezequiasrocha.blogspot.com/ > use Mozilla Firefox:http://br.mozdev.org/firefox/ Use psql: t=# \timing t=# SELECT * FROM generate_series(1,100000) WHERE random() = 0.234; generate_series ----------------- (0 rows) Time: 125.000 ms t=# See: http://www.postgresql.org/docs/8.2/static/app-psql.html