Skip to Content

Is it possible to retrieve HANA trace files externally?

By "externally", I mean from external sites such as Python of Java code or via SQL.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    Jan 09, 2018 at 05:12 AM

    To implement client-side performance tracing, you can either use the functionality provided by any of the persistence framework, e.g. hibernate or you can instrument your code yourself.

    The concept here is not too complex: take the time before the DB call, perform the call, take the DB again and compute the difference between both times. This information (together with the code-location, bind parameters, SQL statement text, etc.) can be written into a log. For JAVA there are plenty of logger-libraries available (J4Log, perf4log, ...) and I assume that's also the case for python.

    Concerning the difference between SQL Plan Cache time and SERVER PROCESSING TIME my guess(!) would be that these cover slightly different parts of the query processing (e.g. incl. data fetching vs. not including data fetching). Also be aware that SQL Plan Cache aggregates runtime information for identical statement executions.

    Looking for the "real" processing time of a query on the server is a stochastic analysis over multiple if not many runs. As this is a dynamic shared system, the performance of ad-hoc queries against changing data cannot be deterministic - but predictable within certain boundaries. That's what you try to establish during system sizing: the common response times of your important application interactions during a certain, hopefully realistic, workload.

    While I guess that there are plenty more questions on your side, let me stop this discussion at this point. The concept of the "answers" site of the SAP Community is meant to deliver a question & answers platform and makes it hard and unrewarding to have longer discussions. This design had been chosen on purpose by the SAP Community team; needless to say, I liked the old discussion forums better.

    Anyhow, at this point I can only recommend to come up with distinct specific questions and post them separately. That, in theory, should increase the chance of getting at least some of them answered, compared to one big problem query, to which nobody has the full answer and therefore does not reply.



    Add comment
    10|10000 characters needed characters exceeded

  • Jan 05, 2018 at 11:48 AM

    Check out following SAP Note:

    1732157 - Collecting diagnosis information for SAP HANA

    Add comment
    10|10000 characters needed characters exceeded