• <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>

            Prayer

            在一般中尋求卓越
            posts - 1256, comments - 190, trackbacks - 0, articles - 0
              C++博客 :: 首頁 :: 新隨筆 :: 聯系 :: 聚合  :: 管理

            db2expln

            Posted on 2009-07-16 17:34 Prayer 閱讀(617) 評論(0)  編輯 收藏 引用 所屬分類: DB2

            d:\>db2expln -d wz20901 -u wzgladm wzglpass -t
            -q "update MAT_MATERIAL set GATHERPLAN_ID=null  where GATHERPLAN_ID =2005178  or GATHERPLAN_ID=32 "

            DB2 Universal Database Version 8.1, 5622-044 (c) Copyright IBM Corp. 1991, 2002
            Licensed Material - Program Property of IBM
            IBM DB2 Universal Database SQL Explain Tool

            DB2 Universal Database Version 8.1, 5622-044 (c) Copyright IBM Corp. 1991, 2002
            Licensed Material - Program Property of IBM
            IBM DB2 Universal Database SQL Explain Tool

            ******************** DYNAMIC ***************************************

            ==================== STATEMENT ==========================================

                    Isolation Level          = Cursor Stability
                    Blocking                 = Block Unambiguous Cursors
                    Query Optimization Class = 5

                    Partition Parallel       = No
                    Intra-Partition Parallel = No

                    SQL Path                 = "SYSIBM", "SYSFUN", "SYSPROC", "WZGLADM"


            SQL Statement:

              update MAT_MATERIAL set GATHERPLAN_ID=null
              where GATHERPLAN_ID =2005178 or GATHERPLAN_ID=32


            Section Code Page = 1386

            Estimated Cost = 15083.518555
            Estimated Cardinality = 940.719971

            Access Table Name = WZGLADM.MAT_MATERIAL  ID = 5,27
            |  #Columns = 1
            |  Relation Scan
            |  |  Prefetch: Eligible
            |  Lock Intents
            |  |  Table: Intent Exclusive
            |  |  Row  : Exclusive
            Nested Loop Join
            |  Data Stream 1:
            |  |  Not Piped
            |  |  Table Constructor
            |  |  |  2-Row(s)
            |  |  Insert Into Temp Table  ID = t1
            |  |  |  #Columns = 0
            |  End of Data Stream 1
            |  Access Temp Table  ID = t1
            |  |  #Columns = 0
            |  |  Relation Scan
            |  |  |  Prefetch: Eligible
            |  |  Sargable Predicate(s)
            |  |  |  #Predicates = 1
            Update:  Table Name = WZGLADM.MAT_MATERIAL  ID = 5,27

            End of section

             

            d:\>

             


            腳本:


            d:\>db2expln -d wz20901 -u wzgladm wzglpass -t -z ; -f tmp.sql

            DB2 Universal Database Version 8.1, 5622-044 (c) Copyright IBM Corp. 1991, 2002
            Licensed Material - Program Property of IBM
            IBM DB2 Universal Database SQL Explain Tool

            DB2 Universal Database Version 8.1, 5622-044 (c) Copyright IBM Corp. 1991, 2002
            Licensed Material - Program Property of IBM
            IBM DB2 Universal Database SQL Explain Tool

            ******************** DYNAMIC ***************************************

            ==================== STATEMENT ==========================================

                    Isolation Level          = Cursor Stability
                    Blocking                 = Block Unambiguous Cursors
                    Query Optimization Class = 5

                    Partition Parallel       = No
                    Intra-Partition Parallel = No

                    SQL Path                 = "SYSIBM", "SYSFUN", "SYSPROC", "WZGLADM"


            SQL Statement:

              select GATHERPLAN_ID
              from MAT_MATERIAL
              where GATHERPLAN_ID=2005178 or GATHERPLAN_ID=5 or GATHERPLAN_ID=3


            Section Code Page = 1386

            Estimated Cost = 128.615417
            Estimated Cardinality = 1411.079956

            Table Constructor
            |  3-Row(s)
            Nested Loop Join
            |  Access Table Name = WZGLADM.MAT_MATERIAL  ID = 5,27
            |  |  Index Scan:  Name = WZGLADM.MAT_IDX_GPLAN_ID  ID = 4
            |  |  |  Regular Index (Not Clustered)
            |  |  |  Index Columns:
            |  |  |  |  1: GATHERPLAN_ID (Ascending)
            |  |  #Columns = 1
            |  |  #Key Columns = 1
            |  |  |  Start Key: Inclusive Value
            |  |  |  |  |  1: ?
            |  |  |  Stop Key: Inclusive Value
            |  |  |  |  |  1: ?
            |  |  Index-Only Access
            |  |  Index Prefetch: None
            |  |  Lock Intents
            |  |  |  Table: Intent Share
            |  |  |  Row  : Next Key Share
            |  |  Sargable Index Predicate(s)
            |  |  |  Return Data to Application
            |  |  |  |  #Columns = 1
            Return Data Completion

            End of section

             


            對于稍微復雜的sql,建議使用questcentral中的 SQL turning 功能,比較直觀。


            本文來自CSDN博客,轉載請標明出處:http://blog.csdn.net/njhart2003/archive/2008/07/23/2696295.aspx

            精品综合久久久久久97超人| 国产99久久久国产精品~~牛| 久久只有这精品99| 久久99热这里只有精品66| 精品久久久久久无码专区 | 99久久精品日本一区二区免费| 青青热久久综合网伊人| 免费精品国产日韩热久久| 国产一久久香蕉国产线看观看| 色婷婷久久久SWAG精品| 免费观看成人久久网免费观看| 久久精品无码一区二区WWW| 亚洲国产精品久久| 久久精品水蜜桃av综合天堂| 久久香蕉一级毛片| 久久人爽人人爽人人片AV| 久久久WWW成人免费毛片| 国产精品18久久久久久vr| 久久精品国产AV一区二区三区| 91亚洲国产成人久久精品网址| 亚洲va中文字幕无码久久不卡| 久久久久97国产精华液好用吗| 欧美一区二区精品久久| 久久综合国产乱子伦精品免费| 久久久久久精品无码人妻| 一本一本久久a久久精品综合麻豆| 久久成人精品视频| 久久久国产精品福利免费| 国产成人无码久久久精品一| 伊人久久综合精品无码AV专区| 久久亚洲AV成人无码| 国产精品久久久久久久久软件| 色婷婷噜噜久久国产精品12p| 国产精品美女久久久久av爽| 狠狠色丁香婷婷综合久久来来去| 亚洲欧美日韩精品久久| 国产精品丝袜久久久久久不卡| 久久精品成人免费观看97| 久久久久人妻一区精品果冻| 免费一级做a爰片久久毛片潮| 久久国产三级无码一区二区|