<div class="gmail_quote">The expression I used was very simple, and used all three substitution variables:<br><br>"[rast] * [rast.x] * [rast.y]"<br><br>On Fri, Feb 10, 2012 at 3:30 AM, Sandro Santilli <span dir="ltr"><<a href="mailto:strk@keybit.net">strk@keybit.net</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On Thu, Feb 09, 2012 at 04:14:12PM -0800, David Zwarg wrote:<br>
<br>
> A note on the surprising factor: it took myself and David Bronough at the<br>
> code sprint all day to profile and identify what was happening. Both of us<br>
> were looking at the patch from r9112, scratching our heads.  The removal of<br>
> strstr should have made it faster, but it turns out the use of integers in<br>
> the expressions were doing something in the parser/planner/evaluator for<br>
> every pixel, and this was slowing everything down.  It doesn't make sense<br>
> on many levels, and I would have thought that integer math would be faster<br>
> that floating point math, but in this case it is not the case. Something in<br>
> the way postgres evaluates that parameterized query changes that<br>
> assumption, which I have no knowledge of (thus the mystery for me).<br>
<br>
</div>Did your expression include math on the [rast.x] and [rast.y] values ?<br>
<div class="HOEnZb"><div class="h5"><br>
--strk;<br>
<br>
  ,------o-.<br>
  |   __/  |    Delivering high quality PostGIS 2.0 !<br>
  |  / 2.0 |    <a href="http://strk.keybit.net" target="_blank">http://strk.keybit.net</a><br>
  `-o------'<br>
<br>
_______________________________________________<br>
postgis-devel mailing list<br>
<a href="mailto:postgis-devel@postgis.refractions.net">postgis-devel@postgis.refractions.net</a><br>
<a href="http://postgis.refractions.net/mailman/listinfo/postgis-devel" target="_blank">http://postgis.refractions.net/mailman/listinfo/postgis-devel</a><br>
</div></div></blockquote></div><br>