Faster WFS queries against SDE on Oracle

Description

On SDE on Oracle (and maybe other platforms) WFS queries against layers containing large numbers of features is very slow. This is because WFS requires computing the size of the query result before the query is executed to retrieve data. The SDE API method SEQuery.calculateTableStatistics currently used to do this is very slow (on Oracle at least).

A workaround is to run the query twice, once to count the features and once to fetch the data.

Note that due to an undocumented quirk of the SDE API, it is also necessary to call SEQuery.prepareQueryInfo before SEQuery.setSpatialConstraints. Otherwise, the spatial filter will not apply.

Environment

None

Activity

Show:
Martin Davis
April 24, 2015, 10:03 PM

Attached is a small Java program to test the speed of calculateTableStatistics VS query execution. This might be useful for determining if this problem exists on other platforms.

Martin Davis
April 24, 2015, 10:07 PM
Martin Davis
April 28, 2015, 10:46 PM

PR is merged.

Confirmed that this now gives GeoServer good performance for WFS against SDE on Oracle.

Andrea Aime
February 15, 2017, 11:34 AM

Mass transitioning all resolved issues that have not been updated in the last month to closed state

Fixed

Assignee

Unassigned

Reporter

Martin Davis

Triage

None

Components

Fix versions

Affects versions

Priority

Medium
Configure