Search Postgresql Archives

Re: General question about speed of functions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 13 Apr 2010 10:26:04 -0400, Brent Friedman
<brent@xxxxxxxxxxxxxxxxx>
wrote:
> I am starting a project next week that looks like it will involve some 
> massive sql rewrites to gain needed performance, and I am looking at 
> implementing as many functions as possible.  I haven't worried that much 
> about specific implementations in the past, but this project can use any 
> performance gains available, so even a five percent difference between a 
> function written in c vs pgsql would be helpful.
> 
> The apparent choices available for the existing application are to use 
> functions in pgsql, php or c.

This greatly depends on the type of processing you're doing. If you perform
a CPU intensive data processing (a lot of math applied to the data), the C
functions may give you tremendous performance gain.

But in most cases the processing consists of calls to the SQL engine and
simple processing of the results, so it will be about as fast as C (and
much easier to develop and maintain).

I have no experience with PL/PHP, but I'd say it will be about as fast as
PL/pgSQL ...

> Any comments about relative performance of using any of those languages 
> would be greatly appreciated.

My recommendation is "Pay attention to properly design the schema, and
don't
hesitate to change it during development. Choose one of the languages and
stick with. And the money you save (due to development in a single
language)
invest into better hardware.

Tomas

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux