<div dir="ltr"><div dir="ltr"></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Nov 30, 2019 at 7:16 PM Tomas Straupis <<a href="mailto:tomasstraupis@gmail.com">tomasstraupis@gmail.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">Hello<br>
<br>
  I've made some performance test of QGIS Server + Oracle provider and<br>
do not know how to proceed further. As I'm not sure if my thoughts are<br>
correct, should I first discuss them here or should I open an issue on<br>
GitHub?<br>
<br>
  Question is about QgsOracleProvider::getGeometryDetails() which is<br>
called when opening a project. This function does a number of queries<br>
determining information of layers in a project. These queries can<br>
sometimes be quite slow when working with large views joining tables<br>
with millions of rows (in my test case they take 2-3 minutes).<br>
<br>
  This procedure is called even when opening a project where this<br>
information is already saved in project file. So the only purpose<br>
could be to check if nothing has changed. But when project file is<br>
used in QGIS Server, this adds 2-3 minutes of start time for each<br>
server process. And the same 2-3 minutes are spent when during high<br>
load apache adds a new QGIS server process to help with high load.<br>
(The WMS/WFS related queries themselves are executed and response is<br>
sent out in <1 second).<br>
<br>
  Do I understand correctly, that skipping this re-testing should be<br>
OK at least in server?<br>
<br></blockquote><div><br></div><div>Hi Tomas,</div><div><br></div><div>I don't know much about Oracle provider but I would say yes, there is also</div><div> a setting named useEstimatedMetadata that should be used to tell the provider <br></div><div>if we want to skip the deep and costly analysis and scans, at least in postgres <br></div><div>this works well, not sure about Oracle.<br></div><div><br></div><div></div><div> <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
  I've tried skipping all recalculations and returning values from<br>
project with a code like this in the start of getGeometryDetails()<br>
<br>
  if ( mRequestedGeomType != QgsWkbTypes::Unknown && mSrid > 0 ) {<br>
    mHasSpatialIndex = true; // default value is false<br>
    mDetectedGeomType = mRequestedGeomType;<br>
    mValid = true;<br>
    return mValid;<br>
  }<br>
<br>
  And server processes are started in seconds instead of minutes. It<br>
is also possible to open project file in QGIS Desktop, add new layers<br>
etc.<br>
<br>
-- <br>
Tomas<br>
_______________________________________________<br>
QGIS-Developer mailing list<br>
<a href="mailto:QGIS-Developer@lists.osgeo.org" target="_blank">QGIS-Developer@lists.osgeo.org</a><br>
List info: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>
Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-developer</a></blockquote></div><br clear="all"><br>-- <br><div dir="ltr" class="gmail_signature">Alessandro Pasotti<br>w3:   <a href="http://www.itopen.it" target="_blank">www.itopen.it</a></div></div>