Forum Discussion
gahenry
Jun 20, 2023Copper Contributor
How to use ROWGUIDs
I own a small retail organization and our POS system has a SQL based backend. As you might guess the company that does our POS system is not very helpful when we need custom work so I have been give...
olafhelper
Jun 22, 2023Bronze Contributor
how do you use ROWGUID’s in Practice
Hello Gary,
A ROWGUID is used in Merge replication = distrubuted databases over several localition/regions.
I don't know any other usefull use-case for it.
I am assuming that if I use the ROW GUID field in my query it would be faster. Is that true?
No, really not. It's a uniqueidentifier (Transact-SQL) - SQL Server | Microsoft Learn and needs 16 bytes for storage. As simple integer with IDENTITY (Function) (Transact-SQL) - SQL Server | Microsoft Learn needs only 4 bytes (for raw data + for index data); that's a 1/4. No, GUID will make it slower.