有没有办法识别我看到Hibernate正在运行的查询的调用者?查询重复多次,但我无法确定谁在调用它,这会在CPU上造成很大的压力。
查询大致如下:
select [...]
from schema.Table0 table0_
left outer join schema.File file1_ on table0_.file_sid=file1_.sid
left outer join schema.Table2 tbl2_ on table0_.table2_end_sid=tbl2_.sid
left outer join schema.File file3_ on tbl2_.file_sid=file3_.sid
left outer join schema.Table2 tbl4_ on table0_.table2_start_sid=tbl4_.sid
left outer join schema.Flow flow5_ on table0_.flow_sid=flow5_.sid
left outer join schemaFlow flow6_ on flow5_.parent_flow=flow6_.sid
left outer join schema.Message message7_ on
table0_.message_sid=message7_.sid left outer join schemaFlow flow8_ on
message7_.flow_sid=flow8_.sid
left outer join schema.Lang lang9_ on message7_.lang=lang9_.code left
outer join schema.Table0 table10_ on table0_.parent=table10_.sid where
table0_.sid=1