Re: How to find the query completeion time?

From: SHARMILA JOTHIRAJAH <sharmi_jo(at)yahoo(dot)com>
To: pgsql-general(at)postgresql(dot)org, "Leif B(dot) Kristensen" <leif(at)solumslekt(dot)org>
Subject: Re: How to find the query completeion time?
Date: 2009-04-02 15:38:25
Message-ID: 354704.57305.qm@web110714.mail.gq1.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

--- On Thu, 4/2/09, Leif B. Kristensen <leif(at)solumslekt(dot)org> wrote:

> From: Leif B. Kristensen <leif(at)solumslekt(dot)org>
> Subject: Re: [GENERAL] How to find the query completeion time?
> To: pgsql-general(at)postgresql(dot)org
> Date: Thursday, April 2, 2009, 10:53 AM
> On Thursday 2. April 2009, SHARMILA
> JOTHIRAJAH wrote:
> >Hi,
> >Is there a way in Postgres to find when a particular
> query will
> > finish?
> >
> >For example, for a query like this
> >SELECT * FROM TABLE1
> >Can we find out from any of the catalog tables(or any
> other way) when
> > this query is likely to  complete?
> >
> >Thanks
>
> How about
>
> EXPLAIN ANALYZE SELECT * FROM TABLE1
>
> ?
>
> or just set \timing in the psql and run the query.
This will basically execute the query and return the time taken. Is there a way to know when an "already-started" query will end?

In ORACLE I can get that information from V$SESSION_LONGOPS view which will give the approx TIME_REMAINING to complete running queries. Is there a similar way in postgres?

> --
> Leif Biberg Kristensen | Registered Linux User #338009
> Me And My Database: http://solumslekt.org/blog/
>
> --
> Sent via pgsql-general mailing list (pgsql-general(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
>

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Kev 2009-04-02 15:40:51 indirect membership in group roles
Previous Message linnewbie 2009-04-02 15:06:36 Re: Posgres Adding braces at beginning and end of text (html) content