Temporal Table and Table locks

446 views Asked by At

I am thinking of using a temporal table solution for one of our application, and want to read historic data while new data is being written. Can this cause table locks? I have millions of rows to query/maybe even insert/update/delete.

1

There are 1 answers

2
Emin Mesic On BEST ANSWER

Actually, all queries can produce table locks, but this is not specific only for the Temporal Tables. The temporal tables are as all other tables in the SQL Server.

A system-versioned temporal table is a type of user table designed to keep a full history of data changes to allow easy point in time analysis. This type of temporal table is referred to as a system-versioned temporal table because the period of validity for each row is managed by the system (i.e. database engine).

You can add an index on them, you can boost the performance of them and etc.

Default isolation level on SQL Server is READ COMMITED. This isolation level will allow new inserts in the table. Update or delete can be a problem only if records that you want to affect are locked by another query.