Re: [External] RE: Estimate time without running the query - Mailing list pgsql-general

From Vijaykumar Jain
Subject Re: [External] RE: Estimate time without running the query
Date
Msg-id 9777232F-131E-46BF-AF0C-3B2242A99645@opentable.com
Whole thread Raw
In response to RE: Estimate time without running the query  (Johnes Castro <johnescm@hotmail.com>)
Responses Re: [External] RE: Estimate time without running the query  (Neto pr <netoprbr9@gmail.com>)
List pgsql-general

explain analyze would *run* the query and it can be dangerous if it is a DML statement like insert/update/delete 😊

 

If you still want to go with explain analyze,

You can do

 

begin;

explain analyze <my query>;

rollback;

 

thanks,

Vijay

 

From: Johnes Castro <johnescm@hotmail.com>
Date: Friday, September 14, 2018 at 3:12 AM
To: Neto pr <netoprbr9@gmail.com>, PostgreSQL General <pgsql-general@postgresql.org>
Subject: [External] RE: Estimate time without running the query

 

 

Use a command explain analyse.

 

Best Regards.

Johnes Castro


De: Neto pr <netoprbr9@gmail.com>
Enviado: quinta-feira, 13 de setembro de 2018 19:38
Para: PostgreSQL General
Assunto: Estimate time without running the query

 

Dear all,
Only a doubt.
The Explain <query> command only estimates the cost of execution of a query, and does not estimate time for execution.  
I would like know if exists  some way to estimate the time, without running the query?

Best Regards

[]`s Neto

pgsql-general by date:

Previous
From: Johnes Castro
Date:
Subject: RE: Estimate time without running the query
Next
From: Chris Williams
Date:
Subject: Slow shutdowns sometimes on RDS Postgres