Re: Which is faster SQL or PL/PGSQL

Поиск
Список
Период
Сортировка
От Christopher Browne
Тема Re: Which is faster SQL or PL/PGSQL
Дата
Msg-id m3u164602x.fsf@wolfe.cbbrowne.com
обсуждение исходный текст
Ответ на Which is faster SQL or PL/PGSQL  ("George A.J" <jinujosein@yahoo.com>)
Ответы Re: Which is faster SQL or PL/PGSQL  (Michael Pohl <pgsql@newtopia.com>)
Список pgsql-sql
The world rejoiced as jinujosein@yahoo.com ("George A.J") wrote:
> i am converting an MSSQL database to Postgres. there is a lot of procedures to convert.
>
> which language is best for functions, SQL or plpgsql.
>
> which is faster . i am using postgres 7.3.2

Hmm?  This doesn't seem to make much more sense than the question of
what colour a database should be ("Mauve has more RAM...").

SQL and pl/pgsql are quite distinct.  If you have procedures that
require programmed logic, with things like variables and loops, SQL
generally cannot do that, and you will HAVE to use one of the embedded
languages.

If raw speed is at issue, it is quite likely that rewriting the
procedures in C would lead to code that is faster still.

But the real question is of what language you *need* to implement in.
For certain sorts of simple procedures, SQL may suffice; as complexity
grows, you will need to use one of the other languages, whether
plpgsql, plperl, plpython, C, C++, and such, and the question won't be
of speed; it will be of necessity.
-- 
output = ("cbbrowne" "@" "cbbrowne.com")
http://www.ntlug.org/~cbbrowne/linuxdistributions.html
Never hit someone head on, always sideswipe.  Never say, "Foo's last
patch was brain-damaged", but rather, "While fixing the miscellaneous
bugs in 243.xyz [foo's patch], I found...."
-- from the Symbolics Guidelines for Sending Mail


В списке pgsql-sql по дате отправления:

Предыдущее
От: "George A.J"
Дата:
Сообщение: Which is faster SQL or PL/PGSQL
Следующее
От: Josh Berkus
Дата:
Сообщение: Re: Which is faster SQL or PL/PGSQL