- ST04 transaction allows generation of plan viz and explain the execution plans for the SQL statements. This is useful especially for BW on HANA scenarios where the expensive statements on the HANA side can be analysed without access to the HANA studio.
- ST04 also allows analysis of existing threads on the HANA side and generate plan viz/explain plan for the threads as well.
- ST04 has options to generate plan viz/explain plan for the SQL statements that the users wants to analyse. This is useful to analyse the TREX calls from BW to HANA db (call trexviadbsl (‘olapSearch’ , to_blob(hextobin(‘*’)), ?) )
To analyse the statement executed in the threads on HANA follow these steps:
- Start ST04 and navigate to threads under Performance as shown here and select the SQL you want to analyse and click EXPLAIN:
- After clicking on EXPLAIN button, the EXPLAIN is displayed :
- From this screen click on Execution Trace button to save the plan viz file (.plv) to your PC:
- Once saved locally, the plan viz file can be opened in HANA studio for further analysis:
- Studio will display the Overview and executed plan:
Similarly, EXPLAIN section in ST04 can be used to generate plan viz/explain plan for the SQL statements.Explain Plan provides details of engines being used for certain operations, sub tree costs, estimated cardinalities, etc.
Here the steps are shown for a simple ‘SELECT * FROM DUMMY’ however complex queries or TREX calls can also be posted in EXPLAIN and analysed.
Click on Explain button in the menu after pasting the SQL and hit Execution Trace once the plan is displayed to generate the viz file:
These steps are applicable to BW on HANA for 7.4, 7.5 and BW/4HANA releases.