[postgis-devel] Regression performance.

David Zwarg dzwarg+postgis at azavea.com
Mon Feb 13 07:21:23 PST 2012


The expression I used was very simple, and used all three substitution
variables:

"[rast] * [rast.x] * [rast.y]"

On Fri, Feb 10, 2012 at 3:30 AM, Sandro Santilli <strk at keybit.net> wrote:

> On Thu, Feb 09, 2012 at 04:14:12PM -0800, David Zwarg wrote:
>
> > A note on the surprising factor: it took myself and David Bronough at the
> > code sprint all day to profile and identify what was happening. Both of
> us
> > were looking at the patch from r9112, scratching our heads.  The removal
> of
> > strstr should have made it faster, but it turns out the use of integers
> in
> > the expressions were doing something in the parser/planner/evaluator for
> > every pixel, and this was slowing everything down.  It doesn't make sense
> > on many levels, and I would have thought that integer math would be
> faster
> > that floating point math, but in this case it is not the case. Something
> in
> > the way postgres evaluates that parameterized query changes that
> > assumption, which I have no knowledge of (thus the mystery for me).
>
> Did your expression include math on the [rast.x] and [rast.y] values ?
>
> --strk;
>
>  ,------o-.
>  |   __/  |    Delivering high quality PostGIS 2.0 !
>  |  / 2.0 |    http://strk.keybit.net
>  `-o------'
>
> _______________________________________________
> postgis-devel mailing list
> postgis-devel at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-devel/attachments/20120213/497ac289/attachment.html>


More information about the postgis-devel mailing list