
Ask HN: How do you handle frequently used SQL queries? - patagonia
How do you store, re-use, or otherwise handle frequently used SQL queries?
======
iron0013
I think a git repo makes a lot of sense, but it might be hard to get less-
technical team members on board.

------
nishantvyas
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...

~~~
patagonia
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?”

------
svennek
views?

~~~
patagonia
Does your team share views? Do you version control then? So you wait until
there is some level of acceptance or usage before sharing?

