Re: Error handling in plperl and pltcl

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Error handling in plperl and pltcl
Дата
Msg-id 216.1100984981@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Error handling in plperl and pltcl  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
I wrote:
> I get about 6900 vs 12800 msec, so for a simple pre-planned query
> it's not quite a 50% overhead.

However, that was yesterday ;-).  I did some profiling and found some
easy-to-knock-off hotspots.  Today I'm measuring about 25% overhead
for a simple SELECT, which I think is entirely acceptable considering
the cleanliness of definition that we're buying.

I changed my test cases to be

create or replace function foo(int,int) returns int as '
declare x int;
begin for i in 1 .. $1 loop   select into x unique1 from tenk1 where unique2 = $2; end loop; return x;
end' language plpgsql;

create or replace function foos(int,int) returns int as '
declare x int;
begin for i in 1 .. $1 loop   begin     select into x unique1 from tenk1 where unique2 = $2;   exception     when
othersthen null;   end; end loop; return x;
 
end' language plpgsql;

so as to minimize the extraneous overhead --- I think this is a harder
test (gives a higher number) than what I was doing yesterday.
        regards, tom lane


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

Предыдущее
От: Joe Conway
Дата:
Сообщение: Re: pgxs regression
Следующее
От: Tom Lane
Дата:
Сообщение: Re: pgxs regression