拥有18年软件开发和IT教学经验。曾任多家上市公司技术总监、架构师、项目经理、高级软件工程师等职务。 网络人气名人讲师,...
First extract the sql statement and run it directly in the database to see if the sql statement query is slow. If so, you need to optimize the sql and establish relevant indexes; If not, check the number of connections configuration of tomcat;
LZ, are you sure whether it is caused by slow SQL query or your JAVA business code?
Use EXPLAIN analysis for slow query SQL analysisBusiness code can be tracked by adding log printing date and other methods
First extract the sql statement and run it directly in the database to see if the sql statement query is slow.
If so, you need to optimize the sql and establish relevant indexes;
If not, check the number of connections configuration of tomcat;
LZ, are you sure whether it is caused by slow SQL query or your JAVA business code?
Use EXPLAIN analysis for slow query SQL analysis
Business code can be tracked by adding log printing date and other methods