‎2016 Apr 20 11:32 PM
Hi,
We have plans to write ABAP CDS views to standardize business logic/data extraction so that development team can make simple queries on CDS views. So we are writing generic CDS views means without many "WHERE" conditions.
I'm trying to understand how it works and impact on the performance when these CDS views are consumed for any particular Plant or Company code.
Let us say I have below CDS view called "ZCDSV_TEST"
select * from vbak inner join vbap on vbak.vbeln = vbap.vbeln { <fields> }.
I would like to understand when it is consumed in 2 ways in terms of performance (SQL)
Select * from ZCDSV_TEST <<<< 1M records
Select * from ZCDSV_TEST WHERE Vkorg = '0001' <<<< 25K records.( Does this extract 1M records first and then apply WHERE condition to get to 25K.
Would like to understand these type of technical details. Appreciate your inputs.
Cheers.
Laks
‎2016 Apr 21 4:31 AM
Interesting though.
The CDS view works like normal view. It will join first and put filter afterwords, but the SQL optimiser will behave differently when we see PlanViz for different SQL. Better please follow the blog to see few example.
you can use my code I use for performance analysis.
and see the table data.
DELETE FROM explain_plan_table WHERE statement_name = 'Chandan';
EXPLAIN PLAN SET STATEMENT_NAME = 'Chandan' FOR
select top 100 * from MY_SCHEMA.ZTAB;
select * from explain_plan_table WHERE statement_name = 'Chandan';
‎2016 Apr 21 4:31 AM
Interesting though.
The CDS view works like normal view. It will join first and put filter afterwords, but the SQL optimiser will behave differently when we see PlanViz for different SQL. Better please follow the blog to see few example.
you can use my code I use for performance analysis.
and see the table data.
DELETE FROM explain_plan_table WHERE statement_name = 'Chandan';
EXPLAIN PLAN SET STATEMENT_NAME = 'Chandan' FOR
select top 100 * from MY_SCHEMA.ZTAB;
select * from explain_plan_table WHERE statement_name = 'Chandan';
‎2016 Apr 25 6:29 AM
This blog has got great details that I'm looking for.. Thanks Chandan.
‎2016 Apr 26 12:53 AM