[postgis-users] Suggestion to improve geo server query performance

Bo Victor Thomsen bo.victor.thomsen at gmail.com
Fri May 22 02:14:39 PDT 2020

Try to reduce the sql to this:

SELECT "table_name_id",
0.026540849041691673, true)),'base64') as "the_geom"
   FROM "schema"."table_name"

("the_geom" && ST_GeomFromText('POLYGON ((89.91210936248413 
-0.0878905905185982, 89.91210936248413 41.04621680978718, 
135.0878906061956 41.04621680978718, 135.0878906061956 
-0.0878905905185982, 89.91210936248413 -0.0878905905185982))', 4326) AND
("ug_route_sub_type" = ANY ('IP1-IRU-Intercity',
                                    'On kerb',
                                    'In Duct Chamber',
                                    '') OR
         "ug_route_sub_type" IS NULL)

All the sql where - parts with "IS NOT NULL" is superfluous
All the sql where - parts with field "sw_uid22" is superfluous - they 
will be caught anyway in the "= ANY..." clause

Create an index on field "ug_route_sub_type"

Den 22-05-2020 kl. 09:11 skrev postgann2020 s:

> s been created on geom column as well.

Med venlig hilsen / Kind regards

Bo Victor Thomsen

More information about the postgis-users mailing list