Would you do this? Combine two calls, like an INSERT and then a SELECT, into the same batch sent from a ADO.NET client? It’s a proposal from Visual Studio Magazine to combine code into one batch instead instead of making two query calls (and two round trips).
It’s an interesting idea, and for those programmers that are older, we probably unconsciously think about this all the time. We still remember when bandwidth was measured in kbps and processing power in MHz, and we often consider those resources to be valuable. We try not to waste them, precisely because they impact performance. Perhaps that’s why we recoil at some of the ORM frameworks and other programming structures that make development easier but are tremendously chatty in how they communicate with our servers.
I know that programmer salaries are high, and that labor is one of the more expensive parts of building software. However rather than building inefficient applications that will create customer complaints, shouldn’t we be educating our developers more to ensure they write efficient applications? They can still use a framework or template of some sort, but they should do so in an efficient way. Along with training, using code reviews and keeping everyone on a central VCS where all code is visible can help spread knowledge throughout your staff.
I realize that many managers are loathe to invest in developers’ knowledge when those developers might leave your company for another position, but imagine that a manager elsewhere is investing in his developer. It’s entirely possible those other developers then come to work for you. Ultimately we all benefit if we work to spread and build better software development practices throughout the industry.
The Voice of the DBA Podcast