Search

From May to two weeks, I worked in an .NET heavy, SQL Server-light project, where the database code was pretty dumb. A bunch of CRUD-procedures and little else. The project was XP-full monty – we all sat in a single room and pair programmed everything. When I got home after a days work, I usually felt physically tired, but mentally energized.

Then I worked exclusively on pretty large SELECT-statements for reports – and when I come home at the end of the day my brain is fried.

My theory why this is goes like this:
.NET (C#) allows me divide and conquer. By using sub classing, extract method and so on, I can break up a complex task into tiny subtasks. This way, at any given moment I only have to concentrate on a part of the solution. SQL has some support for dividing a task into smaller pieces, but not on par with a language like C#

I love my SQL Server. I take pride in knowing more than necessary about the inner workings of the database engine, and I can argue about the importance of using BCNF at all times. But writing large, complex SQL-statements forces me to hold a lot of data in my head at once, and I think this is, I believe, what makes me so tired.

One Response to “SQL coding makes me tired”

    Hi
    I read an article on the Internet, regarding locking in SQL Server, where the author (you) suggested tuning the “available number of locks” parameter to avoid lock escalation.
    I think this parameter is dynamically configured by SQL Server.

    Regards,
    Mats

Something to say?