There is insufficient system memory in resource pool 'default' to run this query. on sql

后端 未结 3 757
抹茶落季
抹茶落季 2021-01-07 16:38

I have a running service that gets 50-100 queries per minute. And these are not high cost queries. This service has been running for around 3-4 months without any errors.

3条回答
  •  一整个雨季
    2021-01-07 17:32

    In our case it was because of Memory Optimized table types, with huge amount of data. There was multiple calls to different stored procedures at the same time and each using the same table type and loading huge amount of records in it (>100,000). For our application, there was way to reduce the number of records inserted in to memory optimized table type i.e. instead if storing all selected items in a memory optimized table type we conditionally stored only the non-selected records.

    CREATE TYPE [TestType] AS TABLE (
        [TestOrder]    VARCHAR (1500)    NOT NULL,
        [TestDepartment] UNIQUEIDENTIFIER NULL,
        [TestCourse] UNIQUEIDENTIFIER NULL,
        [TestStudent] UNIQUEIDENTIFIER NULL,
        INDEX IX_Test NONCLUSTERED (TestOrder))
        WITH (MEMORY_OPTIMIZED = ON);
    

提交回复
热议问题