Re: FUNC_MAX_ARGS benchmarks

Поиск
Список
Период
Сортировка
От Rod Taylor
Тема Re: FUNC_MAX_ARGS benchmarks
Дата
Msg-id 1028297932.10895.2.camel@jester
обсуждение исходный текст
Ответ на FUNC_MAX_ARGS benchmarks  (nconway@klamath.dyndns.org (Neil Conway))
Ответы Re: FUNC_MAX_ARGS benchmarks
Список pgsql-hackers
Perhaps I'm not remembering correctly, but don't SQL functions still
have an abnormally high cost of execution compared to plpgsql? 

Want to try the same thing with a plpgsql function?


On Thu, 2002-08-01 at 18:23, Neil Conway wrote: 
> Ok, here are some crude benchmarks to attempt to measure the effect of
> changing FUNC_MAX_ARGS. The benchmark script executed:
> 
> CREATE FUNCTION test_func(int, int, int, int, int, int, int, int)
> RETURNS INTEGER AS 'SELECT $1 + $2 + $3 + $4 + $5 + $6 + $7 + $8'
> LANGUAGE 'sql' VOLATILE;
> 
> Followed by 30,000 calls of:
> 
> SELECT test_func(i, i, i, i, i, i, i, i);
> 
> (Where i was the iteration number)
> 
> I ran the test several times and averaged the results -- the wall-clock
> time remained very consistent throughout the runs. Each execution of the
> script took about 30 seconds. The machine was otherwise idle, and all
> other PostgreSQL settings were at their default values.
> 
> With FUNC_MAX_ARGS=16:
> 
> 28.832
> 28.609
> 28.726
> 28.680
> 
> (average = 28.6 seconds)
> 
> With FUNC_MAX_ARGS=32:
> 
> 29.097
> 29.337
> 29.138
> 28.985
> 29.231
> 
> (average = 29.15 seconds)
> 
> Cheers,
> 
> Neil
> 
> -- 
> Neil Conway <neilconway@rogers.com>
> PGP Key ID: DB3C29FC
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster
> 



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

Предыдущее
От: Greg Copeland
Дата:
Сообщение: Re: Why is MySQL more chosen over PostgreSQL?
Следующее
От: Greg Copeland
Дата:
Сообщение: Re: Why is MySQL more chosen over PostgreSQL?