SQL query optimization – When and why is it necessary?