0

I am executing select queries in my java app using org.hibernate.SQLQuery. The code is as below.

Query query=session.createSQLQuery("query");
query.setResultTransformer(AliasToEntityMapResultTransformer.INSTANCE);
List<Map<String,Object>> aliasToValueMapList=query.list();

The problem is, the oracle AWR report shows that there is another query that fires up with every select query I execute.

SELECT NULL AS table_cat, o.owner AS table_schem, o.object_name AS table_name, o.object_type AS 
table_type, NULL AS remarks FROM all_objects o WHERE o.owner LIKE :1 ESCAPE '/' AND o.object_name 
LIKE :2 ESCAPE '/' AND o.object_type IN ('xxx', 'TABLE') ORDER BY table_type, table_schem, table_name

Can anyone explain why this happens and how can I avoid this(I want to avoid this as this is the most CPU consuming query listed in the report)?

1 Answers1

0

I could find this which exactly deals with my problem. I am going test the suggestions given in the link. I will update the result here once I figure out the right solution.

How to avoid this very heavy query that slows down the application?

Community
  • 1
  • 1