Welcome to MSDN Blogs Sign in | Join | Help

Browse by Tags

All Tags » databases   (RSS)

Linq Compiled Queries Q & A

I did a series of postings on Linq Compiled Queries last year, I recently got some questions on those postings that I thought would be of general interest. Q1: Why use the 'new' keyword in this snippet? var q = from o in nw.Orders select new {o.everything
Posted by ricom | 5 Comments

Performance Quiz #13 -- Linq to SQL compiled query cost -- solution

Well is there really a "solution" at all in general? This particular case I think I constrained enough that you can claim an answer but does it generalize? Let's look at what I got first, the raw results are pretty easy to understand. The experiment I
Posted by ricom | 18 Comments
Filed under: , ,

Performance Quiz #13 -- Linq to SQL compiled queries cost

I've written a few articles about Linq now and you know I was a big fan of compiled queries in Linq but what do they cost? Or more specifically, how many times to you have to use a compiled query in order for the cost of compilation to pay for itself?
Posted by ricom | 28 Comments
Filed under: , ,

Database Performance, Correctness, Compostion, Compromise, and Linq too

Introduction and Disclaimer Regular readers of my blog are already familiar with my goal to provide brief and useful information that is approximately correct and that illustrates some key truths. Most of the time my articles are not authoritative and
Posted by ricom | 16 Comments

DLinq (Linq to SQL) Performance (Part 5)

This posting is the last of what I had planned in this series but I think there are likely to be questions, especially when Orcas Beta 2 is more widely available so we're likely to talk about this some more. First let's talk about the result I got and
Posted by ricom | 23 Comments
Filed under: ,

DLinq (Linq to SQL) Performance (Part 4)

Well it's high time I gave you some numbers for the new stuff. In the original benchmark the Linq version was running at 13.62% of the original time. And while I'm discussing that result, Sekiya Sato pointed out an error in my original benchmark (see
Posted by ricom | 24 Comments
Filed under: ,

DLinq (Linq to SQL) Performance (Part 3)

I’d like to start with a little housekeeping. Some readers asked me how I made the nifty table in part 2 that showed the costs broken down by major area. It was actually pretty easy to create that table using our profiler. I did 500 iterations of the
Posted by ricom | 24 Comments
Filed under: ,

DLinq (Linq to SQL) Performance (Part 2)

So after getting some high level times I started digging into the particulars of the costs more broadly and I ended up studying a very simple query like the below one. Northwinds nw = new Northwinds(conn); var q = from o in nw.Orders where o.OrderId ==
Posted by ricom | 23 Comments
Filed under: ,

Caching Redux

I got some interesting questions about how to build good middle-tier caches in my inbox last week. I cleaned up the responses a little bit and I'm posting them here because they're actually pretty general. I've written about this before but some things
Posted by ricom | 0 Comments

DLinq (Linq to SQL) Performance (Part 1)

[ By popular demand, here are links for all 5 parts in the series Part 1 , Part 2 , Part 3 , Part 4 , Part 5 -Rico ] I love Linq. Really. That might scare you because it has all these wacky new constructs and as a performance guy you'd think that I'd
Posted by ricom | 41 Comments
Filed under: ,

Optimistic vs. Pessimistic Locking consequences

Putting on my "database guy" hat, a few days I was asked to comment on locking techniques for databases and to point out some problems with using transactions as a pessimistic locking technique. Here's what I said... Some definitions: Optimistic locking
Posted by ricom | 2 Comments
Filed under: ,

Some thoughts/advice about databases and caching

As usual, kindly allow me to speak in rough terms so that I might be brief keeping in mind that there are exceptions to what I write below. I think the most important thing to remember about serving data from a database is that, as a practical matter,
Posted by ricom | 2 Comments
 
Page view tracker