What about http://mapserver.org/development/rfc/ms-rfc-86.html ?
> -----Ursprüngliche Nachricht----- > Von: mapserver-users [mailto:mapserver-users-boun...@lists.osgeo.org] Im > Auftrag von pe_lord > Gesendet: Donnerstag, 1. Juni 2017 19:26 > An: mapserver-users@lists.osgeo.org > Betreff: Re: [mapserver-users] Class maxscaledenom performance > > I've verified if the issue was not linked to WMS. shp2img succeed to > produce > the png. But it's quite long. > > I have tried at > *1:102 000 * > PGIS Query = 4 sec > Nb of recors = 2859 records > Mapserver render by WMS = 2.5 sec > Mapserver render by shp2img = shp2img total time: 3.677s > > select > "classitem_field",encode(ST_AsBinary(ST_Force2D("the_geom"),'NDR'),'hex' > ) as > geom,"ogc_fid" from ori_pee > where the_geom && ST_GeomFromText('POLYGON((-8871026 > 6114309.70958512,-8871026 6140241.29041488,-8834701 > 6140241.29041488,-8834701 6114309.70958512,-8871026 > 6114309.70958512))',3857) > > > *1:1 002 000* > PGIS Query = 26 minutes > Nb of records = 242832 records > Mapserver render by WMS = "internal server error" = timout > Mapserver render by shp2img = shp2img total time: 156.299s > > select > "classitem_field",encode(ST_AsBinary(ST_Force2D("the_geom"),'NDR'),'hex' > ) as > geom,"ogc_fid" from ori_pee > where the_geom && ST_GeomFromText('POLYGON((-9031284 > 5999904.71459227,-9031284 6254645.28540772,-8674443 > 6254645.28540772,-8674443 5999904.71459227,-9031284 > 5999904.71459227))',3857) > > Here my validations > 1-My layer have EXTENT > 2-Mapserver do not reproject data > 3-My layer has no label > 4-Myconnection on postgis "DEFER" > 5-My table have no OIDS > 6-My table have GIST index on the_geom field > 7-My table have a btree index on classitem field. > 8-No warning in my GetCapabilities > > > I have tried loading a new table with OIDS set to TRUE (on table, not on > database) and it's seem to be the same behavior? Do I really need to > modify > postgresql.conf? > > > > When I read the query called from mapserver, I think there is a way to > improve performance on maxscaledenom. Do you think there is a way for > mapserver to know which class to render at current scale (based on bbox > ) > and filter on them ... > > the query might look like this: > select > "classitem_field",encode(ST_AsBinary(ST_Force2D("the_geom"),'NDR'),'hex' > ) as > geom,"ogc_fid" from ori_pee > where the_geom && ST_GeomFromText('POLYGON((-9031284 > 5999904.71459227,-9031284 6254645.28540772,-8674443 > 6254645.28540772,-8674443 5999904.71459227,-9031284 > 5999904.71459227))',3857) and classitem_field = 'BBOX' > > I think I will work on union layers :) . > > > > > > -- > View this message in context: http://osgeo-org.1560.x6.nabble.com/Class- > maxscaledenom-performance-tp5322521p5322693.html > Sent from the Mapserver - User mailing list archive at Nabble.com. > _______________________________________________ > mapserver-users mailing list > mapserver-users@lists.osgeo.org > https://lists.osgeo.org/mailman/listinfo/mapserver-users _______________________________________________ mapserver-users mailing list mapserver-users@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/mapserver-users