L2SProf
L2SProf
Profiler new feature: Too many joins detection
This is Josh’s feature, since we wrote most of the code for it together. Basically, it recognize a very common performance problem, queries that uses too many joins, such as this one: Which would result in the following warning: Queries with too many joins might be a performance problem. Each join requires the database to perform additional work, and the complexity and cost of the query grows rapidly with each additional join. While relational database are optimized for handling joins, it is often more efficient to perform several separate queries...
Profiler Speculative Feature: Query plans
This isn’t a new feature, because you can’t use it right now, but it is a really nice feature that we are working on, and I couldn’t resist showing it off hot “off the press”, so to speak. Given the following query: SELECT this_.id AS id7_1_, this_.title AS title7_1_, this_.subtitle AS subtitle7_1_, this_.allowscomments AS allowsco4_7_1_, this_.createdat AS createdat7_1_, posts2_.blogid AS blogid3_, posts2_.id AS id3_, ...
Linq to SQL Profiler 1.0 Released!
Well, I planned to do it last week, but it got delay for personal reasons. But here it is, Linq to SQL Profiler is now out of beta, and I personally think it is awesome. Using the profiler, you gain valuable insight about the actual data access pattern of your application (which is usually abstracted away by the Linq to SQL framework). But the profiler goes beyond just dumping a heap of data on you, it takes it several steps further by: Tying together queries and code, you can go directly...
Profiler new feature: Integrating with application frameworks
One of the things that makes working with the profiler easier is the fact that it gives you not just information, but information in context. I was working with an app using Rhino Service Bus, and it really bothered me that I couldn’t immediately figure out what was the trigger for a session. When using ASP.Net or WCF, the profiler can show the URL that triggered the request, but when we are not using a url based mechanism, that turns out to be much harder. So I set out to fix that, you can see the results...
Reminder: Linq to SQL Profiler goes 1.0 on the 14th
On the 14th of Febuary, Linq to SQL Profiler will complete its beta period. The 30% beta discount will be discontinued at that time, so if you think it is useful, you have better hurry up and show that you love it.
Say hello to Uber Prof
I got several requests for this, so I am making Uber Prof itself available for purchasing. What is Uber Prof? It is a short hand way of saying: All the OR/M profilers that we make. An Uber Prof license gives you the ability to use: NHibernate Profiler Hibernate Profiler Linq to SQL Profiler Entity Framework Profiler And it will automatically give you the ability to use any additional profilers that we will create. And yes, there is an upgrade path if...
What happens behind the scenes: NHibernate, Linq to SQL, Entity Framework scenario analysis
One of the things that I began doing since starting to work on multiple OR/M Profilers is to compare how all of them are handling a particular task. This is by no means a comparative analysis, but it is an interesting data point. The scenario in question is loading a blog with all its posts and comments. Let us start with NHibernate: var blogs = s.CreateQuery(
@"from Blog b
left join fetch b.Posts p
left...
Linq to SQL Profiler release is upcoming
Following the tradition of choosing meaningful calendar dates (although the first few cases were accidentals) for my releases, the Linq to SQL Profiler will be released in a 1.0 version on the 14th February. At that time, the beta discount will be discontinued, so hurry up and show Linq to SQL that you love it by buying the profiler.
Linq to SQL Profiler Video
The guys from CodeSmith has just put out a sample video showing how to use Linq to SQL Profiler. I love it!
Profiler New Feature: Side by Side diff
The profiler could do session diffs (showing the difference between executed statements between two sessions) for a while now, but we got some requests for changing it to follow a more traditional source control diff style. This is now done, and it should make it easier to understand the changes between two sessions:
UberProf new feature: Query Plan Cache Misuse
This is a new feature available for NHibernate Profiler*, Linq to SQL Profiler and Entity Profiler. Basically, it detects when the same query is executed with different parameter sizes, which generate different query plan in the query cache. Let us say that we issue two queries, to find users by name. (Note that I am using a syntax that will show you the size of the parameters, to demonstrate the problem). We can do this using the following queries. exec sp_executesql
N'SELECT * FROM Users WHERE Username...
ÜberProf new feature: Fully keyboard enabled
For a long time, most of the work in the profiler (NH Prof, HProf, L2S Prof & EF Prof) could be done only with the use of the mouse. That annoyed a bunch of people, but it didn’t really bother me. Rob fixed this recently, and I cannot believe what kind of a difference it makes. Here are the shortcuts: S Focus on Sessions tab header ...
ÜberProf new feature: Programmatic Integration
Well… I am still working done the list of stuff people request for the profiler (NH Prof, HProf, L2S Prof & EF Prof) , and one of the things that popped into the head of the list was wanting to have programmatic access to the profiler output. We aren’t talking about just the XML reports that are available, but to be able to get the data in a way that is easy to work with. Well, here it is: There is a new DLL in the profiler distribution, HibernatingRhinos.Profiler.Integration, where you can find the CaptureProfilerOutput...
ÜberProf and Continuous Integration
One of the features that keep popping up for ÜberProf is that people want to use that in CI scenarios, usually to be able to programmatically check that they don’t have things like SELECT N+1 popping up, etc. With build 562 of ÜberProf, this is now possible. How does this works? We now have a command line interface for ÜberProf, with the following options: /CmdLineMode[+|-] (short form /C)/File:<string> (short form /F)/ReportFormat:{Xml|Html} (short form...
Tweets that warm my heart
I got up this morning and the following showed up in my tweeter search: I would say that from the “is the profiler helping customers?”, we are in a pretty good position.
Linq to Sql profiler – transactions
Well, here is a new thingie, L2SProf can now detect transactions. Both standard SQL transactions: And also distributed transactions using System.Transactions: This is an interesting feature, because you can see how the use of different transaction strategies have a big impact on how you structure your code. For example, with L2S, it seems like you are encouraged to read outside of a transaction. Something that I, as an NHibernate user, find quite odd.
L2S Prof hardships – getting query duration and row counts
I really want to be able to provide duration & row count for Linq to Sql. It has became a personal goal of mine. The problem is that there is absolutely no open extensibility points within L2S that would allow it. The solution is… to break down the wall. If you don’t have extensibility points, then I will make some. And, you know what? I did: The problem is that it took almost 12 hours to get it to this point, and along the way I had to build a...
Linq to Sql Profiler is now on public beta
Well, after talking about it quite often recently, I think it is just about time to make this public. The Linq to Sql Profiler is now on public beta, and it is even more awesome than you could imagine. We are able to get a tremendous amount of information out of Linq to Sql, so from profiling behavior it is quite on par with NH Prof or Hibernate Profiler. Here is a screen shot: Please note that the UI color scheme is still under...
LinqToSql Profiler & NHibernate Profiler – What is happening?
About two weeks ago I posted my spike results of porting NHProf to Linq to SQL, a few moments ago I posted screenshots of the code that is going to private beta.
I spent most of the last week working on the never-ending book, but that is a subject for a different post. Most of the time that I actually spent on the profiler wasn’t spent on integrating with Linq to SQL. To be frank, it took me two hours to do basic integration to Linq to SQL. That is quite impressive, considering that is from the point of view of...
LinqToSql Profiler private Beta – the screen shot gallery
This is just to give you some ideas about what the new LinqToSql Profiler can do.
It can track statements and associate them to their data context, gives you properly formatted and highlighted SQL, including the parameters, in a way that you can just copy and execute in SQL Server:
The profiler can tell you when you are hitting the database too often.
All the usual reports, what methods caused what queries to be executed?
Reports about unique queries across the entire profiling session:
And overall usage reports: