Skip to Main Content

Database Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Speed up a spatial query, not sure where to index

user8599099Nov 14 2017 — edited Nov 15 2017

I'm trying to speed up a query against a geometry lookup and I don't know where to put the index. What is happening is I'm creating a polygon and based on its centroid, selecting a value (G.ID) to insert into a column. The sample of my case statement is:

WHEN :new.ZONE = 'ETMA1' THEN

                         SELECT G.ID into :new.WU

                         FROM GRID_ETMA1 G

                         WHERE

                         (sde.st_intersects (st_centroid(:new.shape), G.shape) = 1)

               AND.  (sde.st_within (st_centroid(:new.shape), G.shape) = 1);

Any advise or rewrite is appreciated.

Jeff

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 13 2017
Added on Nov 14 2017
3 comments
997 views