﻿<?xml version="1.0" encoding="utf-8"?><rss version="2.0"><channel><title>Ayende @ Rahien</title><link>http://ayende.com</link><description>Ayende @ Rahien</description><copyright>Copyright (C) Ayende Rahien  2004 - 2021 (c) 2026</copyright><ttl>60</ttl><item><title>Ayende Rahien commented on NH Prof: How to detect SELECT N + 1</title><description>Steve,
  
I would gladly take a patch for that. I don't consider this an easy problem
</description><link>http://ayende.com/3657/nh-prof-how-to-detect-select-n-1#comment13</link><guid>http://ayende.com/3657/nh-prof-how-to-detect-select-n-1#comment13</guid><pubDate>Thu, 30 Oct 2008 22:12:20 GMT</pubDate></item><item><title>Steve Campbell commented on NH Prof: How to detect SELECT N + 1</title><description>I don't understand why none of the ORMs have built-in support to dynamically detect and optimize N+1 in a live environment.   
  
  
The basics would be real easy to write - the ORM can correlate the "N" queries with the "+1" query, and prefetch batches of results when it detects a likely problem.  Add in some statistics to enable smart decisions, and pretty soon you have the first ORM in the world to not care about N+1.   
</description><link>http://ayende.com/3657/nh-prof-how-to-detect-select-n-1#comment12</link><guid>http://ayende.com/3657/nh-prof-how-to-detect-select-n-1#comment12</guid><pubDate>Thu, 30 Oct 2008 17:01:59 GMT</pubDate></item><item><title>Ayende Rahien commented on NH Prof: How to detect SELECT N + 1</title><description>I don't think so. You don't have enough information there
</description><link>http://ayende.com/3657/nh-prof-how-to-detect-select-n-1#comment11</link><guid>http://ayende.com/3657/nh-prof-how-to-detect-select-n-1#comment11</guid><pubDate>Wed, 29 Oct 2008 12:56:08 GMT</pubDate></item><item><title>Tuna Toksoz commented on NH Prof: How to detect SELECT N + 1</title><description>Wouldn't it be possible to catch N+1 using listeners?
</description><link>http://ayende.com/3657/nh-prof-how-to-detect-select-n-1#comment10</link><guid>http://ayende.com/3657/nh-prof-how-to-detect-select-n-1#comment10</guid><pubDate>Wed, 29 Oct 2008 12:49:34 GMT</pubDate></item><item><title>Demis commented on NH Prof: How to detect SELECT N + 1</title><description>Not wanting too pedantic but any 'magic numbers' (i.e. not 0 or 1) should be a constant at least.  
</description><link>http://ayende.com/3657/nh-prof-how-to-detect-select-n-1#comment9</link><guid>http://ayende.com/3657/nh-prof-how-to-detect-select-n-1#comment9</guid><pubDate>Fri, 24 Oct 2008 02:15:55 GMT</pubDate></item><item><title>Ayende Rahien commented on NH Prof: How to detect SELECT N + 1</title><description>Scott,
  
I intend on making this a commercial project. As such, I don't want to limit myself to people having R#.
  
It is also a very different mindset than what R# is doing. The information is gathered at runtime, from the execution of the code, not from analyzing the source.
</description><link>http://ayende.com/3657/nh-prof-how-to-detect-select-n-1#comment8</link><guid>http://ayende.com/3657/nh-prof-how-to-detect-select-n-1#comment8</guid><pubDate>Thu, 23 Oct 2008 18:40:47 GMT</pubDate></item><item><title>Scott White commented on NH Prof: How to detect SELECT N + 1</title><description>Why not add these features to the NHibernate add-in for Resharper?  I downloaded it recently and am added it.  These could be warnings or something like that.
</description><link>http://ayende.com/3657/nh-prof-how-to-detect-select-n-1#comment7</link><guid>http://ayende.com/3657/nh-prof-how-to-detect-select-n-1#comment7</guid><pubDate>Thu, 23 Oct 2008 16:06:30 GMT</pubDate></item><item><title>Ayende Rahien commented on NH Prof: How to detect SELECT N + 1</title><description>Bryan,
  
I don't need to worry about this, since NH produce predictable SQL for all scenarios
</description><link>http://ayende.com/3657/nh-prof-how-to-detect-select-n-1#comment6</link><guid>http://ayende.com/3657/nh-prof-how-to-detect-select-n-1#comment6</guid><pubDate>Thu, 23 Oct 2008 13:29:52 GMT</pubDate></item><item><title>Ayende Rahien commented on NH Prof: How to detect SELECT N + 1</title><description>I had to pick a threshold, and 3 identical queries in the session seemed to be a good max to use.
  
I don't want to have to false positives.
</description><link>http://ayende.com/3657/nh-prof-how-to-detect-select-n-1#comment5</link><guid>http://ayende.com/3657/nh-prof-how-to-detect-select-n-1#comment5</guid><pubDate>Thu, 23 Oct 2008 13:27:07 GMT</pubDate></item><item><title>Bryan commented on NH Prof: How to detect SELECT N + 1</title><description>Is the .RawSql '==' operator overridden?  If the raw sql is just a string, it would be a lot more useful to compare the actual pieces of the string (and their order) instead of seeing if the two strings are identical.
  
  
IE: select *         from 
  
     something
  
  
should be the same as
  
  select * from something
</description><link>http://ayende.com/3657/nh-prof-how-to-detect-select-n-1#comment4</link><guid>http://ayende.com/3657/nh-prof-how-to-detect-select-n-1#comment4</guid><pubDate>Thu, 23 Oct 2008 13:25:50 GMT</pubDate></item><item><title>Neil Mosafi commented on NH Prof: How to detect SELECT N + 1</title><description>It's nice!  Can you explain why you picked 4 as the threshold?  Was it just arbitrary or based on some experience that if you have less than 4 it's not a problem?
  
  
Cheers
</description><link>http://ayende.com/3657/nh-prof-how-to-detect-select-n-1#comment3</link><guid>http://ayende.com/3657/nh-prof-how-to-detect-select-n-1#comment3</guid><pubDate>Thu, 23 Oct 2008 13:15:04 GMT</pubDate></item><item><title>Ayende Rahien commented on NH Prof: How to detect SELECT N + 1</title><description>[ayende.com/.../...SelectN1ProblemInNHibernate.aspx](http://ayende.com/Blog/archive/2006/05/02/CombatingTheSelectN1ProblemInNHibernate.aspx)</description><link>http://ayende.com/3657/nh-prof-how-to-detect-select-n-1#comment2</link><guid>http://ayende.com/3657/nh-prof-how-to-detect-select-n-1#comment2</guid><pubDate>Thu, 23 Oct 2008 12:58:02 GMT</pubDate></item><item><title>Buckley commented on NH Prof: How to detect SELECT N + 1</title><description>Can you post a good link to the SELECT N + 1 "problem"(?)
</description><link>http://ayende.com/3657/nh-prof-how-to-detect-select-n-1#comment1</link><guid>http://ayende.com/3657/nh-prof-how-to-detect-select-n-1#comment1</guid><pubDate>Thu, 23 Oct 2008 12:40:31 GMT</pubDate></item></channel></rss>