Ask HN: How do you handle frequently used SQL queries?

2 points by patagonia ↗ HN
How do you store, re-use, or otherwise handle frequently used SQL queries?

5 comments

[ 3.4 ms ] story [ 24.0 ms ] thread
views?
Does your team share views? Do you version control then? So you wait until there is some level of acceptance or usage before sharing?
you mean the result set or the query it-self? databases like oracle, mysql, postgres can already identify existing queries and hash it to re-use execution plan etc... some can even convert literals in queries into bind.. generally seeking use bind variables in your queries for re-use...
The queries themselves. Like every day I query, “which files weren’t caught by the process?” Or “what is that employee’s id given another id?”
I think a git repo makes a lot of sense, but it might be hard to get less-technical team members on board.