Hi Lars,
I'm just a user, but we have handled some pretty big datasets so I can
understand your problem. I might be misunderstanding, but to confirm you
are asking the system to cross join all of the possible points (something
like 63483 * 4 * 542 * 4), use st_distance to convert them to geography
I don’t know the details of the implementation enough to speak definitively
on the behavior issue of desc vs asc.
However, my limited understanding is that the spatial index is primarily
used to quickly eliminate rows from further consideration that could not
possibly intersect the result set. It
>From: postgis-users on behalf of Jim
>Klassen
>Sent: Wednesday, June 22, 2022 5:27 PM
>To: postgis-users@lists.osgeo.org
>Subject: Re: [postgis-users]
>https://postgis.net/docs/geometry_distance_knn.html and index usage
>
>The second note on the documentation page you referenced: "Index only
The second note on the documentation page you referenced: "Index only kicks in if one of the
geometries is a constant (not in a subquery/cte). e.g. 'SRID=3005;POINT(1011102 450541)'::geometry
instead of a.geom". Neither value passed to "<->" in your query is a constant.
On 6/22/22 09:22, Lars
Hi
I have two simple tables.
Table "pg_temp_30.g1temp"
Column | Type | Collation | Nullable | Default
++---+--+
geo| geometry(Polygon,4258) | | |
id |