Better late than never, but one must know that NHibernate guid.comb is sequential from the viewpoint of SQL-Server implementation only. Other databases may sort them differently, and then will not have guid.comb sequentially generated in regard to their implementation.
Le jeudi 25 février 2016 20:10:50 UTC+1, fknebels a écrit : > > I'd say just google for it. > > > https://www.google.com/search?q=guid.comb+performance&oq=guid.comb+performance&aqs=chrome..69i57.4210j0j7&sourceid=chrome&es_sm=122&ie=UTF-8 > > there's enough information out there about why you'd want to use such a > strategy and the performance implications. > > TL;DR; is comb.guid's are seqential so they are better for inserts and > indices in relational databases. > > What is the major difference? > > comb.guids are sequential > > What situation should I use one or other? > > I always use comb.guids (sql server and oracle) //i've never used mysql. > > Is there any difference in the performance? > > comb.guids should be faster than guid's but not as fast as sql identities > > I know it's difficult but can we have conflicts using Guid mapping instead > using Guid.Comb in any database? > > comb guids are generated by your code so you can't go inserting records > directly into your db without going through your nh layer without messing > up the sequential-ness. > > > On Thu, Feb 25, 2016 at 1:58 PM, Felipe Oriani <[email protected] > <javascript:>> wrote: > >> Hi everyone. I have a simple question. >> >> Toda, we can use an Id as a Guid (16-bytes data structure), but, in >> NHibernate we have two algoritms to use this strategy for Ids. The Guid and >> Guid.Comb. Look at the code, the Guid just use Guid.NewGuid() from .Net >> Framework and Guid.Comb has an algorithm that I don't understand very much, >> but I would like to know more about this topic. >> >> In the Nhibernate Docs I found this about Guids >> >> *The guid identifier is generated by calling Guid.NewGuid(). To address >> some of the performance concerns with using Guids as primary keys, foreign >> keys, and as part of indexes with MS SQL the guid.comb can be used. The >> benefit of using the guid.comb with other databases that support GUIDs has >> not been measured.* >> >> What is the major difference? What situation should I use one or other? >> Is there any difference in the performance? I know it's difficult but can >> we have conflicts using Guid mapping instead using Guid.Comb in any >> database? >> >> The projects we develop uses Ms Sql Server, Oracle and Mysql. >> >> Thank you. >> >> -- >> ______________________________________ >> Felipe B Oriani >> [email protected] <javascript:> >> >> -- >> You received this message because you are subscribed to the Google Groups >> "nhusers" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected] <javascript:>. >> To post to this group, send email to [email protected] >> <javascript:>. >> Visit this group at https://groups.google.com/group/nhusers. >> For more options, visit https://groups.google.com/d/optout. >> > > -- You received this message because you are subscribed to the Google Groups "nhusers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/nhusers. For more options, visit https://groups.google.com/d/optout.
