MS SQL explicit rowversion column overhead? For MS SQL servers, when I declare something like rv rowversion in the table definition, I have access to the rowversion value of the record. Does it have any impact to the size of the table?
If I understand it correctly, the rowversion value is stored for the record independently whether I make the column explicit, or whether it is hidden. So, making the column explicit should not lead to the increase of the size of the record (of the table). Is that assumption correct?
The &quot;hidden&quot; and &quot;explict&quot; row versions are entirely different beasts. The explict rowversion (a.k.a. timestamp misnomer) is part of the table schema with an 8-byte fixed size for all rows. The rowversion column value may be used to determine if a row has changed since it was last retrieved as part of an optimistic concurrency check in either T-SQL or application code.
The hidden rowversion is a 14-byte value in the internal row structure the database engine uses internally to support consistency when either the ALLOW_SNAPSHOT_ISOLATION or READ_COMMITTED_SNAPSHOT database options are turned on. Unlike rowversion, this internal value is not part of the schema and not exposed directly. The field (sic) may or may not exist in a given record since it is added and maintained by SQL Server as needed to support row-versioning instead of locking for consistency.
The internal row version field and rowversion column values are independent of one another. Both may exist in the same record.