I am running a stored procedure in query builder and closing query builder. However, the memory allocated doesn't get released. The stored procedure uses temp tables and drops them immediately after its use. These tables get created in a loop, get truncated, and dropped immediately. Any table that is created gets dropped immediately. The purpose of the stored procedure is only to make updates after a calculation using these temp tables.
After each execution, about 1.4 GB memory increases and never get released.
QUESTIONS
- What factors should be considered when creating temp tables in a stored procedure ?
- How can I claim memory after the stored procedure gets executed ?