If I am executing a stored procedure for basic queries, such as:
SELECT ColA, ColB FROM MyTable WHERE ID = 123;
SELECT * FROM MyTable,OtherTable WHERE MyTable.ID = OtherTable.ID ORDER BY CreatedAt desc
Is there any benefit to converting those to a stored procedure if that happen frequently? When is it better to use a stored proc? When should I not use a stored proc?
What kind of optimizations, if any, happen when you create a stored proc? (which would help me understand when/why I should use them)
If it makes any differences, my database is an MS SQL 2005 db.