on 04-02-2018 1:44 PM
Hi experts!
Currently I develop a lot of AMDP procedures. So I faced a problem of effective session profiling and sql query real execution time analyzing. The only access I have is a developers access on ABAP level (using Hana DB Studio).
So now I do it this way:
Define a type for a table:
TYPES: begin of t_sql_log,
SQL_DESCtype ZVAT_DECL_COMMENT,
EXEC_TIME_MStype ZVAT_DECL_PK,
endof t_sql_log.
TYPES: tt_sql_log type STANDARD TABLE OF t_sql_log.
Then I create a value (it_sql_log) parameter of that type for my AMDP method.
And my AMDP method has smth like this:
declare dTSStart, dTS1, dTS2 timestamp;
declare nSec decimal;
select now() into dTS1 from dummy;
here is my SQL query execution
select now() into dTS2 from dummy;
select nano100_between( dTS1, dTS2 )/10000 into nSec from dummy;
it_sql_log = select * from :it_sql_log union all select 'my sql description', nSec from dummy;
So finally in debug mode I receive a “manually” recorded sql time execution in ms.
But as a former Oracle developer I’d like to get an opportunity to set a debug for a session and to analyze it later with a kind of profiler-software (sql execution time, real execution plan and so on) – generally without code modification.
Is it possible?
why don't use sql trace, attached is link.
https://wiki.scn.sap.com/wiki/display/SAPHANA/SAP+HANA+Traces
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.