Bad performance using st_geometry functions in oracle

Discussion created by ufeliciano on Mar 14, 2014
Latest reply on Mar 16, 2014 by vangelo-esristaff
We have a 10.2 geodatabase running in an Oracle AIX server.  I'm testing running some simple st functions to see how it works, but the performance so far is really bad.  The query tested is...

select t.designatio,p.catastro
from GIS.puntos_control t ,GIS.parcelas_evw p
where sde.st_intersects (t.shape,p.shape)=1
and rownum<5;

puntos_control is a point feature (198 features) and parcelas is a polygon feature (1,381,141 features).  I want the designation number of each point and the parcel number of each polygon it intersects with.  I added rownum<5 to have a quick response, but it took 3952.163 seconds to fetched just 4 rows.  In the database I can see a lot of non-database CPU time and the wait event "External procedure call".  Tried the same thing in a test PostGIS database with no geodatabase and it took a few seconds for all the points.  Any suggestions are welcome.