You should not 'delete' (sdelayer or sdetable) any layer that has been registered with
the geodatabase. Only an ArcGIS delete can clean up all the metadata tables.
An 'sdelayer -o delete' before a 'sdetable -o delete' is the most common command-line
scripting mistake -- the SE_table_delete() function [also used by ArcGIS] cleans up all
ArcSDE metadata, without the need to populate NULLs in all geometry columns (very slow
in large tables).
I haven't ever used anything other than the spatial index grid values I have calculated,
but I haven't ever seen a significant performance difference for grid sizes that weren't
completely wacked (ie all features in one cell or one cell per feature).
The best performance optimization step I've seen is to use centimeter or decimeter scale
coordinate references on global data (especially true with polygon and line data). Since
you're using SQL, you have the chance to override the submillimeter default that increases
table size and slows loading and query performance.
- V