• <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++博客 :: 首頁 :: 新隨筆 :: 聯系 :: 聚合  :: 管理

            CACHE option of CREATE SEQUENCE statement

            Posted on 2010-05-15 23:05 Prayer 閱讀(385) 評論(0)  編輯 收藏 引用 所屬分類: DB2

             

             Version 9.1 for z/OS

            CACHE option of CREATE SEQUENCE statement

            The CACHE option of the CREATE SEQUENCE statement is a performance and tuning option which directs DB2® to preallocate a specified number of sequential values in memory.

            Start of change Begin general-use programming information.Sequence objects provide unique, sequential, and numeric values to DB2 applications. Applications can use sequence numbers for a variety of purposes, including the avoidance of concurrency and performance problems that can result when applications generate their own sequence numbers. Unlike application-generated sequences, DB2 sequence objects allow multiple transactions to concurrently increment the sequence number, and DB2 guarantees that each sequential value is unique. DB2 does not wait for a transaction that has incremented a sequence to commit before allowing the sequence to be incremented by another transaction. No retained locks are held to prevent access to the sequence.End of change

            Start of changeEvery time a cache is allocated, the SYSIBM.SYSSEQUENCES table is updated and a forced log record is written for the update. Using ORDER or NO CACHE will result in a SYSIBM.SYSSEQUENCES table update and the associated forced log write every time a new value is generated by DB2. Specifying CACHE provides faster access to the sequence since values are assigned from the cache. It also reduces the number of SYSIBM.SYSSEQUENCES updates and the associated forced log records. The SYSIBM.SYSSEQ table space is defined with the MAXROWS(1) attribute in order to minimize page P-lock contention in a data sharing environment as the SYSIBM.SYSSEQUENCES table gets updated.End of change

            Start of changeDB2 always generates sequence numbers in order of request. However, when a sequence is shared across multiple members of a data sharing group, each DB2 member allocates its own cache of unique consecutive numbers for the sequence. Therefore, in situations where transactions from different members are requesting the next sequence number from the same sequence, values assigned for the sequence across multiple DB2 members may not be in strict numeric order. End of change

            Start of change Example: Assume that members DB2A and DB2B share a sequence named SEQ1 that starts with 1, increments by 1, and has cache = 20. If the transaction that is associated with DB2A makes the first request for a sequence number, DB2A allocates a cache of 20 values (from 1 to 20) and the value of 1 is provided to the application. If the transaction that is associated with DB2B makes the next request for a sequence number, DB2B allocates its own cache of 20 values (from 21 to 40) and the value of 21 is provided to the application. Assuming that sequence number requests continue to arrive from the transactions that are associated with members DB2A and DB2B in this manner (one from DB2A and then one from DB2B), the values assigned for that sequence are 1, 21, 2, 22, 3, 23, and so on. Although the numbers are in sequence within each DB2, the numbers assigned across multiple DB2 members are not in strict numeric sequence.End of change

            Start of changeIn a data sharing environment, using the ORDER or NO CACHE option ensures that the values assigned to a sequence which is shared by applications across multiple DB2 members are in strict numeric order. In a data sharing environment, if ORDER is specified, then NO CACHE is implicit even if CACHE n is specified.End of change

            In a non-data sharing environment, the numbers are always assigned in strict numerical order, even if NO ORDER is specified; so specifying ORDER or NO CACHE is not necessary.

            Important: Specifying ORDER or NO CACHE in a data sharing environment, or NO CACHE in a non-data sharing environment, is not recommended because it will result in a SYSIBM.SYSSEQUENCES table update and the associated forced log record for each value generated by DB2. This can lead to an excessive amount of log write I/Os, which can drastically reduce the log write bandwidth.

            End general-use programming information.


            Terms of use | Library | Support | Feedback
            http://publib.boulder.ibm.com/infocenter/dzichelp/v2r2/topic/com.ibm.db29.doc.dshare/db2z_cacheoptcreatesequence.htm

            PDF version of this information: DB2 for z/OS Data Sharing: Planning and Administration (2.8 MB)

            Last updated: October, 2009
            Copyright IBM Corporation 1994, 2009. All Rights Reserved.
            久久久精品人妻一区二区三区四 | 亚洲国产成人久久精品动漫| 狠狠精品久久久无码中文字幕| 久久人人爽人人爽人人片AV麻烦 | 国产福利电影一区二区三区久久久久成人精品综合 | 久久99国产精品久久99| 伊人久久免费视频| 久久天天躁夜夜躁狠狠躁2022| 人妻无码αv中文字幕久久| 久久99国产精品久久久 | 国产ww久久久久久久久久| 日韩欧美亚洲国产精品字幕久久久 | 久久精品日日躁夜夜躁欧美| 99久久国产热无码精品免费| 久久精品国产一区二区| 色成年激情久久综合| 久久精品国产男包| 91久久香蕉国产熟女线看| 中文无码久久精品| 久久国产精品免费一区二区三区| 亚洲va久久久噜噜噜久久天堂| 久久久久亚洲AV成人网人人网站 | 久久热这里只有精品在线观看| 久久久精品午夜免费不卡| 久久久久久精品免费看SSS| 99久久精品九九亚洲精品| 麻豆AV一区二区三区久久| 久久精品极品盛宴观看| 久久精品国产色蜜蜜麻豆 | 久久97久久97精品免视看| 蜜臀久久99精品久久久久久小说 | 久久精品亚洲福利| 91秦先生久久久久久久| 97久久国产亚洲精品超碰热| 久久永久免费人妻精品下载| 久久久久久久久久久久久久| 亚洲七七久久精品中文国产| 人妻精品久久久久中文字幕| 精品久久久久久国产免费了| 99久久精品国产一区二区蜜芽| 久久精品免费观看|