Re: [MapServer-users] Why is Mapserver slower in Postgres 13 than in Postgres 11?

2024-02-04 Thread Rahkonen Jukka via MapServer-users
Hi, See https://mapserver.org/input/vector/postgis.html, there is an example about how to define the SRID on the DATA line: DATA "the_geom from the_database using unique gid using srid=4326" The SRID value to use is the native SRID of the PostGIS table. What Mapserver does here is that with

Re: [MapServer-users] Why is Mapserver slower in Postgres 13 than in Postgres 11?

2024-02-04 Thread Rob Dennett via MapServer-users
I don't think so. These queries are generated somehow. Here's what the PolygonSources layer looks like, and as you can see, the query I am specifying is just "geom from the_table_in_question": LAYER NAME "PolygonSources" CONNECTIONTYPE POSTGIS CONNECTION "xx" TYPE

Re: [MapServer-users] Why is Mapserver slower in Postgres 13 than in Postgres 11?

2024-02-04 Thread James Gardner via MapServer-users
Could you try replacing find_srid with a hard coded srid... I found it had to run find_srid on every tuple...-James GardnerOn 5 Feb 2024 5:39 am, Rob Dennett via MapServer-users wrote: Running  select * from pg_indexes where tablename like '%the_table_in_question%'  yields

Re: [MapServer-users] Why is Mapserver slower in Postgres 13 than in Postgres 11?

2024-02-04 Thread Rob Dennett via MapServer-users
So, after further analysis of the queries, when pointed at the old db, the mapserver output contains 4 queries which map to the 4 layers in the .map file, one for polygon, then line, then point, then centroid. These 4 are then repeated with different polygons. The queries all look similar,

Re: [MapServer-users] Why is Mapserver slower in Postgres 13 than in Postgres 11?

2024-02-04 Thread Rob Dennett via MapServer-users
Running select * from pg_indexes where tablename like '%the_table_in_question%' yields the same results for both the old and new dbs. As mentioned, the mapserver debug output is very different from the old and new db are very different, even though the .map files are identical except for the

Re: [MapServer-users] Why is Mapserver slower in Postgres 13 than in Postgres 11?

2024-02-04 Thread Travis Kirstine via MapServer-users
First thought is to check if the table has a spatial index. https://postgis.net/workshops/postgis-intro/indexing.html On Fri, 2 Feb 2024 at 18:37, Rob Dennett via MapServer-users < mapserver-users@lists.osgeo.org> wrote: > I recently upgraded our db for our Mapserver from Postgres 11 to