Functions like “getdate()” and convert(varchar(10), MyDateColumn,101) commonly show up in the WHERE clause of queries. Here’s an example: select c.LastName from Customer c with (nolock) where c.LastUpdated < getdate() You might think “no big deal.” It’s just a function, but for sql server, it almost always turns a deterministic query into a non-deterministic one. The [...]
Continue reading about DBTalk – Avoid Functions in the WHERE Clause
Over the past 6 months, I’ve subscribed to the “DBTalk” distribution list at work and I’ve really been enjoying it. Here’s are my top 2 reasons: 1. Though I know there are many .NET coders who also happen to be very capable database designers and developers, I believe that the many of us still have a lot to [...]