on 2024 Nov 06 9:26 AM
On Hana2 sp7 we have some large calculation wiews on which it is impossible to execute the count of record like: select count(*) from ‘view name’ because the select ends in memory error with the message (over 300gb of memory consumed which is the current limit of available memory in hana):
Cannot allocate enough memory: search table error: cannot allocate enough memory: [9] Memory allocation failed;exception 1000002: Allocation failed ; $failure_type$=STATEMENT_MEMORY_LIMIT_FROM_GLOBAL_CONFIG
The same error obviously also occurs with the data preview.
The number of records in one of these views is 270 million so not excessive and the model is built on a base table (not partitioned) with these characteristics:
The strange think is that if the select is more complex, for example inserting a group by year like: select count(*),year from ‘view name’ group by year, it works correctly and consumes few memory (30 gb). The same if we add a where to the select(*) on the id field (which is the 'key' field of the view and is never 'null') like: select count(*) from ‘view_name’ where id is not null.
The view's data model has already been optimized and there is nothing more that can be done about it, we also tried to apply different HINTs to the calc. view but without success.
Do you have any ideas on possible causes and any suggestions?
Thanks
Regards
Luca
Request clarification before answering.
Hello,
no remote objects are involved (only Hana tables and views), the count(ID) on the entire view lasts less than a second and consumes less than 1GB of memory, while the count(*) as mentioned ends in memory error. As soon as possible I'll try to share the explain plan for the two statements even if I fear that the one on select(*) will be incomplete due to the memory problem.
Thanks
Luca
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
76 | |
30 | |
10 | |
8 | |
8 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.