[QGIS-Developer] QGIS Oracle performance

Alessandro Pasotti apasotti at gmail.com
Sat Nov 30 10:23:36 PST 2019


On Sat, Nov 30, 2019 at 7:16 PM Tomas Straupis <tomasstraupis at gmail.com>
wrote:

> Hello
>
>   I've made some performance test of QGIS Server + Oracle provider and
> do not know how to proceed further. As I'm not sure if my thoughts are
> correct, should I first discuss them here or should I open an issue on
> GitHub?
>
>   Question is about QgsOracleProvider::getGeometryDetails() which is
> called when opening a project. This function does a number of queries
> determining information of layers in a project. These queries can
> sometimes be quite slow when working with large views joining tables
> with millions of rows (in my test case they take 2-3 minutes).
>
>   This procedure is called even when opening a project where this
> information is already saved in project file. So the only purpose
> could be to check if nothing has changed. But when project file is
> used in QGIS Server, this adds 2-3 minutes of start time for each
> server process. And the same 2-3 minutes are spent when during high
> load apache adds a new QGIS server process to help with high load.
> (The WMS/WFS related queries themselves are executed and response is
> sent out in <1 second).
>
>   Do I understand correctly, that skipping this re-testing should be
> OK at least in server?
>
>
Hi Tomas,

I don't know much about Oracle provider but I would say yes, there is also
a setting named useEstimatedMetadata that should be used to tell the
provider
if we want to skip the deep and costly analysis and scans, at least in
postgres
this works well, not sure about Oracle.


  I've tried skipping all recalculations and returning values from
> project with a code like this in the start of getGeometryDetails()
>
>   if ( mRequestedGeomType != QgsWkbTypes::Unknown && mSrid > 0 ) {
>     mHasSpatialIndex = true; // default value is false
>     mDetectedGeomType = mRequestedGeomType;
>     mValid = true;
>     return mValid;
>   }
>
>   And server processes are started in seconds instead of minutes. It
> is also possible to open project file in QGIS Desktop, add new layers
> etc.
>
> --
> Tomas
> _______________________________________________
> QGIS-Developer mailing list
> QGIS-Developer at lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer



-- 
Alessandro Pasotti
w3:   www.itopen.it
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20191130/ce9d7bb4/attachment-0001.html>


More information about the QGIS-Developer mailing list