<html><head></head><body><div style="color:#000; background-color:#fff; font-family:Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:13px"><div id="yui_3_16_0_ym19_1_1485366231434_11027">Milad,</div><div id="yui_3_16_0_ym19_1_1485366231434_11028"><br id="yui_3_16_0_ym19_1_1485366231434_11029" clear="none"></div><div id="yui_3_16_0_ym19_1_1485366231434_11030"><font id="yui_3_16_0_ym19_1_1485366231434_11031" size="2">You
 can use the directive PROCESSING "CLOSE_CONNECTION=DEFER" when you have
 several PostGIS layers to be rendered to reduce the time because of 
opening the database connections. This means that once the database 
connection is established for the first time, it will be shared for all 
the layers which use the same connection string (same host, database, 
user and password). This takes less time consuming than opening and 
closing a database connection for each layer (PROCESSING 
"CLOSE_CONNECTION=ALWAYS").</font></div><div dir="ltr" id="yui_3_16_0_ym19_1_1485366231434_11032"><br id="yui_3_16_0_ym19_1_1485366231434_11033" clear="none"></div><font id="yui_3_16_0_ym19_1_1485366231434_11034" size="2">Cheers</font><br><div class="qtdSeparateBR" id="yui_3_16_0_ym19_1_1485366231434_11035"><br></div><div class="yahoo_quoted" id="yui_3_16_0_ym19_1_1485366231434_11040" style="display: block;">  <div style="font-family: Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 13px;" id="yui_3_16_0_ym19_1_1485366231434_11039"> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px;" id="yui_3_16_0_ym19_1_1485366231434_11038"> <div dir="ltr" id="yui_3_16_0_ym19_1_1485366231434_11037"> <font id="yui_3_16_0_ym19_1_1485366231434_11036" size="2" face="Arial"> <hr size="1"> <b><span style="font-weight:bold;">From:</span></b> milad nidal <miladnidal2604@gmail.com><br> <b><span style="font-weight: bold;">To:</span></b> MapserverList OSGEO <mapserver-users@lists.osgeo.org> <br> <b><span style="font-weight: bold;">Sent:</span></b> Wednesday, January 25, 2017 11:39 AM<br> <b><span style="font-weight: bold;">Subject:</span></b> [mapserver-users] PROCESSING : Connection to Postgis (defer or always)<br> </font> </div> <div class="y_msg_container" id="yui_3_16_0_ym19_1_1485366231434_11041"><br><div id="yiv5954849325"><div dir="ltr" id="yui_3_16_0_ym19_1_1485366231434_11044"><div class="yiv5954849325MsoNormal" id="yui_3_16_0_ym19_1_1485366231434_11043"><span id="yui_3_16_0_ym19_1_1485366231434_11042" lang="EN-CA">I have 100
layers with data connection to postgis (10 mapfiles). In the mapserver (v. 7) documentation
there is a point (which I do not understand) regarding the <span></span></span></div>

<div class="yiv5954849325MsoNormal" id="yui_3_16_0_ym19_1_1485366231434_11046"><span id="yui_3_16_0_ym19_1_1485366231434_11045" lang="EN-CA">PROCESSING "CLOSE_CONNECTION=ALWAYS"
OR PROCESSING "CLOSE_CONNECTION=DEFER"<span></span></span></div>

<div class="yiv5954849325MsoNormal"><span lang="EN-CA">Now if I do
a tile cache for all the layer together.. Is-it better to use Defer or always.
Actually when we should use always and when we should use defer?<span></span></span></div>

<div class="yiv5954849325MsoNormal"><span lang="EN-CA">Thanks for a
simple explanation <span></span></span></div></div></div><br>_______________________________________________<br>mapserver-users mailing list<br><a ymailto="mailto:mapserver-users@lists.osgeo.org" href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a><br><a href="https://lists.osgeo.org/mailman/listinfo/mapserver-users" target="_blank">https://lists.osgeo.org/mailman/listinfo/mapserver-users</a><br><br></div> </div> </div>  </div></div></body></html>