My project uses Hibernate and I wanted to increase startup time(currently 1.5 minutes), so I inspected what's happening on startup. During SessionFactory initialization, one of the queries issued is:
select * from all_sequences;
It takes close to a minute! The same query from Oracle SQL Developer takes similar amount of time. Total records returned are 102.
There are other queries which run normally(one digit ms response time)
Why is it so slow?