Using LINQPad to Query Stack Overflow

Update (2010-12-30): I have updated the OData URI locations below, because of a recent move and re-architecture by the StackExchange team. In case you haven’t read, Stack Overflow and the rest of the Stack Exchange sites are now able to be queried using OData. This is great because as Jeff points out in the blog post: …if you just want to play with the data, it’s kind of tedious: you have to download the entire 700 plus megabyte archive, import it into some kind of database system — and only then can you even begin thinking about how to query out the results you’re looking for. ...

June 13, 2010 · 3 min · 431 words · Nick Berardi

How NOT To Optimize LINQ Statements

About a month ago I was experimenting with different ways to optimize my LINQ queries against the IdeaPipe database, in order to improve the read times. I wanted to improve the read times because our new Facebook Application was being launched and I anticipated an increase in our traffic to the server, which is used to host IdeaPipe and the Facebook Application component. Whenever I am trying to optimize SQL queries I fire up SQL Server Profiler and take a look at how the queries are performing. This helps me identify queries that are taking a longer time to execute and probably need to be looked at or re-thought. One of the queries that I identified as needing improvement was the following LINQ query: ...

September 24, 2008 · 4 min · 787 words · Nick Berardi

Deadlocked!: "read committed snapshot" Explained

I just recently read Jeff Atwood’s Deadlocked! article. I just wanted to give some more insight in to the read committed snapshot so that it is not perceived as “magic”. It has some definite advantages when dealing with deadlocks, however if your code relies on row level locking you are not going to be able to use this type of reading in SQL Server. First lets talk about how you enable it. It is not a transactional isolation level, so if you set it, it will effect your whole database. You have been warned! ...

August 25, 2008 · 3 min · 507 words · Nick Berardi

LINQ Cheat Sheet

This cheat sheet was compiled by Milan Negovan at http://www.aspnetresources.com/. It is very handy and I recommend everybody download it and print it out. Download: LINQ Cheat Sheet Document

February 11, 2008 · 1 min · 29 words · Nick Berardi