Rico Mariani's Performance Tidbits

Implying no warranties and conferring no rights: "AS IS" since 1988

Browse by Tags

Tagged Content List
  • Blog Post: 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 …}; A: If you did just : var...
  • Blog Post: 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 conducted was to run a fixed number of queries...
  • Blog Post: 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? With regular expressions for instance it's usually...
  • Blog Post: 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 that is especially true in this case. I am certainly...
  • Blog Post: 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 what it means. On my particular hardware I was...
  • Blog Post: 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 the comments of the above posting) in which I had...
  • Blog Post: 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 test case in sampled mode and that gave me plenty...
  • Blog Post: 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 == orderid select o; foreach (Orders o in q) { … }...
  • Blog Post: 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 merit repeating :) Here's what I wrote: If I had...
  • Blog Post: 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 be all about getting rid of abstractions and just...
  • Blog Post: 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 -- that's where you assume things will go...
  • Blog Post: 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, you can’t realistically serve data that...
Page 1 of 1 (12 items)