The Spatial Index Optimizer for DB2 is a Java application which analyzes a DB2 table containing a spatial column which is populated with spatial data values. As a result of this analysis, it recommends appropriate spatial index grid sizes.
Sample startup command files are provided for Windows (analyze.cmd) and Linux (analyze.sh).
These command files specify the needed Java libraries and start the SpatialTableAnalyzerMain class. Up to 4 parameters can be specified:
If all of the parameters are specified, the database connection will be made when the application starts. Otherwise, the "Connect" button can be used to specify any missing parameters and then connect to the database. Connection information is displayed in the text area at the bottom of the window.
Once the database connection is made, the database is queried to find all tables containing spatial columns. The user can then select the drop-down boxes to identify the table and spatial column of interest.
Pressing the "Analyze" button causes the identified table to be scanned, collecting statistics about the coordinate range of the data, the number of geometries in the table and the minimum-bounding rectangles (MBR) of the geometries. The statistics and a table of recommended grid sizes are then shown in the text area at the bottom of the window.
The columns have the following meaning:
The File menu can be used to save the contents of the text area.
The View menu can be used to show the histogram values of MBR sizes and the number of geometries that fall into each "bucket". The bucket sizes are based on a logarithmic scale.
If the optional JFreeChart open source charting package is installed, you can display the histogram values graphically.