New answers tagged

0

DROP SCHEMA would attempt obtaining exclusive use of the schema first, so it would only actually manage to drop the schema when PostgreSQL is done retrieving data from ongoing queries. Further queries would likely be locked until the end of the transaction in your question. Queries accessing tables in the prod schema may fail after this transaction is ...


4

Many of the issues you see are being caused by an inefficient execution plan: Not that the supplied plan and query matches the question, but even so, I'm working with what was provided. Anyway, you should implement the Name column data type changes (from nvarchar(max)) that I mentioned in your previous question. More importantly, you need to add the ...


3

Is there a way for SQL Server to force everyone to use snapshot isolation or remove the explicit hints they added? There is no way to do that ! If you enable RCSI using alter database then DML statements against objects stored in that database start generating row versions even when no transaction uses snapshot isolation. Once this option is enabled, ...


6

As Paul White answered absolutely correct there is a possibility for temporarily "skipped" identity rows. Here is just a small piece of code to reproduce this case for your own. Create a database and a testtable: create database IdentityTest go use IdentityTest go create table dbo.IdentityTest (ID int identity, c1 char(10)) create clustered index ...


17

When inserting a row, is there a window of opportunity between the generation of a new Identity value and the locking of the corresponding row key in the clustered index, where an external observer could see a newer Identity value inserted by a concurrent transaction? Yes. The allocation of identity values is independent of the containing user ...



Top 50 recent answers are included