I have a PostGIS 2.4 database with the table that contains more than 300 000 Point features (with big density on the map on high zooms like 10-12 if you will draw them).
So I need to query that table and return the points that are separated from each other by a distance (say, 10 km) to reduce this density. I was wondering if I can do this with the ST_DWithin function or anyone else, but I can not figure out how to do it. Moreover, it needs to work fast (1-2 seconds is the max time for the query). Maybe somebody can help me?