慢查询分析改进
慢查询分析改进
疯狂的兔子 发表于3年前
慢查询分析改进
  • 发表于 3年前
  • 阅读 19
  • 收藏 0
  • 点赞 0
  • 评论 0

标题:腾讯云 新注册用户域名抢购1元起>>>   

摘要: 慢查询

select * from (select touch_img,id, title, stitle,ttsid,promo_start_time,promo_end_time,sales_time, coalesce(stock,0) as presale_stock,
 coalesce(stock, 0) as stock from tuan_channel.tejia_ttsid_info where exp_channel @> \'"app"=>"1"\' and current_timestamp >= promo_start_time
 and current_timestamp < promo_end_time and pagetype=\'presale\' '.$addselect.'
 order by id desc ) as a order by id asc;
 
 
 select * from (select touch_img,id, title, stitle,ttsid,promo_start_time,promo_end_time,sales_time, coalesce(stock,0) as presale_stock,
 coalesce(stock, 0) as stock from tuan_channel.tejia_ttsid_info where exp_channel @> \'"app"=>"1"\' and current_timestamp >= promo_start_time
 and current_timestamp < promo_end_time and pagetype=\'presale\' '.$addselect.') as a order by id asc

共有 人打赏支持
粉丝 30
博文 155
码字总数 100504
×
疯狂的兔子
如果觉得我的文章对您有用,请随意打赏。您的支持将鼓励我继续创作!
* 金额(元)
¥1 ¥5 ¥10 ¥20 其他金额
打赏人
留言
* 支付类型
微信扫码支付
打赏金额:
已支付成功
打赏金额: