哪位大大,转点分给我。哈哈

华夏小卒 2013-07-23 10:28:49
sybase 版,为什么发技术贴还要分数大于20啊。

哎。只有11分的人伤不起啊

小爱啊。水哥啊。。
...全文
145 9 打赏 收藏 转发到动态 举报
写回复
用AI写文章
9 条回复
切换为时间正序
请发表友善的回复…
发表回复
  • 打赏
  • 举报
回复
华夏小卒 2013-07-23
  • 打赏
  • 举报
回复
引用 7 楼 TravyLee 的回复:
[quote=引用 6 楼 js_szy 的回复:] [quote=引用 5 楼 TravyLee 的回复:] [quote=引用 4 楼 js_szy 的回复:] [quote=引用 3 楼 TravyLee 的回复:]
老大,帮我看看这个问题呗[/quote] 答案没有 要分好说[/quote] 额,那给我转个3百,5百的吧。哈哈。[/quote] OK [/quote] 感谢了。好人今天中500W
  • 打赏
  • 举报
回复
引用 6 楼 js_szy 的回复:
[quote=引用 5 楼 TravyLee 的回复:] [quote=引用 4 楼 js_szy 的回复:] [quote=引用 3 楼 TravyLee 的回复:]
老大,帮我看看这个问题呗[/quote] 答案没有 要分好说[/quote] 额,那给我转个3百,5百的吧。哈哈。[/quote] OK
华夏小卒 2013-07-23
  • 打赏
  • 举报
回复
引用 5 楼 TravyLee 的回复:
[quote=引用 4 楼 js_szy 的回复:] [quote=引用 3 楼 TravyLee 的回复:]
老大,帮我看看这个问题呗[/quote] 答案没有 要分好说[/quote] 额,那给我转个3百,5百的吧。哈哈。
  • 打赏
  • 举报
回复
引用 4 楼 js_szy 的回复:
[quote=引用 3 楼 TravyLee 的回复:]
老大,帮我看看这个问题呗[/quote] 答案没有 要分好说
华夏小卒 2013-07-23
  • 打赏
  • 举报
回复
引用 3 楼 TravyLee 的回复:
老大,帮我看看这个问题呗
  • 打赏
  • 举报
回复
华夏小卒 2013-07-23
  • 打赏
  • 举报
回复


set statistics io on 
set statistics time on   

select a.gys,'','','',b.str,'',b.kindid,b.kh,b.payje,null,a.gdsid,'',a.barcode,a.tjlb,'',b.rq,b.dh,b.djlx,''
from IV_ORD_DETAIL_H a,IV_ORD_PAY_H b
where a.djlx= b.djlx and a.syjh = b.syjh and a.dh = b.dh and a.str = b.str and a.rq =b.rq 
 and a.str >= ''   and a.str <= 'zz'
and a.tjlb >= '' and a.tjlb <= 'zz'
and a.gys >= ''   and a.gys <= 'zz'
and b.rq >= '20130601'     and b.rq <= '20130630'
 and b.is_zkq='Y'
 and a.str2 <> 'Z007'
and b.kindid like '%'
and b.kindid <> '9001' 
and a.sn=10  


索引情况:
 sp_helpindex IV_ORD_PAY_H  
--PK_IV_ORD_PAY_H     	clustered, unique located on default    str, rq, dh, syjh, djlx, sj, sn, rowno

IO:
Table: IV_ORD_DETAIL_H scan count 3, logical reads: (regular=14735 apf=0 total=14735), physical reads: (regular=0 apf=0 total=0), apf IOs used=0
Table: IV_ORD_PAY_H scan count 66292, logical reads: (regular=272884 apf=0 total=272884), physical reads: (regular=0 apf=0 total=0), apf IOs used=0
Total writes for this command: 0
  -- 用到了索引,但是为毛表扫描次数还这么多,逻辑读还这么大呢。返回结果大概4000条,不到5000
Execution Time 0.
SQL Server cpu time: 0 ms.  SQL Server elapsed time: 2203 ms.


执行计划:

QUERY PLAN FOR STATEMENT 1 (at line 1).


    STEP 1
        The type of query is EXECUTE.
        Executing a newly cached statement.


QUERY PLAN FOR STATEMENT 1 (at line 1).
    Executed in parallel by coordinating process and 3 worker processes.


    STEP 1
        The type of query is SELECT.
        Executed in parallel by coordinating process and 3 worker processes.

        FROM TABLE
            IV_ORD_DETAIL_H
            a
        Nested iteration.
        Index : idx_IV_ORD_DETAIL_H_rq
        Forward scan.
        Positioning by key.
        Keys are:
            rq  ASC
        Executed in parallel with a 3-way hash scan.
        Using I/O Size 16 Kbytes for index leaf pages.
        With LRU Buffer Replacement Strategy for index leaf pages.
        Using I/O Size 16 Kbytes for data pages.
        With LRU Buffer Replacement Strategy for data pages.

        FROM TABLE
            IV_ORD_PAY_H
            b
        Nested iteration.
        Using Clustered Index.
        Index : PK_IV_ORD_PAY_H   ---用到了索引,
        Forward scan.
        Positioning by key.
        Keys are:
            str  ASC
            rq  ASC
            dh  ASC
            syjh  ASC
            djlx  ASC
        Using I/O Size 4 Kbytes for data pages.
        With LRU Buffer Replacement Strategy for data pages.

        Parallel network buffer merge.
华夏小卒 2013-07-23
  • 打赏
  • 举报
回复
请教个问题,帖子都发不了啊。

11,849

社区成员

发帖
与我相关
我的任务
社区描述
MS-SQL Server 非技术版
社区管理员
  • 非技术版社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧