ctsurveyors

Database view with spatial join has poor performace

Discussion created by ctsurveyors on Apr 17, 2014
Latest reply on Apr 17, 2014 by vangelo-esristaff
Hello all

Is there a way to make this view more efficient?

create view [GISADMIN].[Pipes_Test_View] as
 SELECT 
pipe.[OBJECTID]
      ,[DIAMETER]
      ,pipe.SHAPE
      ,[UpStreamNode]
      ,[DownStreamNode]
,start_point.OBJECTID as St_Pnt
,end_point.OBJECTID as End_Pnt
  FROM [Euclid_GIS].[GISADMIN].[MAIN_EVW] pipe
  left outer JOIN [Euclid_GIS].[GISADMIN].[NODE_EVW] start_point
    ON pipe.SHAPE.STStartPoint().STEquals(start_point.SHAPE) = 1
  left outer JOIN [Euclid_GIS].[GISADMIN].[NODE_EVW] end_point 
    ON pipe.SHAPE.STEndPoint().STEquals(end_point.SHAPE) = 1
  

Outcomes