Risky SQL for big data

Description

We have been investigating an issue with a big Oracle spatial data table as it came up with an invalid column type error. I wondered if the datatype of the columns might be wrong so I hit the 'Reload feature type' option on the administration console. The process then seemed to take forever so we investigated what GeoServer was doing and found that it had issued the following SQL command:
ANALYZE TABLE {table_name} ESTIMATE STATISTICS

We tried running this command with a sample specified and it took 6 to 7 minutes to run. The whole table is over 3 million records so the statement GeoServer issued is risky to run on a production environment.

Our database administrator wondered why it is necessary for Geoserver to be running the command in the first place?

All our new and altered tables are analysed at 10pm every night by Oracle anyway and once they have been analysed they do not need doing again unless there is a change to the structure or data.

Whilst we can speculate as to why the command is being run we wondered if this is a process that the end user should be able to control; either by turning it on/off or at the very least being able to set a sample size?

Would be interested to hear other peoples thoughts on this one.
Paul

Environment

Tomcat 7 and Windows Server

Status

Assignee

Unassigned

Reporter

Paul Wittle

Triage

None

Fix versions

None

Affects versions

2.6.3

Components

Priority

Medium
Configure