search

Home  >  Q&A  >  body text

java - mybatis 查询慢 然后结果就出不来了,一般超过3s就不行了

高洛峰高洛峰2803 days ago843

reply all(2)I'll reply

  • 怪我咯

    怪我咯2017-04-18 10:15:55

    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;

    reply
    0
  • 大家讲道理

    大家讲道理2017-04-18 10:15:55

    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

    reply
    0
  • Cancelreply