-
Notifications
You must be signed in to change notification settings - Fork 933
guid.comb not sequential in PostgreSQL #1614
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Yes, indeed. Its NHibernate implementation originates from The Cost of GUIDs as Primary Keys article (as pointed out in So its usefulness for other databases depends on how these other databases sort them. As stated in NHibernate reference:
Well, I have found this article which measures it. (Its As written in it, sequentiality of GUIDs primary keys does not have a strong impact on all databases. For Oracle this is quite expected to me, since Oracle stores its data as un-ordered heaps by default. (While the default for SQL-Server is to set its primary key as clustered, which in SQL-Server means storing the data ordered by its PK.) Maybe that is the same for PostgreSQL than for Oracle, since its among the databases less impacted by GUID order. This article is also primarily about a GUID COMB solution which can be beneficial to different databases, thanks to a configuration parameter. So you could write (and eventually contribute) your own configurable custom generator for NHibernate, based on this article. (For practical reasons I would likely replace the use of So overall for the issue you have opened here, the behavior you witness is "as designed" and "as documented", closing. |
@fredericDelaporte Thanks for your explanation ! |
When using the NHibernate 5 guid.comb generator with C# in PostgreSQL 9.5 on Windows 10, the generated GUID's are not in sequential order.
Could it be that this is only implemented for SQL Server ?
The text was updated successfully, but these errors were encountered: