Voici un exemple pour identifier le traitement consommateur de MÉMOIRE sur une base HANA.

activer ces paramètres :

  • expensive_statement / enable = true
  • resource_tracking / enable_tracking = on
  • resource_tracking / memory_tracking = on

Hana_tuning_memory_tracking

puis lancer la requête suivante :

-- search high usage of memory
select CONNECTION_ID, TRANSACTION_ID, DB_USER, APP_USER, APPLICATION_NAME, STATEMENT_HASH, OPERATION, STATEMENT_STRING, PARAMETERS, 
START_TIME, DURATION_MICROSEC/1000/1000 as DURATION_SEC, ADD_SECONDS (START_TIME, ROUND(DURATION_MICROSEC/1000/1000, 0)) as "END_TIME", round(MEMORY_SIZE/1024/1024/1024,2) as "Memory Size Gb"
from M_EXPENSIVE_STATEMENTS 
where round(MEMORY_SIZE/1024/1024/1024,2) > 10
--where ADD_SECONDS (START_TIME, ROUND(DURATION_MICROSEC/1000/1000, 0)) between '27.07.2018 13:04:00.000000' and '27.07.2018 13:15:00.000000'
--order by "Memory Size Gb" desc
order by START_TIME desc

Hana_memory_consume_example.JPG

next step, activer une performance trace pour zoomer sur les requêtes et les décortiquer si on souhaite les optimiser.