Changes between Initial Version and Version 1 of Ticket #5547, comment 3
- Timestamp:
- 12/04/23 09:31:28 (13 months ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #5547, comment 3
initial v1 14 14 15 15 I verified it still fails to use the index with old postgresql 11 and new postgis 3, so it appears its caused by the postgis 3 update alone 16 17 explain analyze SELECT fld_zone FROM s_fld_haz_ar WHERE st_intersects(st_geomfromtext(concat('POINT(', '-83.113523', ' ', '40.014991', ')'), 4269), wkb_geometry) 18 16 {{{ 17 explain analyze 18 SELECT fld_zone 19 FROM s_fld_haz_ar 20 WHERE st_intersects( 21 st_geomfromtext( 22 concat('POINT(', '-83.113523', ' ', '40.014991', ')'), 23 4269), 24 wkb_geometry) 25 }}} 19 26 20 27 this one does a table scan, 11 and 3, Parallel Seq Scan on s_fld_haz_ar 28 {{{ 29 select version(),postgis_full_Version() 21 30 22 select version(),postgis_full_Version()23 31 PostgreSQL 11.18, compiled by Visual C++ build 1914, 64-bit | POSTGIS="3.3.3 3.3.3" [EXTENSION] PGSQL="110" GEOS="3.11.2-CAPI-1.17.2" PROJ="8.2.1" GDAL="GDAL 3.6.4, released 2023/04/17" LIBXML="2.9.14" LIBJSON="0.16" LIBPROTOBUF="1.2.1" WAGYU="0.5.0 (Internal)" RASTER 24 32 }}} 25 33 26 34 this server uses spatial index, 11 and 2, using s_fld_haz_ar_wkb_geometry_geom_idx 27 35 36 {{{ 28 37 PostgreSQL 11.18, compiled by Visual C++ build 1914, 64-bit | POSTGIS="2.5.3 r17699" PGSQL="100" (procs need upgrade for use with "110") GEOS="3.7.2-CAPI-1.11.0 3.7.2" PROJ="Rel. 4.9.3, 15 August 2016" GDAL="GDAL 2.2.4, released 2018/03/19" LIBXML="2.7.8" LIBJSON="0.12" LIBPROTOBUF="1.2.1" (core procs from "2.4.4 r16526" need upgrade) RASTER (raster procs from "2.4.4 r16526" need upgrade) 29 38 }}} 30 39 31 40 they both use the index if i dont create the point string using concat like 32 33 explain analyze SELECT fld_zone FROM s_fld_haz_ar WHERE st_intersects(st_geomfromtext('POINT(-83.113523 40.014991)', 4269), wkb_geometry) 41 {{{ 42 explain analyze 43 SELECT fld_zone 44 FROM s_fld_haz_ar 45 WHERE st_intersects( 46 st_geomfromtext( 47 'POINT(-83.113523 40.014991)', 48 4269), 49 wkb_geometry)