• <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

            亚洲狠狠婷婷综合久久久久| 亚洲精品乱码久久久久久久久久久久| 久久午夜福利电影| 久久99热这里只有精品国产| 精品乱码久久久久久夜夜嗨| 久久本道久久综合伊人| 中文精品99久久国产 | 精品久久久无码中文字幕| 久久青青草原精品国产不卡| 亚洲国产精品无码久久久蜜芽 | 久久无码高潮喷水| 久久国产精品99精品国产| 久久精品中文字幕第23页| 久久精品国产亚洲AV久 | 久久国产三级无码一区二区| 久久精品中文字幕一区| 四虎国产永久免费久久| 无码国内精品久久人妻| 青青青青久久精品国产h久久精品五福影院1421| 亚洲精品tv久久久久| 久久久久中文字幕| 久久精品国产亚洲AV久 | 77777亚洲午夜久久多喷| 久久播电影网| 久久久无码一区二区三区| 亚洲国产精品综合久久一线| 狠狠色丁香婷综合久久| 香蕉久久av一区二区三区| 久久综合视频网站| 国产精品青草久久久久福利99 | 色播久久人人爽人人爽人人片AV| 久久亚洲精品中文字幕三区| 久久精品国产亚洲AV高清热 | 国内精品久久久久影院日本| 免费精品久久天干天干| 日韩久久久久中文字幕人妻| 99久久精品免费看国产免费| 久久国产高清字幕中文| 久久夜色tv网站| 亚洲国产精品久久| 亚洲国产精品婷婷久久|