PostGIS 3.5.2 ST_Contains() query on gist is slow

Sebastiaan Couwenberg sebastic at xs4all.nl
Wed Sep 10 20:48:55 PDT 2025


On 9/11/25 5:36 AM, Sebastiaan Couwenberg via postgis-users wrote:
> On 9/10/25 11:36 PM, Regina Obe wrote:
>> Never mind the test above I proposed, I tried it and it still decided to use the spatial index instead of the primary key on n.id
>> Which I found really surprising as I thought primary keys trump everything.
>>
>> Anyway  Paul traced the commit that caused the issue and it was introduced in 3.4.
> 
> Which commit is that?

Nevermind, I'm blind. It's in the ticket:

  https://trac.osgeo.org/postgis/changeset/31bcb7d414/git

Kind Regards,

Bas

-- 
  GPG Key ID: 4096R/6750F10AE88D4AF1
Fingerprint: 8182 DE41 7056 408D 6146  50D1 6750 F10A E88D 4AF1


More information about the postgis-users mailing list