4 ms·
I came to the conclusion that IDs should be application-assisted, if not application generated. Offloading that to DB brings some unnecessary work that needs to
by tehlike 6y ago
I came to the conclusion that IDs should be application-assisted, if not application generated. Offloading that to DB brings some unnecessary work that needs to be handled on the application side otherwise, and tends to o be bad for performance.
What do i mean by application generated?
1. UUID -> Bad for index, but for some use cases it's ok.
2. Sequential UUID -> Good with index, works most of the time.
3. HiLo (a server gets a chunk of id range from database, and assign that to entities on their own).
This allows for more performant applications especially if you are designing somewhat complex data model.
- tehlike 6y agoSee this post for my reasoning: https://nhibernate.info/blog/2009/03/19/nhibernate-poid-generators-revealed.html https://nhibernate.info/blog/2009/03/19/nhibernate-poid-gene...