Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Sequence vs sys_guid()

vpolasaSep 8 2020 — edited Sep 8 2020

Our organization has a database with tables defined as families. All the families have entity keys (primary key) with data type number and uniqueness of this entity keys are defined using a sequence.

We're trying to move from sequence to sys_guid() to generate the entity key.  sys_guid() will be stored as varchar2(50) for the entity key (this decision is made by the management)

I feel sys_guid() are large values and are less efficient (more space in disk, memory and more CPU to process).

Can you please share your thoughts?

How would this impact the performance? (Any code samples to prove your statement would be greatly appreciated).

Working on Windows 10

Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production

This post has been answered by L. Fernigrini on Sep 8 2020
Jump to Answer
Comments
Post Details
Added on Sep 8 2020
4 comments
1,784 views