As a DBA, most SQL is submitted to my team for review. We do not have a SQL developer, so the code is frequently very, very inefficient.
Our current process is:
- SQL is submitted for review right before it goes to beta
- Issues are pointed out but frequently not resolved because the application has already been written around it, and is scheduled to be deployed to beta the same week
- If the DBA team identifies an issue, the developer response is "show me how to fix it, then"
It should be noted that the DBA team has no requirements around any code, no context and no idea what 1000s of lines of a stored procedure is supposed to be doing.
Is this a typical scenario? Who is responsible for fixing the code? Does your DBA typically re-write the stored procdedure for you?