我总是可以在C#中创建一个新命令,该命令与命令连接,使其成为大量不同查询的联合.
select /*+ PUSH_SUBQ */ * from mytable rwhere r.s in (1,7)and r.d in (1,75)and r.storeID = 1162and r.period = 20110528and r.pID in (select /*+ no_unnest qb_name(subq1) */ productID from othertable where itmID=9999)
我已经尝试过类似的东西,但这需要永远.
select /*+ PUSH_SUBQ */ * from mytable r where r.s in (1,7) and r.d in (1,75) and r.storeID in (1162,1223,1231,51231,231,...) and r.period = 20110528 and r.pID in (select /*+ no_unnest qb_name(subq1) */ productID from othertable where itmID=9999)
Mytable有这样的索引:
pID是NON-UNIQUE,PARTITIONED,NO JOIN_INDEX
所有其他列都是UNIQUE,NO JOIN_INDEX
使用EXPLAIN PLAN:
@L_419_0@
以上是内存溢出为你收集整理的优化Oracle SQL查询全部内容,希望文章能够帮你解决优化Oracle SQL查询所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)