duckdb / duckdb/duckdb-spatial
Spatial join very slow?
- Dominant language
- C
- Stars
- 708
- Forks
- 96
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 5
Description
Hi,
I'm executing the following query on a 147K world city points table (loaded parquet file from https://public.opendatasoft.com/explore/dataset/geonames-all-cities-with-a-population-1000/export/?disjunctive.cou_name_en&sort=name)
Find pairs of cities that are within 5 degrees (about 555 km) of each other.
but it ?never? finishes (v1.1.1 ) :-( PostGIS is ready within a second...
```
SELECT
a.name AS city_a,
b.name AS city_b,
ST_Distance(
a.coordinates,
b.coordinates
) AS distance_degrees
FROM cities a
JOIN cities b ON a.geoname_id <> b.geoname_id
WHERE ST_Distance(
a.coordinates,
b.coordinates
) <= 5; -- Distance in degrees
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.