5.1.7 Enabling Access to Spatial Index Statistics

The Oracle Database optimizer collects statistics that describe details about the database and its objects. Statistics are critical to the optimizer's ability to pick the best execution plan for a SQL statement. For more information about optimizer statistics, see Oracle Database SQL Tuning Guide.

To be able to use procedures such as DBMS_STATS.GATHER_INDEX_STATS and DBMS_STATS.GATHER_SCHEMA_STATS to gather index statistics related to spatial indexes, the CREATE TABLE privilege must be granted to all database users that will perform the statistics collection.

When you run ANALYZE INDEX on a spatial ___domain index for a different schema (user), the user performing the ANALYZE operation needs the following privileges:

  • CREATE ANY TABLE to create missing temporary tables

  • DROP ANY TABLE to truncate or remove existing temporary tables

If the statistics are successfully collected, a table with the name in the form MDXT_%objID% will be created for each index for which the statistics are collected. Each such table will be populated with spatial statistics data, 512 rows by default.