I have a query (an UPDATE query) which when run, locks one of the tables its trying to access. I know that table locks can be caused by non-indexed foreign keys i.e when a non-indexed foreign key is updated, the parent table will be subjected to a table lock until the transaction is complete. However, my question is: Are there any other circumstances which cause these table locks? And how do you prevent them?
Any help will be greatly appreciated!