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?
The sdo_within_distance is not suited for spatial joins. Hence you will need the sdo_join with the distance (& units) parameter.
Read this section: