Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 9236

Why am I Observing Poor Geospatial Query Performance?

$
0
0

Our HANA Rev. 72 Amazon instance is performing very poorly when selecting geospatial polygons from tables.  I'm hoping someone out there knows why.

 

Here's one example.  The table below has just 51 records; one for each state (includingPuerto Rico). The table has a GEOMETRY column that contains a polygon outline of the state.

US_STATES.JPG

The query below uses ST_Covers() to find the state at a given latitude, longitude. It takes more than 9 seconds to execute!

 

SELECT  STATE_NAME, STATE_FIPS as STATE_ID, SHAPE.ST_AsGeoJSON() as STATE_POLYGON

from GEO_SHAPES.US_STATES where SHAPE.ST_Covers(new ST_Point('POINT(-105.123 39.456)')) = 1

 

Statement 'SELECT STATE_NAME, STATE_FIPS as STATE_ID, SHAPE.ST_AsGeoJSON() as STATE_POLYGON from ...'  successfully executed in 9.326 seconds  (server processing time: 8.629 seconds)

 

Essentially all the time goes into the SHAPE.ST_Covers() function.  The same query without this function runs in 6 ms.

 

Does anybody have any idea why?


Viewing all articles
Browse latest Browse all 9236

Trending Articles