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 query.

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
[email protected]
https://lists.osgeo.org/mailman/listinfo/postgis-users

_______________________________________________
postgis-users mailing list
[email protected]
https://lists.osgeo.org/mailman/listinfo/postgis-users

Reply via email to