0
I have the following problem in the company, where I have several panels that get information from a VIEW that does not have NOLOCK in the query.
In order not to have to change each panel, it would be possible for me to create a view,e this view to recreate using STATEMENT WITH(NOLOCK)?
Example:
View Standard:
estoque_resumo_diario
Create another view by pulling this one:
CREATE VIEW estoque_resumo_diario_nolock AS SELECT * FROM estoque_resumo_diario
And remake the original as being:
ALTER VIEW estoque_resumo_diario as SELECT * FROM estoque_resumo_diario_nolock WITH(NOLOCK)
Or I better redo the entire view using NOLOCK in the interactions between tables, I don’t have the problem of bringing "Trash" due to bring data that was not committed.
Why you use NOLOCK?
– José Diz
There are many simultaneous transactions in the tables that are included in this view in question, deadlocks are constant, and as I cannot change the structure of the bank, I am tied hands, most tables use clustered index.
– Marcos Barbosa