I have a table p with a column points. There are a couple of million of records in the table and i need to regularly calculate and update the points for each row. This process takes a couple of minutes and it locks the table. I need to be able to insert and update records in p in the meanwhile. One solution I was thinking of is to create a second table and add a foreign key to p and the points column there. If this table is locked for a couple of minutes that's fine. Are here disadvantages/consequences that I should keep in mind with this solution?
Sql-server – What are the disadvantage/consequences of moving updated column to separate table to prevent table lock on the original table
lockingsql server
Related Question
- Sql-server – What causes “lock request time out period exceeded” when droping a column
- Sql-server – Reorder records in table
- SQL Server – Disadvantages of Disabling Lock Escalation
- Postgresql – locking question around INSERT during UPDATE query
- Mysql – Gap Locking in Read Committed isolation level in Mysql
- Sql-server – the fastest way to (session) lock table
Best Answer
From what I remember about this database from your earlier questions, I'd suggest you look at these alternatives to your approach: