Hi, colleagues
I am facing performance problems with GeoSpatial functions in SPS9.
I populated a Column Table with over 1 million of records with latitude and longitude fields and made a Calculation View with that.
Now, I want to filter records of this view with a square that has the bounds of a map in the client-side.
I'm filtering the results because it is too much data to display in the client side at once.
The where clause look like this one:
(NEW ST_Polygon( 'Polygon(( -34.58284565085074 -58.42738261914063, -34.5714747472561 -58.42738261914063, -34.5714747472561 -58.4441114552002, -34.58284565085074 -58.4441114552002, -34.58284565085074 -58.42738261914063 ))').ST_Contains(NEW ST_Point( "GEO_X", "GEO_Y" )) = 1)
The whole query execution lasts 9 seconds, and the filter step takes 3,5 seconds:
The most worrying thing is that the query needs 21,1 GB of memory:
versus 2,1 GB without the where clause:
If we execute the query several times the hana server starts having memory and execution planning errors.
Is there a way to optimize this case? Or another way to do this?
Thanks!