#benchmarks
- Benchmarking PostgreSQL Functions
https://justatheory.com/2006/05/benchmarking-functions/
Update 2006-05-19: I realized that there was a nasty error in my algorithm for determining the runtime of a function: It was only fetching the milliseconds part of the runtime, without adding in seconds and minutes! This led to getting negative runtimes then the milliseconds part of the end time was less than the milliseconds part of the start time. Ugh. But with the help of yain on IRC, I’ve switched to calculating the number of seconds by converting the start and end times to epoch seconds (which have subsecond precision in PostgreSQL, and now things are just dandy. While I was at it, I reorganized the function so that it was a bit easier to read, by constructing the created function in the order it would be executed, and fixed the caching problem, as suggested by Aidan in a comment below.
Follow #benchmarks
on RSS or use the
JSON API
curl -X GET \
-H "Content-type: application/json" \
-H "Accept: application/json" \
"https://octothorp.es/~/benchmarks"