1 Reply Latest reply on Sep 29, 2013 2:43 PM by Luc Van Linden

    With point data - Which is better sdo_join or sdo_within_distance?


      I have a table structured as such...

      REC_NUM     NUMBER(38,0)
      ADDR_ID        NUMBER(18,0)
      LATITUDE        NUMBER(11,6)
      LONGITUDE       NUMBER(11,6)
      MUNI_ID        VARCHAR2(14 BYTE)
      ATTRB_1        VARCHAR2(1 BYTE)
      ATTRB_2        VARCHAR2(1 BYTE)
      ATTRB_3        VARCHAR2(1 BYTE)



      If I need to find all the points that are with in 100 feet of another point.  This would be a self-join based on the attr_1 = Y as the source points and attr_1 = N for the surrounding points.


      Which is better to use:

           sdo_within_distance or sdo_join.


           sdo_join is much more expensive to run, so I would like to use sdo_within_distance.  But is the sdo_join method, the more accurate way to go?