Skip to Content
0

SAP HANA OOM error

Dec 16, 2017 at 08:38 PM

77

avatar image

Hi,

I have a table with 28mn records which on union (on a graphical calc view on HANA 2 SP2) with a view returning 5000 records goes into memory dumps. I've tried a SQL union all and it still doesn't work. There is no logic in the union view.

A select top 1000 on the table returns data in <1s and the the view with 5k records brings back data in 2s. When I union these 2 with no logic whatsover - even after switching the aggregation node to projection, it still runs out of memory. What am I missing here?

transaction rolled back by an internal error: Allocation failed ; $size$=2048; $name$=SearchAlloc; $type$=pool; $inuse_count$=11184979; $allocated_size$=20190632592; $alignment$=16
10 |10000 characters needed characters left characters exceeded

A good first step to understand the difference in the execution of queries is to review the EXPLAIN PLAN and the PlanViz (trace) for both statements.

My guess here is that the SELECT TOP 1000 only is applied to the final result set and that the UNION ALL of the two sub-queries/calc. views needs to get fully materialised before that. If that is the case, you might consider limiting the data sizes before the UNION operation.

0

Hi Lars,

Thank you for the reply. I tried persisting the view component and doing a union with the larger table but a union between 2 tables did not work too. Then I tried to do a planwiz on the plain select * on the larger table and it seems that the table which takes 1gb in HANA as column store expands to 40gb on execution with no logic.

What can I do here?

Please see attached screenshot of runtime info on the table and SQL plan of the SELECT * on the table.

issue.jpg

Regards,

Shyam

issue.jpg (185.8 kB)
0
* Please Login or Register to Answer, Follow or Comment.

0 Answers