There are several main reasons.
Using Guid gives you the opportunity to identify a single object in many databases, including six relational databases with the same schema, but different data, a document database, etc. This becomes important at any time when you have more than one place where the data goes - and that also means your business: you have a dev database and a prod database, right?
Using Guid gives NHibernate the ability to simultaneously execute several commands, do a lot of work with databases at the very end of a unit of work / transaction, and reduce the total number of database calls, increasing productivity and other benefits.
Comment:
Random Guid do not create bad indexes - initially they create bad clustered indexes. There are two solutions.
Use a partially sequential Guid . With NHibernate, this means using the id generator guid.comb rather than the id Guid generator. guid.comb is partially consistent for good performance, but retains a very high degree of randomness.
The primary key of Guid should be the nonclustered index, and the clustered index should be in another auto-increment column. You can select this column, in which case you will lose the advantage of a better dosage and less rounding, but you will get all the advantages of short numbers that fit easily into the URL. Or you may decide not to display this column and leave it completely in the database, in which case you will get better performance for Guid as primary keys, as well as better performance for NHibernate, which performs fewer hits.
source share