Teradata Geospatial Performance for Multipolygons


Teradata Geospatial Performance for Multipolygons



Has anyone experienced very poor performance using Multipolygons?


I have loaded a MapInfo Tab file using tdgeoimport, and it created a table with a single row where the ST_GEOMETRY type was a MULTIPOLYGON whcih contained approx 6K polygons.


I then run a simple query against this table where I used the ST_Within fucntion to check whether a point was present within the MULTIPOLYGON.


FROM lab.addresses Point
JOIN lab.coveragemap _Map
ON Point.tm65_point.ST_within( _Map.geom ) = 1
where Point.id in
(42000341, 43000134


The issue seems to be with the last part of the explain plan

7) We do an all-AMPs JOIN step from lab.Poly by way
of an all-rows scan with no residual conditions, which is joined
to Spool 3 (Last Use) by way of an all-rows scan.
lab.Poly and Spool 3 are joined using a product
join, with a join condition of ("({RightTable}.tm65_point
.ST_WITHIN ({LeftTable}.GEOM ))= 1"). The result goes into Spool
1 (group_amps), which is built locally on the AMPs. The size of
Spool 1 is estimated with no confidence to be 204 rows (5,100
bytes). The estimated time for this step is 0.04 seconds.


But when I execute this it takes over a minute to run.  As you can see from above the issue is with the processing of multiploygon, because I have loaded in othe rmaps into mutiple rows of single polygons where th eperformance is far superior.  

Is there anything else I need to consider here?