UUID generates primary keys to avoid duplication of primary keys, and the program is easy to maintain. @wangcw explains it very well. As for the disadvantages, I have not encountered them yet due to limited experience
As far as I understand, the advantages of using UUID are low repeatability, convenient automatic generation, and there is no need to consider the problem of repeated insertion failure of the primary key; The reason why it is not recommended to use UUID: After the data volume reaches a certain value, index maintenance is very inconvenient, and the database performance is greatly reduced. Fragmentation organization also has a certain impact.
UUID generates primary keys to avoid duplication of primary keys, and the program is easy to maintain. @wangcw explains it very well. As for the disadvantages, I have not encountered them yet due to limited experience
As far as I understand, the advantages of using UUID are low repeatability, convenient automatic generation, and there is no need to consider the problem of repeated insertion failure of the primary key;
The reason why it is not recommended to use UUID: After the data volume reaches a certain value, index maintenance is very inconvenient, and the database performance is greatly reduced. Fragmentation organization also has a certain impact.
If you use UUID, you have to maintain the primary key through the application. Isn’t this very cumbersome...