MySQL视图运行时间长于查询

时间:2017-09-28 12:58:13

标签: mysql

以下查询在大约2秒内运行,但是当我将其转换为View时,它会超时。我该怎么做才能让它作为一个视图更快地运行?

此表中约有61 k行。

select f.fid-1 as fid,
balance - (select balance from fights prev where prev.fid < f.fid order by fid desc limit 1) as changes
from fights f
order by fid desc;

0 个答案:

没有答案