SELECT
umb.m AS id,
umb.s AS STATUS,
pm.c AS ct,
pm.v AS vt,
pm.u AS ut,
pm.a AS attribute
FROM
u umb,
p pm
WHERE
pm.id = umb.m
AND umb.u = "****"
AND ( pm.p = 0 OR pm.p = 1 )
ORDER BY
pm.c DESC
two tables are used here: U and p
explain, the result is:
p table is a full table query, extra is Using where; Using filesort
Please tell me how to optimize the query speed, if it is indexing, how to add it, thank you-sharp-sharp-sharp problem description