darkcity(at)houston(dot)rr(dot)com (Val Ventura) writes:
> I am new to PostgreSQL and I'm looking to port a MSSQL database. I am
> currently working on the stored procedures, and I'm trying to
> understand when and why I should choose SQL vs. PL/pgSQL vs. all the
> others, as far as performance goes.
For stuff that involves database accesses, plpgsql will almost always
win, because it's the only one we have that caches query plans.
If you are doing simple calculations, text-mashing, etc, then you might
be best off with plperl or pltcl (choose according to taste). SQL and
plpgsql are overkill for simple arithmetic and don't have very extensive
text-manipulation capabilities.
regards, tom lane