In Memory OLTP Table's indexes not releasing memory for deleted records

James Southward 0 Reputation points
2024-07-31T20:23:03.66+00:00

We have a small (logical size about 6GB) OLTP database. In it we have several work tables that during processing get filled with about 100,000+ rows. Once the calculation is complete the records are no longer needed and the data is purged. However the storage related to the tables' indexes does not get released. So, as displayed on the Memory Usage by Memory Optimized Objects report as the Blue segment, Index Unused Memory just keeps growing until the system stops when it hits the limit for in memory databases. Touching (rebuild the HASH with a different bucket count or adding/deleting ) any index on the table instantly releases all the memory for that table's indexes back to the system but since that needs a full table lock it is not a practical solution. It doesn't seem to be an issue for the tables themselves only their indexes. There's no rebuild option for the indexes which you would do for a disk based index. Any ideas?

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
13,393 questions
0 comments No comments
{count} votes