摘要:
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)
浙公网安备 33010602011771号