From: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> |
---|---|
To: | Vincent Veyron <vv(dot)lists(at)wanadoo(dot)fr> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Optimizing query? |
Date: | 2013-01-31 10:06:23 |
Message-ID: | CAFj8pRC4zBK4ZPXfTcUDypcbkuYCqsRq7UppZn7V6BXj5P0Fow@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
2013/1/31 Vincent Veyron <vv(dot)lists(at)wanadoo(dot)fr>:
> Le jeudi 31 janvier 2013 à 09:49 +0100, Pavel Stehule a écrit :
>
>> any join where result is related to some function result can be very
>> slow, because estimation will be out and any repeated function
>> evaluation is just expensive.
>>
>
> Hi Pavel,
>
> Thank you for the correction. Since we're at it, I have a question
> regarding functions in a query :
>
> Suppose I have a query of the form
>
> SELECT my_function(column_1), column_2
> FROM my_table
> GROUP BY my_function(column_1)
> ORDER BY my_function(column_1);
>
> where my_function is a user defined function.
>
> How many times is the function computed?
if function is stable or immutable, then once per row
Pavel
>
>
>
>
> --
> Salutations, Vincent Veyron
> http://marica.fr/site/demonstration
> Logiciel de gestion des contentieux juridiques et des sinistres d'assurance
>
From | Date | Subject | |
---|---|---|---|
Next Message | Albe Laurenz | 2013-01-31 10:27:09 | Re: AT TIME ZONE and interval arguments |
Previous Message | Vincent Veyron | 2013-01-31 10:03:08 | Re: Optimizing query? |