Hello again...<br>The problem is not the expressions ... I took off them and the problem continue ....<br><br>I believe is a problem with my sql :<br>&nbsp;_layer.data = &quot;the_geom from (select count(def.descproblem) as number, 
def.descproblem, tg.city, lm.geocode, lm.the_geom from tblTower tg<br>&nbsp;inner join tblInsp on (tg.numgeraltower = i2.numgeraltower and tg.idlt = i2.idlt)<br>&nbsp;inner join tblProblens def&nbsp; on ( i2.idproblem = def.idproblem and 
i2.idlt = def.idlt)<br>&nbsp;inner join limit_city lm on (upper(<a href="http://lm.name">lm.name</a>) = upper(tg.city) and upper(lm.uf) = upper(tg.estate))<br>&nbsp;where def.descproblem = 'PROBLEM DETECTED' and i2.datemanutencao BETWEEN '2005-01-01' AND '2006-11-30'
<br>&nbsp;group by def.descproblem, tg.city, lm.geocode, lm.the_geom<br>&nbsp;order by number) as thematic using unique geocode using srid=-1&quot;;<br><br>Any idea?<br><blockquote style="border-left: 2px solid rgb(0, 0, 0); padding-right: 0px; padding-left: 5px; margin-left: 5px; margin-right: 0px;">

<div style="font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;">----- Original Message ----- </div>
<div style="background: rgb(228, 228, 228) none repeat scroll 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;">
<b>From:</b> <a title="pauljame@GMAIL.COM" href="mailto:pauljame@GMAIL.COM">Paul james</a> </div>
<div style="font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"><b>To:</b> <a title="MAPSERVER-USERS@LISTS.UMN.EDU" href="mailto:MAPSERVER-USERS@LISTS.UMN.EDU">
MAPSERVER-USERS@LISTS.UMN.EDU</a> 
</div>
<div style="font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"><b>Sent:</b> Thursday, December 07, 2006 4:21 
PM</div>
<div style="font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"><b>Subject:</b> [UMN_MAPSERVER-USERS] Expression 
so slow ...</div>
<div><br></div>Hello guys!<br><br>I´m creating a POLYGON layer in mapscript (c#) 
with a lot of classes like that :<br><br>layerObj _layer = new 
layerObj(mapaObj);<br>_layer.classitem = &quot;geocode&quot;;<br>....<br>while 
(_reader.Read()) <br>{<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; _geo = 
Convert.ToInt32(_reader[&quot;geocode&quot;]);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; _city = 
_reader[&quot;city&quot;].ToString();<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; classObj _class = 
new classObj(_layer);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; _class.name = __city; <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
_class.template = &quot;dummy&quot;;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
_class.setExpression(_geo.ToString());<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; styleObj 
_style = new styleObj(_class);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
_style.color.setRGB(_num.Next(0, 255), _num.Next(0, 255), _num.Next(0, 
255));&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>}<br><br>All works great, so I got a Themathic map (very fast - 
about 2secs)<br>The problem occurs when I started to aproximate to one new 
POLYGON (Zoomin). <br>Each zoom took more and more time (about 8-10secs) to draw 
the map. Its very strange... <br>Did I miss anything?<br><br>ps.: I´m using 
Mapserver 4.10, windows xp and C#<br><br>[]´s<br></blockquote><br>