<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, 3 Aug 2020 at 17:12, <<a href="mailto:ruvenml@beamerbrooks.com">ruvenml@beamerbrooks.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
  
    
  
  <div>
    <br>
    <font face="Helvetica, Arial, sans-serif">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.<br>
      <br>
      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.<br>
      <br>
      Ruven Brooks</font>
    <div>On 8/3/2020 9:56 AM, Shaozhong SHI
      wrote:<br>
    </div>
    <blockquote type="cite">
      
      <div dir="ltr">Hi,
        <div><br>
        </div>
        <div>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.</div>
        <div><br>
        </div>
        <div>"Explain analyze" gives an estimate of time needed, but for
          a Big Data query, one has to wait to get an answer,</div>
        <div><br>
        </div>
        <div>Is there a way to get an estimate of time for running a
          query, without actually running it.</div>
        <div><br>
        </div>
        <div>Looking forward to hearing from you.</div>
        <div><br>
        </div>
        <div>Regards,</div>
        <div><br>
        </div>
        <div>Shao</div>
      </div>
      <br>
      <fieldset></fieldset>
      <pre>_______________________________________________
postgis-users mailing list
<a href="mailto:postgis-users@lists.osgeo.org" target="_blank">postgis-users@lists.osgeo.org</a>
<a href="https://lists.osgeo.org/mailman/listinfo/postgis-users" target="_blank">https://lists.osgeo.org/mailman/listinfo/postgis-users</a></pre>
    </blockquote>
    Hi, Ruven,</div></blockquote><div><br></div><div>Thanks for your tips.   </div><div><br></div><div>Can you please expand on how to understand and use cost output?  My brain seems to understand time taken, and can not get around with this cost output.</div><div><br></div><div>Regards,</div><div><br></div><div>Shao</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">

_______________________________________________<br>
postgis-users mailing list<br>
<a href="mailto:postgis-users@lists.osgeo.org" target="_blank">postgis-users@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/postgis-users" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/postgis-users</a></blockquote></div></div>