wen1018429964 2021-08-24 14:45 采纳率: 0%
浏览 34

Springboot项目打包放到阿里云服务器中,使用nohup.out运行jar包,访问接口速度很慢

SQL语句是:select * from t_user
LEFT JOIN t_balance
on t_user.user_openId=t_balance.FK_user_openid
LEFT JOIN t_withdrawal_record
ON t_user.user_openId=t_withdrawal_record.withdrawal_fk_user_openid
LEFT JOIN t_order
ON t_user.user_openId=t_order.FK_user_openId
LEFT JOIN t_screenshot
ON t_order.order_id=t_screenshot.fk_order_id
其余的就是dao层和service调这个地方渲染数据,很正常的写法,数据库运行这个代码的速度大概都是0.114秒,但是在阿里云运行这个代码的接口,运行速度居然达到了6秒左右,这里面的数据不超过1000条,有谁能帮帮我啊。

  • 写回答

3条回答 默认 最新

  • 曦陽惜夏 2021-08-24 16:21
    关注

    把*换成具体的字段,只返回需要的字段,同时不要查询这么多条数据,建议分页查询

    评论

报告相同问题?

问题事件

  • 创建了问题 8月24日