[Geoserver-devel] [JIRA] (GEOS-8664) Slow WFS json response because of totalFeatures from large Postgres table

SSA created an issue

GeoServer / ImprovementGEOS-8664

Slow WFS json response because of totalFeatures from large Postgres table

Issue Type:

ImprovementImprovement

Affects Versions:

2.2.x, 2.13.0

Assignee:

Unassigned

Components:

WFS

Created:

28/Mar/18 11:04 AM

Environment:

Related issue reported as a bug: https://osgeo-org.atlassian.net/browse/GEOS-7239

Related commit causing the problem:

https://github.com/geoserver/geoserver/commit/d89885e9408c097120cb6df0e910fdf315f9a229#diff-1b4d0a8e0a53aad5084a306768223d80

This commit has caused an issue with Postgres database because fetching totalFeatures making the request very slow. Postgres fetches count going through all the rows in the table and index helps with vacuum analyze but still, it’s not optimal enough and randomly slows down count query. This should have been a format_options (or something else) if you want totalfeatures or not? In my case the postgres was taking 1 minute to get the count of rows (table with 8 million rows with unique index). After vacuum analyze it took ~4 seconds but still without this totalFeatures the geoserver WFS request takes 0.25 milliseconds.

Totalfeatures is not a standard geojson attribute. Nobody looked into this request in last 3 years. I am still struggling and holding back using geoserver 2.2.5 version.

Priority:

MediumMedium

Reporter:

SSA

Add Comment

Add Comment

Get Jira notifications on your phone! Download the Jira Cloud app for Android or iOS


This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100082-sha1:136250c)

Atlassian logo