2022 Mar 22 8:37 AM
Hi
1.
DO
Begin
temp1 = select * from EKKO where BUKRS = '1000'.
select temp1.*, EKPO.* from temp1 inner join EKPO.
END;
2.
DO
Begin
select EKKO.*, EKPO.* from EKKO inner join EKPO where EKKO.BUKRS = '1000'.
END;
Which cost less time ?
I mean, two ways:
1. Firstly , reduce the result of table. and make join of tables.
2. Put the filter directly into the where clause of join.
Which way is better ?
2022 Mar 22 7:38 PM
Hi Wei,
I am pretty sure, that both queries have the exact same execution plan. So the choice is up to you.
You can check this with the PlanViz tool.
Reards,
Jörg
2022 Mar 22 7:38 PM
Hi Wei,
I am pretty sure, that both queries have the exact same execution plan. So the choice is up to you.
You can check this with the PlanViz tool.
Reards,
Jörg
2022 Mar 23 4:19 AM
So it means these two kinds of SQL cost the same running time , am i right ?