Home > database >  SQL execution speed is slow, help ridicule the problem statement
SQL execution speed is slow, help ridicule the problem statement

Time:09-16

 explain 
The SELECT s.i d AS stuId, u.f irst_name AS firstName, u.m obile AS mobile, s.u ser_id AS studentUserId
The FROM students s
Inner join the users u on s.u ser_id=u.i d
Where s.i d=1990000 XXXX
The or u.m obile='1990000 XXXX'
Limit 1;



Perform special slow:
Table structure: students' id primary key table, user_id only indexes; The users table id primary key, mobile as the only index; Why students table useless to the id primary
  • Related