As a caveat...
It occurs to me that many people consider 'application code' to include SQL. I do not. That could be causing the confusion here. I most adamantly advocate that all SQL exist within procs in the database - the database abstraction layer. Therefore, when I say 'tuning the database', I am referring to the SQL as well. I further assume that all bulk operations are performed within this abstration layer. If, however, the application code does things like:
- asks for a large set of data directly through poorly-coded SQL
- then loops through the resultset
- and calls 10 other individual, poorly-coded SQL statements for each record
... then yes, tuning both the application code and SQL will result in massive performance improvements.
The optimal solution would be to move the entire operation within a stored procedure and collapse all 11 statements into 1, if possible. Once inside proc, it becomes part of the database, IMHO.
So anyway, my apologies if this is what you were referring to :),
- Chris
