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/>