@MaxVernon Cool. Just voted to close the other one. I also axed my answer there so I don't get any double rep points at all. Stunk losing those points ;-)
I ran out of disk space on my mongo database. I saw it and dropped some collections (120 out of 1700 i had). And ran db.compact(...) thinking it would release free space. well, that was a stupid idea.
Anyway, the database is around 800GB, and I dont have any space (~5GB) in the current disk. I s...
@cpx Any DBMS can be used to implement a non-relational data structure. The defining characteristics of a RDBMS are to do with its support for relational operations such as joins.
I can now repro this 100% of the time on my machine.
First create a procedure
CREATE PROC P
AS
SET NOCOUNT ON;
DECLARE @T TABLE (X INT)
GO
Then restart the SQL Service and in one connection execute
WHILE NOT EXISTS(SELECT *
FROM sys.dm_os_waiting_tasks
...
Yes. Microsoft SQL Server 2012 (SP1) - 11.0.3000.0 (X64) Oct 19 2012 13:38:57 Copyright (c) Microsoft Corporation Developer Edition (64-bit) on Windows NT 6.1 <X64> (Build 7601: Service Pack 1)
@MartinSmith You can create a rowcount spool there using this.
USE tempdb;
DECLARE @N INT = 1000000
SELECT TOP (@N) IDENTITY(INT, 1, 1) Number
INTO #T
FROM sys.objects s1
CROSS JOIN sys.objects s2
CROSS JOIN sys.objects s3
CROSS JOIN sys.objects s4
OPTION (OPTIMIZE FOR (@N = 2000000000));
DROP TABLE #T
@MikaelEriksson Nice. Also that theory wouldn't have explained the bit in the question about why doing three cross joins then four resolves the issue (I hadn't tested that out but do see the same thing)