Can I use self-increasing id for PG and Oracle primary keys?

used to use mysql, you can directly set self-increasing id,PG and Oracle need to create self-increasing sequence.
found that the primary keys in the oracle project do not use self-increment, but use the generated uuid. Is it better this way?

Apr.19,2022

in general, it is not recommended to use uuid for primary keys. On the one hand, it takes up a lot of space, and on the other hand, when inserting data, there is more pressure on index updates.

uuid has good confidentiality and convenient data migration. If there is a strong demand for these two aspects, you can also consider using it.

Menu