Skip to Content

Simple Sidecar select query hitting HANA 40 times !!

Hi Team,

We recently upgraded to Sp11, there was a performance issue on MSEG Table after upgrade.

The below mentioned select query hits HANA 40 times, even thought its not in a Cursor or loop.

Its a mystery even sap is having hard time to solve.

Can anyone from here help us to fix this issue, Its creating huge performance issue for sidecar programs.

The query taking 8000 seconds to execute via sidecar, while when pointed to Oracle completes in 3 minutes.

Please let me know if you need more details.

SELECT

mseg~matnr

mseg~werks

mseg~lgort

mkpf~budat

mkpf~cputm

mkpf~mblnr

mkpf~mjahr

mkpf~cpudt

mseg~zeile

mseg~bwart

mseg~shkzg

mseg~waers

FROM mkpf

INNER JOIN mseg ON mkpf~mblnr = mseg~mblnr AND

mkpf~mjahr = mseg~mjahr

INTO TABLE t_stockplc

CONNECTION (v_conn)

FOR ALL ENTRIES IN t_material

WHERE mseg~matnr = t_material-matnr AND

mseg~werks = t_material-werks AND

mseg~lgort = t_material-lgort AND

mseg~shkzg = 'S' AND "credit

mseg~mjahr IN so_mjahr AND

mkpf~vgart IN ('WA','WE','WL','WS', 'WR', 'WQ' ).


Thanks,

Gokul

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Posted on Aug 22, 2016 at 12:03 PM


    Where are you using this statement? Can you check the performance trace, why it is hitting 40 times, are these join happening on HANA Tables/Replicated HANA Tables?

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Aug 23, 2016 at 10:30 AM

    HI,

    I am not sure if you have checked this SAP Note and it is relevant for you:1662726 - Optimization of select with FOR ALL ENTRIES on SAP HANA database.

    Check and let us know.

    br,

    Maju

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.