Home > database >  Why tomcat after the restart, connect to the database read more physical, speed is much slower
Why tomcat after the restart, connect to the database read more physical, speed is much slower

Time:09-19

Tomcat every program up to 2 minutes after the restart, the second run of normal, 2 seconds will be able to come out,
Comparison of the two events: the 10046

For the first time, physical reads a total of 4718
OVERALL the TOTALS FOR ALL NON - RECURSIVE STATEMENTS

Call the count CPU elapsed disk query current rows
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
The Parse 123 0.03 0.03 0 0 0 0
The Execute 126 0.23 0.22 0 0 0 0
The Fetch 422 0.76 108.06 4718, 92449, 85233
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Total 671 1.03 108.32 4718, 92449, 85233

Second, physical reads only 4
OVERALL the TOTALS FOR ALL NON - RECURSIVE STATEMENTS

Call the count CPU elapsed disk query current rows
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
The Parse 53 0.03 0.03 0 0 0 0
The Execute 54 0.18 0.18 1 2 0 0
The Fetch 342 0.43 0.61 3 93083 0 79200
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Total 449 0.65 0.82 4 93085 0 79200

There are two problems not understand:
1, even if the physical reads 4718 for the first time, will not need 2 minutes to read out
2, why can't reboot tomcat will cache data,

CodePudding user response:

Ask developers, whether a cache, such as redis such services,

CodePudding user response:

Thank you version, application is very simple, just a tomcat + oracle,
Even if the data cached in tomcat, tomcat after the restart, behind the first query and query of physical reads should also is same, tomcat restart should not be empty oracle data buffer, don't feel strange

reference 1st floor selling fruit net reply:
ask developers, whether a cache, such as redis such services,
  • Related