Skip to Main Content

Database Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Find duplicate records in oracle spatial

758248Dec 3 2010 — edited Dec 5 2010
Hello everyone,

I am trying to find duplicate records from an Oracle spatial SDO_geometry table. I am finding it is easy when I am looking for unique combinations of fields but I am having problems selecting identical geometries. The closest I have have been able to do it is with a script like the one below:

Select PROVNAME,DBANAME,FRN,TRANSTECH,SPECTRUM,MAXADUP,MAXADDOWN,TYPICUP,TYPICDOWN,STATE_CODE, SDO_GEOM.SDO_AREA(shape,.005),count(*) COUNT
from BB_SERVICE_WIRELESS_V2A
where FCC_SUBMISSION_CYCLE <>'2010-SPRING'
GROUP BY PROVNAME, DBANAME, FRN, TRANSTECH, SPECTRUM, MAXADUP, MAXADDOWN, TYPICUP, TYPICDOWN, STATE_CODE, SDO_GEOM.SDO_AREA(shape,.005) having count(1) >1
order by STATE_CODE;

Basically select and group by all columns including the Area from the shape column. The problem with this approach is that it is very slow to run and I am checking only the area. It is unlikely but different geometries can have the exact same area. Can anyone suggest a more efficient way to get all exact duplicates in this table?

Thanks in advance,
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 2 2011
Added on Dec 3 2010
2 comments
1,790 views