So we are seeing some log running statement alerts from Hana. It is from our Matillion extract tool.
When I chase down the offending query - Its: "select * from SAPABAP1.MATDOC" (200million rows)
via query: select * from _SYS_STATISTICS.HOST_LONG_RUNNING_STATEMENTS where thread_id = 31739;
The HANA alert had the thread_id in the email that I used in the SQL.
But just looking to see how many times this statement ran in past and was logged in "_SYS_STATISTICS.HOST_LONG_RUNNING_STATEMENTS"
I can see it running 9 times in last 10-12 mins.
Each has different/unique thread_id's but same statement_hash. Snapshot_id and server_timestamp is every 1-3 mins.
When I query the plan_cache I only see the statement once: Select * from M_SQL_PLAN_CACHE where application_name = 'Matillion';
is the view _SYS_STATISTICS.HOST_LONG_RUNNING_STATEMENTS deceiving me? i.e. is HANA smart enough to automatically parallelize the large select query into say 9 different threads to return the 1 result? Or can I believe the "_SYS_STATISTICS.HOST_LONG_RUNNING_STATEMENTS" which is kind of telling me it ran 9 times in last 10 or so minutes. Which is nuts.... as each select is returning 200million rows.