Quantcast
Viewing all articles
Browse latest Browse all 322

Different execution plan for the same sql statement

Hi all,

 

When I check the same sql statement in different systems,   P system and Q system.

It shows different execution plan for inner join

Sql statement

Image may be NSFW.
Clik here to view.
SQL statement.PNG

Excution plan

 

For system P    the value of MANDT is 1     table EKPO accessed first with full table scan.

Image may be NSFW.
Clik here to view.
Explain P.PNG

For system Q    the value of MANDT is 4     table EKKO accessed first with index EKKO~1(in P also has this index)

 

Image may be NSFW.
Clik here to view.
Explain Q.PNG

Data volume in Q is a little bit larger than P.

Could you please help to find out why there is such a difference?  which one is correct?

How the optimizer works when process the inner join for maxDB?

 

Thanks & Regards,

Chris


Viewing all articles
Browse latest Browse all 322

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>