Opened 9 years ago

Closed 9 years ago

Last modified 9 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 by robe, 9 years ago

Owner: changed from pramsey to robe

comment:2 by robe, 9 years ago

Committed for postgis 2.1 branch at r13903

comment:3 by robe, 9 years ago

Committed for postgis 2.2 at r13904

comment:4 by robe, 9 years ago

Resolution: fixed
Status: newclosed

comment:5 by robe, 9 years ago

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