We've identified a SQL Script procedure that is consuming a huge amount of Used Memory( 200gb +) on our development environment.
Our spec for our development environment is a one node 500gb and we're running HANA 1.00.74.
So, we've two issues.
1. The SQL Script procedure consumes huge amounts of memory and eventually failing with mem allocation errors. The used memory spikes to 95% (through the overview screen) or can be seen executing the following query.
Alerts that the box is running out of memory are generated and in M_CS_UNLOADS view, column tables & columns are unloaded from memory.
2. After the procedure fails, used memory volume is still quite high on the box and I'm finding it hard to pin-point where the (intermediary results from query?) are holding all this memory.
In the past I've seen model generated translation tables can be tracked using SYS.M_DEV_JOIN_TRANSLATION_TABLES_. However this doesn't seem to be apply for SQL Script, as the volume remains low here. The only visible entry I've seen is the "Other" category in the heap memory view, as below..
The SQL Script procedures themselves that are triggered are predominately CE functions, with some SQL in the procedures higher on the call stack. Originally we did make a conscious effort not to mix both in the same procedure, but the reason I'm back working in development on this project is a bug in 74 around a CE_CALC function that I need to change to a Select statement [Story for a different day!].
In any case, I'm more interested for this discussion in finding how sql script procedure generate intermediary/temp tables and how these can be monitored, both from a system admin point of view, but also from a development perspective wrt efficient SQL execution.
Any help/comments welcome!