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: 

Native SQL VS Open SQL where condition performance

shabir_ismail
Participant

Hello,

I am learning CDS right now. However i want to know if there is any performance issue when passing parameters trough open SQL instead of native SQL. In other words what is the performance advantages of creating a view with parameters instead of passing the parameter in the Open SQL?

Thanks

Shabir

  • SAP Managed Tags:
1 ACCEPTED SOLUTION

lbreddemann
Active Contributor
0 Kudos

Well, what's the benefit of using OpenSQL vs. native SQL? OpenSQL does a lot of additional 'handy work' like statement caching, session parameter handling, table buffering etc.. There is management overhead but that is typically covered by the time/memory savings you gain from statement caching.

Using ABAP CDS is not meant to be a query runtime performance improvement. Instead, it's about how you develop and deploy your application.

In my experience it's easiest not to mix between the different development approaches too much - else you lose the benefits of having an easy to manage environment without tangible benefits otherwise.

  • SAP Managed Tags:
2 REPLIES 2

roberto_vacca2
Active Contributor
0 Kudos

Sell more HD and CPU? I don't know 🙂

Perhaps we're talking about the same thing and I'm looking for an answer same as you, but generally I think that OPEN SQL is able to talk to different Database systems that are behind SAP and is portable.

When you write an ABAP program with Open SQL statements the kernel SAP programs convert this statement into native SQL for database in use, so technically there's a loss of time, but with no perception with modern technology.

The More you talk in machine language and the less time you'll have to wait for a reply, if you talk in an empty room 🙂

Hope to help

Bye

  • SAP Managed Tags:

lbreddemann
Active Contributor
0 Kudos

Well, what's the benefit of using OpenSQL vs. native SQL? OpenSQL does a lot of additional 'handy work' like statement caching, session parameter handling, table buffering etc.. There is management overhead but that is typically covered by the time/memory savings you gain from statement caching.

Using ABAP CDS is not meant to be a query runtime performance improvement. Instead, it's about how you develop and deploy your application.

In my experience it's easiest not to mix between the different development approaches too much - else you lose the benefits of having an easy to manage environment without tangible benefits otherwise.

  • SAP Managed Tags: