Skip to Content
0
Former Member
Aug 09, 2016 at 10:35 AM

Output Calc View to Table Schedule - Using up memory - SQL Plan cache

35 Views

Hi All,

i am having some challenges with SQL Plan cache and HANA memory. Here is what the scenario is.

1. Have created a calc view which is fairly complex, therefore have created a stored procedure which is schedule every 5 minutes to output the calc view results to a column store table.

The issue.

1. Every time the schedule runs the SQL query to "replace" or "upsert" (have used both with same result) the system memory usage increases by 5 GB.

2. A Delta merge then occurs after the statement.

3. After a few hours the system runs out of memory and the schedule fails with Out of memory error.

4. I run the command ALTER SYSTEM CLEAR SQL PLAN CACHE which clears the SQL plan cache and the memory free's up and schedule works again.

Question

1. Is there something i can include into the statement replace not to using SQL plan cache

2. Any idea's, happy to try any suggestion and feed back results.

Cheers

dv