This paper explores the creation of Oracle 10g spatial’s spatial index and how to use spatial index to optimize spatial analysis. The spatial query is mainly carried out by relevant spatial operator and spatial function. Using spatial operator and spatial index can realize spatial query optimization.