The data table has only a few records, the query should be very fast, why the request time so long? (The local server is requested)
Look at the data query time, it's time spent here
The database only has this 10来 row of data, and ParentID also indexed, why is the query so slow?
0.001s for direct query execution on phpMyAdmin
Reply content:
The data table has only a few records, the query should be very fast, why the request time so long? (The local server is requested)
Look at the data query time, it's time spent here
The database only has this 10来 row of data, and ParentID also indexed, why is the query so slow?
0.001s for direct query execution on phpMyAdmin
Ajax URL query string, and there is nothing in data, I guess this delay is because the front end and the backend are waiting for this empty data packet, so you go directly to the Get method to try it, or you can spell a formdata in data.
Upstairs is right. I suggest that you change the JavaScript in a for loop like this:
for(var i=0;i
<>
可以尝试下。
问题可能不在代码,你用127.0.0.1代替localhost试试
多测几次,看是不是偶然的?
可能是后端代码的问题,你把其他无关代码注释掉试一下?
是不是数据库出问题了,连接访问速度太慢?
1.POST请求修改为GET请求
2.select 修改为 select fileds 具体的字段,避免使用 通配符
3.desc 或者 explain下 你的SQL,看下是否用到了索引