Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Bad Performance of CDS View with Union

jens_borau
Explorer
0 Kudos

I have a ABAP CDS view in an ERP backend which uses a union with two selects.

Without the union one select takes about 4 seconds to load the data, the other select about 5 seconds.

With the union the loading takes about 1 Minute. I also tried using "union all", but performance did'nt change.

Does anyone has an idea how I could optimize the performance?

Why does it take so long, when the single selects just take some seconds to load?

2 REPLIES 2

ugurozdemir
Discoverer
0 Kudos

Dear Jens,

We have exactly the same situation, have you found some notes or workarounds?

Any suggestion ? Regards

matt
Active Contributor
0 Kudos

What does the SQL trace show for each query alone and for the unionised ones?