Hey Guys,
I have implemented the following CDS (ABAP on HANA):
It's basically a join of 3 huge tables (~150 Mio. records) with some extra logic. I need this split into 3 tables because the result of the join without any condition would result in over 50 billion records. When I access this view in ABAP with where clause like:
select * from /ascorpi/raav into table @data(lt_raa) where ip = '000C29E454191EE58BDFCA7F32185B16'
This is processed in ~300ms (That's fine).
For some other where clauses (or without where clause) this cannot be processed anymore though I limited the result on 10k records:
select * from /ascorpi/raav into table lt_raa up to 10000 rows.
It seems like the join is fully processed on the HANA DB and just the number of records that is copied over to the ABAP application server is limited to 10k records. This select kills the whole system...
Is there a way to limit the number of results on CDS level? I am never interested in a "full join" of all data. When I query with a bad where clause I want to have a limit that applies. Because of the structure of my data, I don't see a way to use some aggregate funcitons like min() or max() combinded with a "group by" clause.
I really appreciate your help.
Regards
Tobias