各位看看能不能帮我优化一下,谢谢

浏览:434 发布日期:2016/08/25 分类:求助交流 关键字: sql,数据查询优化
$open = $this->TransLog->where($where)->order('id asc')->find();
$close = $this->TransLog->where($where)->order('id desc')->find();
$high = $this->TransLog->where($where)->max('price');
$low = $this->TransLog->where($where)->min('price');
$volume = $this->TransLog->where($where)->sum('num');
每次都要执行where条件,可不看可以执行一次获取5个参数
最佳答案
评论( 相关
后面还有条评论,点击查看>>