search

Home  >  Q&A  >  body text

Why is my TP5 database query so slow?

I am currently studying the ThinkPHP5 course. I saw that Teacher Zhu’s database query speed was 0.000239s, while mine was 1.027s. When the query statements are the same, the database is configured locally. Why is this?

3维3维1960 days ago1893

reply all(4)I'll reply

  • 在路上...

    在路上...2019-09-29 20:19:39

    Send the sql statement to see

    reply
    0
  • 3维

    The simplest kind of query statement. select name, sex, salary from user where id = 1; But it takes more than 1 second. MySQL database. Is it a problem of too many databases?

    3维 · 2019-09-29 20:22:16
    3维

    Too many databases means that there are many databases under 127.0.0.1. But I only query this database.

    3维 · 2019-09-29 20:24:31
    在路上...

    You have more data, right?

    在路上... · 2019-09-30 09:32:41
  • Cancelreply