On May 4, 2015 02:32:14 PM Yves Dorfsman wrote:
As for performance concerns, in 99% of cases code maintainability is going
to be way more important than performance microoptimization. If you're
*that* concerned about performance than plpgsql probably isn't the right
answer anyway.
Isn't
On 5/2/15 2:32 PM, Adrian Klaver wrote:
On 05/02/2015 09:53 AM, Yves Dorfsman wrote:
I find my plpgsql functions becomes unreadable very quickly. I want to
break
them up in smaller functions.
What is the best way to organised them?
Is there any way to define functions inside functions?
When I
As for performance concerns, in 99% of cases code maintainability is going to
be way more important than performance microoptimization. If you're *that*
concerned about performance than plpgsql probably isn't the right answer
anyway.
Isn't one of the advantage of running on the server to
The point was to show that yes, function calls take time, and using sub
functions take even more time. I am not about to write an additional more
detailed example just to show the same results. If you are in doubt, I
respectfully suggest you do your own testing.
On Sun, May 3, 2015 at 5:26 AM,
On 03 May 2015, at 2:56, Melvin Davidson melvin6...@gmail.com wrote:
OK, Here is a simple example that shows the difference between using a self
contained function and
one that calls sub functions.
After loading all the functions below, repeat each of the EXPLAIN statements
a few
On 05/03/2015 07:14 AM, Melvin Davidson wrote:
The point was to show that yes, function calls take time, and using sub
functions take even more time. I am not about to write an additional
more detailed example just to show the same results. If you are in
doubt, I respectfully suggest you do your
I find my plpgsql functions becomes unreadable very quickly. I want to break
them up in smaller functions.
What is the best way to organised them?
Is there any way to define functions inside functions?
When I list functions in psql, I can see them all at the same level, is there
any way to
On 2015-05-02 11:12, Melvin Davidson wrote:
AFAIK, you cannot package functions in PostgreSQL, but it is possible to
call a function from within a function.
That being said, I would seriously look at how and why you are writing your
functions
as functions that call other functions are not
AFAIK, you cannot package functions in PostgreSQL, but it is possible to
call a function from within a function.
That being said, I would seriously look at how and why you are writing your
functions
as functions that call other functions are not very efficient.
Also note that PostgreSQL allows
On 05/02/2015 09:53 AM, Yves Dorfsman wrote:
I find my plpgsql functions becomes unreadable very quickly. I want to break
them up in smaller functions.
What is the best way to organised them?
Is there any way to define functions inside functions?
When I list functions in psql, I can see them
On Sat, 2 May 2015 14:07:31 -0700
Jeff Janes jeff.ja...@gmail.com wrote:
On Sat, May 2, 2015 at 1:05 PM, Adrian Klaver adrian.kla...@aklaver.com
wrote:
On 05/02/2015 10:12 AM, Melvin Davidson wrote:
AFAIK, you cannot package functions in PostgreSQL, but it is possible
to
call a
On 05/02/2015 10:12 AM, Melvin Davidson wrote:
AFAIK, you cannot package functions in PostgreSQL, but it is possible to
call a function from within a function.
That being said, I would seriously look at how and why you are writing
your functions
as functions that call other functions are not
On Sat, May 2, 2015 at 1:05 PM, Adrian Klaver adrian.kla...@aklaver.com
wrote:
On 05/02/2015 10:12 AM, Melvin Davidson wrote:
AFAIK, you cannot package functions in PostgreSQL, but it is possible
to
call a function from within a function.
That being said, I would seriously look at how and
On 05/02/2015 02:07 PM, Jeff Janes wrote:
On Sat, May 2, 2015 at 1:05 PM, Adrian Klaver adrian.kla...@aklaver.com
mailto:adrian.kla...@aklaver.com wrote:
On 05/02/2015 10:12 AM, Melvin Davidson wrote:
AFAIK, you cannot package functions in PostgreSQL, but it is
possible to
Further to the point of saying functions are ineffiencent, consider the
fact that as of the current version of PostgreSQL, plpgsql
functions cannot be pre-optimized. So when they are referenced in a SQL
statement, PostgreSQL (optimizer) has load the
function from the catalogs, which involves
On Sat, 02 May 2015 15:06:24 -0700
Adrian Klaver adrian.kla...@aklaver.com wrote:
On 05/02/2015 02:07 PM, Jeff Janes wrote:
On Sat, May 2, 2015 at 1:05 PM, Adrian Klaver adrian.kla...@aklaver.com
mailto:adrian.kla...@aklaver.com wrote:
On 05/02/2015 10:12 AM, Melvin Davidson wrote:
On 05/02/2015 03:10 PM, Melvin Davidson wrote:
Further to the point of saying functions are ineffiencent, consider the
fact that as of the current version of PostgreSQL, plpgsql
functions cannot be pre-optimized. So when they are referenced in a SQL
statement, PostgreSQL (optimizer) has load the
On 05/02/2015 03:28 PM, Bill Moran wrote:
On Sat, 02 May 2015 15:06:24 -0700
Adrian Klaver adrian.kla...@aklaver.com wrote:
On 05/02/2015 02:07 PM, Jeff Janes wrote:
On Sat, May 2, 2015 at 1:05 PM, Adrian Klaver adrian.kla...@aklaver.com
mailto:adrian.kla...@aklaver.com wrote:
On
OK, Here is a simple example that shows the difference between using a self
contained function and
one that calls sub functions.
After loading all the functions below, repeat each of the EXPLAIN
statements a few times and note that
callsubs takes almost TWICE as long to execute as nosub.
CREATE
19 matches
Mail list logo