[postgis-devel] Regression performance.

Bborie Park dustymugs at gmail.com
Mon Feb 13 07:45:57 PST 2012

On Mon, Feb 13, 2012 at 7:30 AM, Sandro Santilli <strk at keybit.net> wrote:
> On Mon, Feb 13, 2012 at 10:25:18AM -0500, David Zwarg wrote:
>> Pierre,
>> +1
>> As for the penalty, you are correct: the penalty appears to be caused by
>> casting the integers to float values in the expression.
> Ok, in this case keeping it INT (not FLOAT) won't make anyone _not_
> using [rast.x] or [rast.y] incur in any penalty and give the correct
> type for the others. Those using [rast.x] and [rast.y] in floating
> point arithmetics will have to live with the performance issue while
> those using them as INTegers will be fine.
> --strk;

After seeing David's expression, I have to agree with strk.  The
user-provided expression itself is probably causing the slowdown
rather than anything done in the C function.  If the expression was
purely floating point ([rast.val] * [rast.val] * [rast.val]), I wonder
if there is a performance hit.

I'm for having the correct parameter typing...


More information about the postgis-devel mailing list