<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Using The Guid.Comb Identifier Strategy</title>
	<atom:link href="http://davybrion.com/blog/2009/05/using-the-guidcomb-identifier-strategy/feed/" rel="self" type="application/rss+xml" />
	<link>http://davybrion.com/blog/2009/05/using-the-guidcomb-identifier-strategy/</link>
	<description>Trying to walk that thin line between intelligence and ignorance</description>
	<lastBuildDate>Thu, 29 Jul 2010 20:54:12 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
	<item>
		<title>By: Aaron Palmer</title>
		<link>http://davybrion.com/blog/2009/05/using-the-guidcomb-identifier-strategy/comment-page-1/#comment-17123</link>
		<dc:creator>Aaron Palmer</dc:creator>
		<pubDate>Thu, 28 May 2009 15:27:09 +0000</pubDate>
		<guid isPermaLink="false">http://davybrion.com/blog/?p=1238#comment-17123</guid>
		<description>My team recently hashed over the differences between identities vs. guid.comb and hilo.  We ended up settling on the hilo strategy because several of our IDs find their way into a url for one reason or another.  It&#039;s just as simple to use as guid.comb.  Ayende has done a lot to support hilo as well.  Check this post of his http://ayende.com/Blog/category/482.aspx/ , looks like he uses hilo for all of his IDs.</description>
		<content:encoded><![CDATA[<p>My team recently hashed over the differences between identities vs. guid.comb and hilo.  We ended up settling on the hilo strategy because several of our IDs find their way into a url for one reason or another.  It&#8217;s just as simple to use as guid.comb.  Ayende has done a lot to support hilo as well.  Check this post of his <a href="http://ayende.com/Blog/category/482.aspx/" rel="nofollow">http://ayende.com/Blog/category/482.aspx/</a> , looks like he uses hilo for all of his IDs.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: BV</title>
		<link>http://davybrion.com/blog/2009/05/using-the-guidcomb-identifier-strategy/comment-page-1/#comment-16894</link>
		<dc:creator>BV</dc:creator>
		<pubDate>Tue, 26 May 2009 09:50:37 +0000</pubDate>
		<guid isPermaLink="false">http://davybrion.com/blog/?p=1238#comment-16894</guid>
		<description>Great article. 

I&#039;d like to learn more about this HILO things as well. Could anyone here point me in the right direction?</description>
		<content:encoded><![CDATA[<p>Great article. </p>
<p>I&#8217;d like to learn more about this HILO things as well. Could anyone here point me in the right direction?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Davy Brion</title>
		<link>http://davybrion.com/blog/2009/05/using-the-guidcomb-identifier-strategy/comment-page-1/#comment-16617</link>
		<dc:creator>Davy Brion</dc:creator>
		<pubDate>Sun, 24 May 2009 16:28:03 +0000</pubDate>
		<guid isPermaLink="false">http://davybrion.com/blog/?p=1238#comment-16617</guid>
		<description>@Peter

just use assigned id&#039;s, as mentioned in the docs</description>
		<content:encoded><![CDATA[<p>@Peter</p>
<p>just use assigned id&#8217;s, as mentioned in the docs</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter Morris</title>
		<link>http://davybrion.com/blog/2009/05/using-the-guidcomb-identifier-strategy/comment-page-1/#comment-16393</link>
		<dc:creator>Peter Morris</dc:creator>
		<pubDate>Sat, 23 May 2009 12:45:54 +0000</pubDate>
		<guid isPermaLink="false">http://davybrion.com/blog/?p=1238#comment-16393</guid>
		<description>I don&#039;t like having the ID as a property on my class so I usually leave it out.  I have recently had a scenario where I need to know the GUID before the object was saved to the DB.  Is there a way in NH to set the ID manually?</description>
		<content:encoded><![CDATA[<p>I don&#8217;t like having the ID as a property on my class so I usually leave it out.  I have recently had a scenario where I need to know the GUID before the object was saved to the DB.  Is there a way in NH to set the ID manually?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Davy Brion</title>
		<link>http://davybrion.com/blog/2009/05/using-the-guidcomb-identifier-strategy/comment-page-1/#comment-16228</link>
		<dc:creator>Davy Brion</dc:creator>
		<pubDate>Fri, 22 May 2009 13:06:00 +0000</pubDate>
		<guid isPermaLink="false">http://davybrion.com/blog/?p=1238#comment-16228</guid>
		<description>@Em

just mail it to ralinx at davybrion.com, thx :)</description>
		<content:encoded><![CDATA[<p>@Em</p>
<p>just mail it to ralinx at davybrion.com, thx <img src='http://davybrion.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Em</title>
		<link>http://davybrion.com/blog/2009/05/using-the-guidcomb-identifier-strategy/comment-page-1/#comment-16227</link>
		<dc:creator>Em</dc:creator>
		<pubDate>Fri, 22 May 2009 13:03:00 +0000</pubDate>
		<guid isPermaLink="false">http://davybrion.com/blog/?p=1238#comment-16227</guid>
		<description>&gt;i’d love to see the results of those tests
I&#039;ve got a folder containing VS project used to generate the results + XLS file containing aggregated results. Could you send me through PM an email address or network storage I coup upload the archive to ?

&gt;For typical usage scenario’s, guid.comb will be great IMO.
I agree with you. However, I think that index related subtleties should also be examined. But, you&#039;re right, this is a rather advanced topic, definitely out the scope of your article.

&gt;For tables that routinely undergo intensive insert processes, i’d probably go with HILO
Once again, I agree. Our DBA, however, was not feeling at ease with the generated table contained seeding primary key information. He was afraid that someone would/could (un)intentionally tamper with it and cause unexpected duplicate keys exceptions.</description>
		<content:encoded><![CDATA[<p>&gt;i’d love to see the results of those tests<br />
I&#8217;ve got a folder containing VS project used to generate the results + XLS file containing aggregated results. Could you send me through PM an email address or network storage I coup upload the archive to ?</p>
<p>&gt;For typical usage scenario’s, guid.comb will be great IMO.<br />
I agree with you. However, I think that index related subtleties should also be examined. But, you&#8217;re right, this is a rather advanced topic, definitely out the scope of your article.</p>
<p>&gt;For tables that routinely undergo intensive insert processes, i’d probably go with HILO<br />
Once again, I agree. Our DBA, however, was not feeling at ease with the generated table contained seeding primary key information. He was afraid that someone would/could (un)intentionally tamper with it and cause unexpected duplicate keys exceptions.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Reflective Perspective - Chris Alcock &#187; The Morning Brew #353</title>
		<link>http://davybrion.com/blog/2009/05/using-the-guidcomb-identifier-strategy/comment-page-1/#comment-16212</link>
		<dc:creator>Reflective Perspective - Chris Alcock &#187; The Morning Brew #353</dc:creator>
		<pubDate>Fri, 22 May 2009 09:11:01 +0000</pubDate>
		<guid isPermaLink="false">http://davybrion.com/blog/?p=1238#comment-16212</guid>
		<description>[...] Using The Guid.Comb Identifier Strategy - Davy Brion looks at the Guid.Comb NHibernate Identity strategy which helps avoid index fragmentation in the database due to the traditionally random nature of GUID values. [...]</description>
		<content:encoded><![CDATA[<p>[...] Using The Guid.Comb Identifier Strategy &#8211; Davy Brion looks at the Guid.Comb NHibernate Identity strategy which helps avoid index fragmentation in the database due to the traditionally random nature of GUID values. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Davy Brion</title>
		<link>http://davybrion.com/blog/2009/05/using-the-guidcomb-identifier-strategy/comment-page-1/#comment-16172</link>
		<dc:creator>Davy Brion</dc:creator>
		<pubDate>Thu, 21 May 2009 21:04:10 +0000</pubDate>
		<guid isPermaLink="false">http://davybrion.com/blog/?p=1238#comment-16172</guid>
		<description>@Neal

http://blogs.hibernatingrhinos.com/nhibernate/archive/2008/04/04/identity-field-equality-and-hash-code.aspx :)</description>
		<content:encoded><![CDATA[<p>@Neal</p>
<p><a href="http://blogs.hibernatingrhinos.com/nhibernate/archive/2008/04/04/identity-field-equality-and-hash-code.aspx" rel="nofollow">http://blogs.hibernatingrhinos.com/nhibernate/archive/2008/04/04/identity-field-equality-and-hash-code.aspx</a> <img src='http://davybrion.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Davy Brion</title>
		<link>http://davybrion.com/blog/2009/05/using-the-guidcomb-identifier-strategy/comment-page-1/#comment-16170</link>
		<dc:creator>Davy Brion</dc:creator>
		<pubDate>Thu, 21 May 2009 20:54:22 +0000</pubDate>
		<guid isPermaLink="false">http://davybrion.com/blog/?p=1238#comment-16170</guid>
		<description>@Em

i&#039;d love to see the results of those tests :)

and the purpose of the test in this post was more to show that the insert statements can be batched (which is an important benefit of the Unit Of Work pattern), while avoiding unnecessary roundtrips and still getting good primary key values that cause less index fragmentation than plain guids.  For typical usage scenario&#039;s, guid.comb will be great IMO.

For tables that routinely undergo intensive insert processes, i&#039;d probably go with HILO which i think avoids all of the problems you mention, and also avoids the identity-style roundtrips.</description>
		<content:encoded><![CDATA[<p>@Em</p>
<p>i&#8217;d love to see the results of those tests <img src='http://davybrion.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>and the purpose of the test in this post was more to show that the insert statements can be batched (which is an important benefit of the Unit Of Work pattern), while avoiding unnecessary roundtrips and still getting good primary key values that cause less index fragmentation than plain guids.  For typical usage scenario&#8217;s, guid.comb will be great IMO.</p>
<p>For tables that routinely undergo intensive insert processes, i&#8217;d probably go with HILO which i think avoids all of the problems you mention, and also avoids the identity-style roundtrips.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Neal Blomfield</title>
		<link>http://davybrion.com/blog/2009/05/using-the-guidcomb-identifier-strategy/comment-page-1/#comment-16169</link>
		<dc:creator>Neal Blomfield</dc:creator>
		<pubDate>Thu, 21 May 2009 20:52:20 +0000</pubDate>
		<guid isPermaLink="false">http://davybrion.com/blog/?p=1238#comment-16169</guid>
		<description>How do you address the issue of allowing the database / orm to control object identity?  

I was using the guid.comb approach when building my first NH based app but the problem I found was that implementing things such as object equality and hashcodes get very complex very fast when you cannot rely on the oid (as this is not assigned until the object is saved).  I use numbered versioning now and assign guid based ids at object creation as this greatly simplifies aspects such as equality and hashcode generation.

See http://www.onjava.com/pub/a/onjava/2006/09/13/dont-let-hibernate-steal-your-identity.html for an interesting discussion on why.</description>
		<content:encoded><![CDATA[<p>How do you address the issue of allowing the database / orm to control object identity?  </p>
<p>I was using the guid.comb approach when building my first NH based app but the problem I found was that implementing things such as object equality and hashcodes get very complex very fast when you cannot rely on the oid (as this is not assigned until the object is saved).  I use numbered versioning now and assign guid based ids at object creation as this greatly simplifies aspects such as equality and hashcode generation.</p>
<p>See <a href="http://www.onjava.com/pub/a/onjava/2006/09/13/dont-let-hibernate-steal-your-identity.html" rel="nofollow">http://www.onjava.com/pub/a/onjava/2006/09/13/dont-let-hibernate-steal-your-identity.html</a> for an interesting discussion on why.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Em</title>
		<link>http://davybrion.com/blog/2009/05/using-the-guidcomb-identifier-strategy/comment-page-1/#comment-16157</link>
		<dc:creator>Em</dc:creator>
		<pubDate>Thu, 21 May 2009 19:06:37 +0000</pubDate>
		<guid isPermaLink="false">http://davybrion.com/blog/?p=1238#comment-16157</guid>
		<description>Hello,

Thanks for this post. However, it might not be completely precise from the database point of view. 
We recently ran some tests to try and validate the guid.comb generator as identifier field. SQL Server 2005 was the back end storage. It works pretty well, provided the triggered inserts statements targeting the same table are separated by at least 3.333... milliseconds period. 

As Nillson states &quot;A DATETIME has the &quot;precision&quot; of 1/300th of a second&quot;. Thus, massive inserts (as in your test), leads to a higher fragmentation than the &quot;standard&quot; identity generator, because of the similar end of the 6 last bytes. However, this higher index fragmetation is, of course, far from what one would encounter by relying on plain Guids.

What we finally stated was that, for most standard purposes, very little number of Session.Save() calls would be performed on the same kind of entity within this 1/300th of a second. For the more intensive inserts processes, index defragmentation job would have to be run more often.

I may still have the results of our tests that I could share with you, if this would be of any interest to you.


Em.

BTW : I&#039;m not a database guy, but have been compelled to learn and understand some of the indexing SQL Server behavior in order have proper arguments to oppose to the standard &quot;Use the identity. It&#039;s fast. It&#039;s safe. It&#039;s recommended by Microsoft&quot; DBA answer and eventually get the DBA accept the proposal.</description>
		<content:encoded><![CDATA[<p>Hello,</p>
<p>Thanks for this post. However, it might not be completely precise from the database point of view.<br />
We recently ran some tests to try and validate the guid.comb generator as identifier field. SQL Server 2005 was the back end storage. It works pretty well, provided the triggered inserts statements targeting the same table are separated by at least 3.333&#8230; milliseconds period. </p>
<p>As Nillson states &#8220;A DATETIME has the &#8220;precision&#8221; of 1/300th of a second&#8221;. Thus, massive inserts (as in your test), leads to a higher fragmentation than the &#8220;standard&#8221; identity generator, because of the similar end of the 6 last bytes. However, this higher index fragmetation is, of course, far from what one would encounter by relying on plain Guids.</p>
<p>What we finally stated was that, for most standard purposes, very little number of Session.Save() calls would be performed on the same kind of entity within this 1/300th of a second. For the more intensive inserts processes, index defragmentation job would have to be run more often.</p>
<p>I may still have the results of our tests that I could share with you, if this would be of any interest to you.</p>
<p>Em.</p>
<p>BTW : I&#8217;m not a database guy, but have been compelled to learn and understand some of the indexing SQL Server behavior in order have proper arguments to oppose to the standard &#8220;Use the identity. It&#8217;s fast. It&#8217;s safe. It&#8217;s recommended by Microsoft&#8221; DBA answer and eventually get the DBA accept the proposal.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
