Application Development and Automation 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: 
Read only

sql performance

former_member435389
Participant
0 Kudos
489
  • SAP Managed Tags

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 ?

1 ACCEPTED SOLUTION
Read only

Jrg_Brandeis
Contributor
0 Kudos
360
  • SAP Managed Tags

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

2 REPLIES 2
Read only

Jrg_Brandeis
Contributor
0 Kudos
361
  • SAP Managed Tags

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

Read only

0 Kudos
360
  • SAP Managed Tags

So it means these two kinds of SQL cost the same running time , am i right ?