Version Control for SQL Query Optimization