This discussion is archived
1 Reply Latest reply: Sep 29, 2013 7:43 AM by Luc Van Linden RSS

With point data - Which is better sdo_join or sdo_within_distance?

JohnL Newbie
Currently Being Moderated

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)
LOC_POINT    SDO_GEOMETRY

 

 

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?

 

Thanks

 

John

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points