Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#3236 closed defect (fixed)

ST_OrderingEquals should not have strict on the definition

Reported by: robe Owned by: robe
Priority: critical Milestone: PostGIS 2.1.9
Component: postgis Version: 2.1.x
Keywords: history Cc:

Description

I was talking with Vicky on pgRouting and she was working on revamping osm2pgrouting.

I asked ehr

Why are you using && with ST_OrderingEquals and she said "Cause it's super slow without it"

So I looked at the function and what do I see:

CREATE OR REPLACE FUNCTION st_orderingequals(
    geometrya geometry,
    geometryb geometry)
  RETURNS boolean AS
$$
	SELECT $1 ~= $2 AND _ST_OrderingEquals($1, $2)
$$
  LANGUAGE sql IMMUTABLE STRICT
  COST 100;

Hmm who put STRICT there -- forcing this function to look opaque to the planner thereby preventing the index part from kicking in.

Change History (5)

comment:1 Changed 6 years ago by robe

Owner: changed from pramsey to robe

comment:2 Changed 6 years ago by robe

Committed for postgis 2.1 branch at r13903

comment:3 Changed 6 years ago by robe

Committed for postgis 2.2 at r13904

comment:4 Changed 6 years ago by robe

Resolution: fixed
Status: newclosed

comment:5 Changed 6 years ago by robe

Keywords: history added
Note: See TracTickets for help on using tickets.