[postgis-users] How to estimate the time taken for a query plan without actually running it?

ruvenml at beamerbrooks.com ruvenml at beamerbrooks.com
Mon Aug 3 09:11:31 PDT 2020

In a word, no.  Unless the query returns a constant value, the run time 
will depend on the values of the data and on what machine it's being run 
on and the easiest way to determine those things are to actually run the 

If what you want is guidance about which queries are going to need 
optimization, the cost output from the EXPLAIN command will probably 
tell you where to spend your time.  The cost output will also tell you 
whether you have succeeded in improving the relative performance of a 
query without actually having to run it.

Ruven Brooks
On 8/3/2020 9:56 AM, Shaozhong SHI wrote:
> Hi,
> I tried to use "explain" to look into the query plan.  It only gives 
> me the cost and rows, and does not give an estimate of time to run the 
> query.
> "Explain analyze" gives an estimate of time needed, but for a Big Data 
> query, one has to wait to get an answer,
> Is there a way to get an estimate of time for running a query, without 
> actually running it.
> Looking forward to hearing from you.
> Regards,
> Shao
> _______________________________________________
> postgis-users mailing list
> postgis-users at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/postgis-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20200803/90743d75/attachment.html>

More information about the postgis-users mailing list