trigger SPI_exec count argument

Поиск
Список
Период
Сортировка
От Michael Nacos
Тема trigger SPI_exec count argument
Дата
Msg-id 407fa4640909020521q72e71e60o923bc5e991a6009f@mail.gmail.com
обсуждение исходный текст
Ответы Re: trigger SPI_exec count argument  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Hi all,<br /><br />I have been trying to improve the performance of a C trigger only to notice that the real bottleneck
wasthe SPI execution of dynamic SQL statements. I had been using SPI_exec(sql,0) until I tried SPI_exec(sql,1), since I
amtargeting exactly one row each time for writing. This simple change has made a huge difference (2s --> 60ms in
somecases), now the trigger execution time is consistent with the response times I get if I run the same SQL statements
byhand in psql. I am happy my code performs better, but is this something you would expect?<br /><br />regards,
Michael<br/> 

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

Предыдущее
От: Merlin Moncure
Дата:
Сообщение: Re: Adding \ev view editor?
Следующее
От: Greg Stark
Дата:
Сообщение: Re: remove flatfiles.c