[QGIS-Developer] QGIS Oracle performance

Tomas Straupis tomasstraupis at gmail.com
Sat Nov 30 10:16:40 PST 2019


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?

  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


More information about the QGIS-Developer mailing list