add slow statements for dba
record template id for statistics
clean code