• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
画地自囚工作记录
博客园    首页    新随笔    联系   管理    订阅  订阅
2010年12月30日
oracle 的rownum问题
摘要: rownum和top是不一样的,rownum用来分页是先全选出来,然后取多少条,效率是比较低的。举例:在工作中碰见这样的问题select wfcount,cid from (select count(customer_id) wfcount, customer_id cidfrom aaa_reviewwhere wonderful_flag = 1 group by customer_idorder by wfcount desc) where rownum 100运行时间超过27秒而把外层rownum取消:select count(customer_id) wfcount, custom 阅读全文
posted @ 2010-12-30 17:23 画地自囚 阅读(343) 评论(0) 推荐(0)
博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3