Skip to content

Using stored procedures in Postgres (v16) is slower than standard functions. Is this expected? #757

Answered by sm-shaw
gary-ntnx asked this question in Q&A
Discussion options

You must be logged in to vote

Example comparison at different releases (on single socket 56 cores). Functions generally perform better although at higher utilisation it can be marginal/lower for some releases. Version 17.0 performs the best from the releases tested. As noted above vacuuming can affect the result of an individual test.

For both functions and stored procedures, consistency checks run and passed after a number of runs as would be expected, so noting the differences above allows you to choose.

Replies: 3 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@sm-shaw
Comment options

Answer selected by gary-ntnx
Comment options

You must be logged in to vote
1 reply
@sm-shaw
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants