Re: find close (duplicate) points + create index
От | Bruno Wolff III |
---|---|
Тема | Re: find close (duplicate) points + create index |
Дата | |
Msg-id | 20040310041624.GB31629@wolff.to обсуждение исходный текст |
Ответ на | find close (duplicate) points + create index (Elinor Medezinski <elinor@bellatrix.tau.ac.il>) |
Список | pgsql-novice |
On Thu, Mar 04, 2004 at 12:42:23 +0200, Elinor Medezinski <elinor@bellatrix.tau.ac.il> wrote: > Hello, > > I have a table with one column -- > "CREATE TABLE pointtable (point POINT)". > I'm trying to find duplicate entries, where two entries are considered > duplicates if they're within a radius of 1, meaning something like ~ "select > point from pointtable where distance between points <=1". > Obviously this is not SQL syntax. Is there a way to do this - search within a > column itself? Yes, you can join a table to itself and return records matching some critera. This isn't going to be fast. I didn't see a distance between two points function, but it is probably there somewhere. If not you can check if one point is contained in a circle of radius 1 centered at the other point. This is something that could use an index, though it probably wouldn't help when checking the whole table. It probably would speed up checking a single point for conflicts.
В списке pgsql-novice по дате отправления: