Monday, June 15, 2009

SQL Server Optimization tips

Nice article on SQL Server Optimization tips and performance consideration for selecting SQL Server data types.

Most of the content of this article would have been greek and latin to me had I not been working in Lumenos.

I still remember those days when I used to write "Extravaganza Report" in one single stored procedure spanning 2000 lines. I have moved more toward ORM based architecture these days in my current company, but I still think a report as complex (it really was) as extravaganza needs stored procedure for the kind of SLA that was expected out it..

Thursday, June 11, 2009

Scenarios when you can use struct

Nice article by Chris Eargle on when we should use structs:

He mentions the following criteria for creating struct

1. Does it represent a single value?
2. Will the instance size be under 16 bytes?
3. Should it be immutable (modifications actually make a new copy in memory, forcing you to pass by ref to methods)?
4. Will this rarely need to be boxed (cast to an object)?
5. Will it usually be short-lived?
6. Will it mostly be embedded in other objects?

Click here to read the full article