Performance impact UUID vs VARCHAR(36)
Hi,
I'm determining if it is a good idea to migrate my UUID columns, which are currently stored as varchar(36) to the new UUID data type.
I did a few tests, and what I see is that the new UUID data type indeed takes less storage. What I also see is that the cost of queries increases when the UUID column is used in a join. So apparently it is more expensive to join on a UUID data type than on a varchar(36), which really surprised me. Saving storage is important, but it should not result in query performance loss. Does anyone have experiences with this or know why this is the case?
Best,
Derek
0
Comments
Hi,
I'm not seeing that in my super simple test.
Here is the result of joining VARCHAR type PRIOR to running database designer:
Here is the result of joining UUID type PRIOR to running database designer:
Here is the result of joining VARCHAR type AFTER running database designer:
Here is the result of joining UUID type AFTER running database designer:
The UUID join is faster in all cases.