祝愿大家身体健康!

 站点注册  找回密码
 站点注册

QQ登录

只需一步,快速开始

查看: 3342|回复: 2

性能问题

[复制链接]

性能问题

[复制链接]
银铠圣袍

主题

0

回帖

12

积分

新手上路

积分
12
贡献
在线时间
小时
2007-6-15 11:08:14 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?站点注册

×

 12.5.0的查询计划

QUERY PLAN FOR STATEMENT 1 (at line 1).


    STEP 1
        The type of query is INSERT.
        The update mode is direct.
        Worktable2 created for REFORMATTING.


        FROM TABLE
            FeeType
            ft
        Nested iteration.
        Using Clustered Index.
        Index : PK_FEETYPE
        Forward scan.
        Positioning at start of table.
        Using I/O Size 2 Kbytes for data pages.
        With LRU Buffer Replacement Strategy for data pages.
        TO TABLE
            Worktable2.


    STEP 2
        The type of query is INSERT.
        The update mode is direct.
        Worktable3 created for REFORMATTING.


        FROM TABLE
            VendorFee
            vf
        Nested iteration.
        Using Clustered Index.
        Index : PK_VENDORFEE
        Forward scan.
        Positioning at start of table.
        Using I/O Size 2 Kbytes for data pages.
        With LRU Buffer Replacement Strategy for data pages.
        TO TABLE
            Worktable3.


    STEP 3
        The type of query is INSERT.
        The update mode is direct.
        Worktable1 created for ORDER BY.


        FROM TABLE
            OtherFee
            o
        Nested iteration.
        Using Clustered Index.
        Index : PK_OTHERFEE
        Forward scan.
        Positioning at start of table.
        Using I/O Size 2 Kbytes for data pages.
        With LRU Buffer Replacement Strategy for data pages.


        FROM TABLE
            Vendor
            v
        Nested iteration.
        Using Clustered Index.
        Index : PK_VENDOR
        Forward scan.
        Positioning by key.
        Keys are:
            VendorID  ASC
        Using I/O Size 2 Kbytes for data pages.
        With LRU Buffer Replacement Strategy for data pages.


        FROM TABLE
            Stores
            s
        Nested iteration.
        Using Clustered Index.
        Index : PK_STORES
        Forward scan.
        Positioning by key.
        Keys are:
            StoreID  ASC
        Using I/O Size 2 Kbytes for data pages.
        With LRU Buffer Replacement Strategy for data pages.


        FROM TABLE
            Worktable2.
        Nested iteration.
        Using Clustered Index.
        Forward scan.
        Positioning by key.
        Using I/O Size 2 Kbytes for data pages.
        With LRU Buffer Replacement Strategy for data pages.


        FROM TABLE
            Worktable3.
        Nested iteration.
        Using Clustered Index.
        Forward scan.
        Positioning by key.
        Using I/O Size 2 Kbytes for data pages.
        With LRU Buffer Replacement Strategy for data pages.


        FROM TABLE
            UserBuyer
            u
        Nested iteration.
        Using Clustered Index.
        Index : PK_USERBUYER
        Forward scan.
        Positioning by key.
        Keys are:
            Buyer  ASC
        Using I/O Size 2 Kbytes for data pages.
        With LRU Buffer Replacement Strategy for data pages.


        FROM TABLE
            Buyer
            b
        Nested iteration.
        Using Clustered Index.
        Index : PK_BUYER
        Forward scan.
        Positioning by key.
        Keys are:
            Buyer  ASC


        Run subquery 1 (at nesting level 1).
        Using I/O Size 2 Kbytes for data pages.
        With LRU Buffer Replacement Strategy for data pages.
        TO TABLE
            Worktable1.


    STEP 4
        The type of query is SELECT.
        This step involves sorting.


        FROM TABLE
            Worktable1.
        Using GETSORTED
        Table Scan.
        Forward scan.
        Positioning at start of table.
        Using I/O Size 2 Kbytes for data pages.
        With MRU Buffer Replacement Strategy for data pages.


NESTING LEVEL 1 SUBQUERIES FOR STATEMENT 1.


  QUERY PLAN FOR SUBQUERY 1 (at nesting level 1 and at line 10).


    Correlated Subquery.
    Subquery under an EXPRESSION predicate.


    STEP 1
        The type of query is SELECT.
        Evaluate Ungrouped COUNT AGGREGATE.


        FROM TABLE
            ST_Vendor
            a
        Nested iteration.
        Using Clustered Index.
        Index : PK_ST_VENDOR
        Forward scan.
        Positioning by key.
        Keys are:
            VendorID  ASC
        Using I/O Size 2 Kbytes for data pages.
        With LRU Buffer Replacement Strategy for data pages.


        FROM TABLE
            Stores
            b
        Nested iteration.
        Using Clustered Index.
        Index : PK_STORES
        Forward scan.
        Positioning by key.
        Keys are:
            StoreID  ASC
        Using I/O Size 2 Kbytes for data pages.
        With LRU Buffer Replacement Strategy for data pages.


  END OF QUERY PLAN FOR SUBQUERY 1.


Server Message:  Number  1562, Severity  10
Server 'FYMIS02', Line 1:
The sort for Worktable2 is done in Serial  
Server Message:  Number  1562, Severity  10
Server 'FYMIS02', Line 1:
The sort for Worktable3 is done in Serial  
Server Message:  Number  1562, Severity  10
Server 'FYMIS02', Line 1:
The sort for Worktable1 is done in Serial  
Table: ST_Vendor scan count 1, logical reads: (regular=7 apf=0 total=7), physical reads: (regular=0 apf=0 total=0), apf IOs used=0
Table: Stores scan count 24, logical reads: (regular=51 apf=0 total=51), physical reads: (regular=0 apf=0 total=0), apf IOs used=0
Table: OtherFee scan count 1, logical reads: (regular=73110 apf=0 total=73110), physical reads: (regular=0 apf=0 total=0), apf IOs used=0
Table: Vendor scan count 20, logical reads: (regular=60 apf=0 total=60), physical reads: (regular=0 apf=0 total=0), apf IOs used=0
Table: UserBuyer scan count 20, logical reads: (regular=40 apf=0 total=40), physical reads: (regular=0 apf=0 total=0), apf IOs used=0
Table: Buyer scan count 760, logical reads: (regular=1520 apf=0 total=1520), physical reads: (regular=0 apf=0 total=0), apf IOs used=0
Table: Stores scan count 20, logical reads: (regular=42 apf=0 total=42), physical reads: (regular=0 apf=0 total=0), apf IOs used=0
Table: VendorFee scan count 1, logical reads: (regular=2011 apf=0 total=2011), physical reads: (regular=288 apf=0 total=288), apf IOs used=0
Table: FeeType scan count 1, logical reads: (regular=6 apf=0 total=6), physical reads: (regular=6 apf=0 total=6), apf IOs used=0
Table: Worktable1  scan count 0, logical reads: (regular=1050 apf=0 total=1050), physical reads: (regular=0 apf=0 total=0), apf IOs used=0
Table: Worktable2  scan count 20, logical reads: (regular=171 apf=0 total=171), physical reads: (regular=0 apf=0 total=0), apf IOs used=0
Table: Worktable3  scan count 0, logical reads: (regular=92068 apf=0 total=92068), physical reads: (regular=0 apf=0 total=0), apf IOs used=0
Total writes for this command: 2481
(760 rows affected)

共享共进共赢Sharing And Win-win Results
SYBASEBBS - 免责申明1、欢迎访问“SYBASEBBS.COM”,本文内容及相关资源来源于网络,版权归版权方所有!本站原创内容版权归本站所有,请勿转载!
2、本文内容仅代表作者观点,不代表本站立场,作者自负,本站资源仅供学习研究,请勿非法使用,否则后果自负!请下载后24小时内删除!
3、本文内容,包括但不限于源码、文字、图片等,仅供参考。本站不对其安全性,正确性等作出保证。但本站会尽量审核会员发表的内容。
4、如本帖侵犯到任何版权问题,请立即告知本站 ,本站将及时删除并致以最深的歉意!客服邮箱:admin@sybasebbs.com
银铠圣袍 楼主

主题

0

回帖

12

积分

新手上路

积分
12
贡献
在线时间
小时
2007-6-15 11:09:01 | 显示全部楼层

 12.5.3的查询计划

QUERY PLAN FOR STATEMENT 1 (at line 1).


    STEP 1
        The type of query is INSERT.
        The update mode is direct.
        Worktable2 created for REFORMATTING.


        FROM TABLE
            VendorFee
            vf
        Nested iteration.
        Using Clustered Index.
        Index : PK_VENDORFEE
        Forward scan.
        Positioning at start of table.
        Using I/O Size 2 Kbytes for data pages.
        With LRU Buffer Replacement Strategy for data pages.
        TO TABLE
            Worktable2.


    STEP 2
        The type of query is INSERT.
        The update mode is direct.
        Worktable1 created, in allpages locking mode, for ORDER BY.


        FROM TABLE
            OtherFee
            o
        Nested iteration.
        Using Clustered Index.
        Index : PK_OTHERFEE
        Forward scan.
        Positioning at start of table.
        Using I/O Size 2 Kbytes for data pages.
        With LRU Buffer Replacement Strategy for data pages.


        FROM TABLE
            Vendor
            v
        Nested iteration.
        Using Clustered Index.
        Index : PK_VENDOR
        Forward scan.
        Positioning by key.
        Keys are:
            VendorID  ASC
        Using I/O Size 2 Kbytes for data pages.
        With LRU Buffer Replacement Strategy for data pages.


        FROM TABLE
            Stores
            s
        Nested iteration.
        Using Clustered Index.
        Index : PK_STORES
        Forward scan.
        Positioning by key.
        Keys are:
            StoreID  ASC
        Using I/O Size 2 Kbytes for data pages.
        With LRU Buffer Replacement Strategy for data pages.


        FROM TABLE
            FeeType
            ft
        Nested iteration.
        Using Clustered Index.
        Index : PK_FEETYPE
        Forward scan.
        Positioning at start of table.
        Using I/O Size 2 Kbytes for data pages.
        With LRU Buffer Replacement Strategy for data pages.


        FROM TABLE
            Worktable2.
        Nested iteration.
        Using Clustered Index.
        Forward scan.
        Positioning by key.
        Using I/O Size 2 Kbytes for data pages.
        With LRU Buffer Replacement Strategy for data pages.


        FROM TABLE
            UserBuyer
            u
        Nested iteration.
        Using Clustered Index.
        Index : PK_USERBUYER
        Forward scan.
        Positioning by key.
        Keys are:
            Buyer  ASC
        Using I/O Size 2 Kbytes for data pages.
        With LRU Buffer Replacement Strategy for data pages.


        FROM TABLE
            Buyer
            b
        Nested iteration.
        Using Clustered Index.
        Index : PK_BUYER
        Forward scan.
        Positioning by key.
        Keys are:
            Buyer  ASC


        Run subquery 1 (at nesting level 1).
        Using I/O Size 2 Kbytes for data pages.
        With LRU Buffer Replacement Strategy for data pages.
        TO TABLE
            Worktable1.


    STEP 3
        The type of query is SELECT.
        This step involves sorting.


        FROM TABLE
            Worktable1.
        Using GETSORTED
        Table Scan.
        Forward scan.
        Positioning at start of table.
        Using I/O Size 2 Kbytes for data pages.
        With MRU Buffer Replacement Strategy for data pages.
    STEP 1


NESTING LEVEL 1 SUBQUERIES FOR STATEMENT 1.


  QUERY PLAN FOR SUBQUERY 1 (at nesting level 1 and at line 10).


    Correlated Subquery.
    Subquery under an EXPRESSION predicate.


    STEP 1
        The type of query is SELECT.
        Evaluate Ungrouped COUNT AGGREGATE.


        FROM TABLE
            ST_Vendor
            a
        Nested iteration.
        Using Clustered Index.
        Index : PK_ST_VENDOR
        Forward scan.
        Positioning by key.
        Keys are:
            VendorID  ASC
        Using I/O Size 2 Kbytes for data pages.
        With LRU Buffer Replacement Strategy for data pages.


        FROM TABLE
            Stores
            b
        Nested iteration.
        Using Clustered Index.
        Index : PK_STORES
        Forward scan.
        Positioning by key.
        Keys are:
            StoreID  ASC
        Using I/O Size 2 Kbytes for data pages.
        With LRU Buffer Replacement Strategy for data pages.


  END OF QUERY PLAN FOR SUBQUERY 1.


Server Message:  Number  1562, Severity  10
Server 'FYMIS03', Line 1:
The sort for Worktable2 is done in Serial  
Server Message:  Number  1562, Severity  10
Server 'FYMIS03', Line 1:
The sort for Worktable1 is done in Serial  
Table: ST_Vendor scan count 1, logical reads: (regular=6 apf=0 total=6), physical reads: (regular=0 apf=0 total=0), apf IOs used=0
Table: Stores scan count 24, logical reads: (regular=49 apf=0 total=49), physical reads: (regular=0 apf=0 total=0), apf IOs used=0
Table: OtherFee scan count 1, logical reads: (regular=48445 apf=0 total=48445), physical reads: (regular=0 apf=0 total=0), apf IOs used=0
Table: Vendor scan count 20, logical reads: (regular=80 apf=0 total=80), physical reads: (regular=0 apf=0 total=0), apf IOs used=0
Table: UserBuyer scan count 20, logical reads: (regular=60 apf=0 total=60), physical reads: (regular=0 apf=0 total=0), apf IOs used=0
Table: Buyer scan count 780, logical reads: (regular=1560 apf=0 total=1560), physical reads: (regular=0 apf=0 total=0), apf IOs used=0
Table: Stores scan count 20, logical reads: (regular=41 apf=0 total=41), physical reads: (regular=0 apf=0 total=0), apf IOs used=0
Table: VendorFee scan count 1, logical reads: (regular=2003 apf=0 total=2003), physical reads: (regular=0 apf=0 total=0), apf IOs used=0
Table: FeeType scan count 20, logical reads: (regular=60 apf=0 total=60), physical reads: (regular=0 apf=0 total=0), apf IOs used=0
Table: Worktable1  scan count 0, logical reads: (regular=1079 apf=0 total=1079), physical reads: (regular=0 apf=0 total=0), apf IOs used=0
Table: Worktable2  scan count 0, logical reads: (regular=92833 apf=0 total=92833), physical reads: (regular=0 apf=0 total=0), apf IOs used=0
Total writes for this command: 2698
(780 rows affected)

共享共进共赢Sharing And Win-win Results
flybean

主题

0

回帖

595

积分

管理员

积分
595
贡献
在线时间
小时
2007-6-15 11:15:37 | 显示全部楼层
查询计划不一样哟
共享共进共赢Sharing And Win-win Results
您需要登录后才可以回帖 登录 | 站点注册

本版积分规则

免责声明:
本站所发布的一切破解补丁、注册机和注册信息及软件的解密分析文章仅限用于学习和研究目的;不得将上述内容用于商业或者非法用途,否则,一切后果请用户自负。本站信息来自网络,版权争议与本站无关。您必须在下载后的24个小时之内,从您的电脑中彻底删除上述内容。如果您喜欢该程序,请支持正版软件,购买注册,得到更好的正版服务。如有侵权请邮件与我们联系处理。

Mail To:Admin@SybaseBbs.com

QQ|Archiver|PowerBuilder(PB)BBS社区 ( 鲁ICP备2021027222号-1 )

GMT+8, 2024-12-23 15:00 , Processed in 0.042010 second(s), 8 queries , MemCached On.

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表