Skip to Content
0
May 25, 2020 at 09:14 PM

Clear / Refresh HANA Local Tables ?

1302 Views

Hi All,

I have been writing SAP HANA SQL Procedures for quite a bit for now and being experienced in ABAP i am always thinking if we need this feature or that in HANA SQL or not .

So here is my question:

1. We use lot of local tables in SQL script for procedures. Do we need to perform a memory flush or clear / refresh for such local tables ?

For example :

************************************************

LT_TAB1 = Select * from TABLE1 WHERE <condition>;

Assume LT_TAB1 fetches 10,000 recrods

LT_TAB2 = Select <field1>, <field2> from LT_TAB1 where <condition>;

Now after this statement if i want my table LT_TAB1 to be cleared:

i) Is it possible ? If yes then whats the keyword / statement to use.

ii) Is it even required ? Since everything is in-memory do we even need this as there is a large expense of memory available.

iii) Any recommendations for best practices to handle local tables ?

BR,

Tanmay