ページの先頭行へ戻る
Symfoware Server V12.10.0 SQLTOOLユーザーズガイド

4.3.7 SQL性能情報の出力例

SQL性能情報の出力として、以下があります。

それぞれの例を、以下に示します。

表の全件検索

[SQL性能情報の出力例]

###################### SQL TRACE START 15:50:50 05/10 ########################
SQL statement : 
SELECT*FROM SCM1.TBL1
Total Time   : 00:00:00(028)
==============================================================================
------------------------------------------------------------------------------
Section No   : 1
Section Time : 00:00:00(014)
------------------------------------------------------------------------------
[1] TABLE ACCESS
    table name                        : TBL1
      table access (read/ins/del/upd) : 1760/0/0/0
    base dso name                     : TBL1_BASE_DSO
      dso access   (read/ins/del/upd) : 1760/0/0/0
      dsi number   (access/total)     : 1/1
          base dsi name                   : TBL1_BASE_DSI
            dsi access (read/ins/del/upd) : 1760/0/0/0
[2] OUTPUT
    record number       : 1760
############################### SQL TRACE END ################################

表の全検索(DSI分割あり)

[SQL性能情報の出力例]

###################### SQL TRACE START 16:09:13 05/10 ########################
SQL statement :
SELECT*FROM SCM1.TBL1
Total Time   : 00:00:00(328)
==============================================================================
------------------------------------------------------------------------------
Section No   : 1
Section Time : 00:00:00(222)
------------------------------------------------------------------------------
[1] TABLE ACCESS
    table name                        : TBL1
      table access (read/ins/del/upd) : 1730/0/0/0
    base dso name                     : TBL1_BASE_DSO
      dso access   (read/ins/del/upd) : 1730/0/0/0
      dsi number   (access/total)     : 2/2
          base dsi name                   : TBL1_BASE1_DSI
            dsi access (read/ins/del/upd) : 865/0/0/0
          base dsi name                   : TBL1_BASE1_DSI
            dsi access (read/ins/del/upd) : 865/0/0/0
[2] OUTPUT
    record number       : 1730
############################### SQL TRACE END ################################

並列スキャン

[SQL性能情報の出力例]

###################### SQL TRACE START 16:14:28 05/10 ########################
SQL statement :
SELECT*FROM SCM1.TBL1 PARALLEL
Total Time   : 00:00:00(019)
==============================================================================
------------------------------------------------------------------------------
Section No   : 1
Section Time : 00:00:00(019)
------------------------------------------------------------------------------
[1] TABLE ACCESS
    table name                        : TBL1
      table access (read/ins/del/upd) : 1730/0/0/0
    parallel number                   : 2
    base dso name                     : TBL1_BASE_DSO
      dso access   (read/ins/del/upd) : 1730/0/0/0
      dsi number   (access/total)     : 2/2
          base dsi name                   : TBL1_BASE1_DSI
            dsi access (read/ins/del/upd) : 865/0/0/0
          base dsi name                   : TBL1_BASE2_DSI
            dsi access (read/ins/del/upd) : 865/0/0/0
[2] OUTPUT
    record number       : 1730
############################### SQL TRACE END ################################

インデックス検索と表データ取得

[SQL性能情報の出力例]

###################### SQL TRACE START 16:39:53 05/10 ######################## 
SQL statement :
SELECT*FROM SCM1.TBL1 WHERE C1=1 AND C2 BETWEEN 1 AND 4 AND C3<50
Total Time   : 00:00:00(657)
==============================================================================
------------------------------------------------------------------------------
Section No   : 1
Section Time : 00:00:00(200)
------------------------------------------------------------------------------
[1] TABLE ACCESS
    table name                        : TBL1
      table access (read/ins/del/upd) : 0/0/0/0
    base dso name                     : TBL1_BASE_DSO
      dso access   (read/ins/del/upd) : 0/0/0/0
      dsi number   (access/total)     : 0/1
    index dso name                    : TBL1_IX1_DSO
      dso access   (read/ins/del/upd) : 40/0/0/0
      dsi number   (access/total)     : 1/1
          index dsi name                  : TBL1_IX1_DSI
            dsi access (read/ins/del/upd) : 40/0/0/0
[2] SORT INSERT
    Sort name           : SORT0001
    Sort type           : ALL
    key length(byte)    : 12
    record length(byte) : 12
    record number       : 40
------------------------------------------------------------------------------
Section No   : 2
Section Time : 00:00:00(165)
------------------------------------------------------------------------------
[1] SORT SCAN
    sort name           : SORT0001
    sort type           : ALL
    record number       : 40
    used memory(kb)     : 64
    file size(kb)       : 0
    run(number/capacity): 0/0
    run merge           : 0
[2] TABLE ACCESS
    table name                        : TBL1
      table access (read/ins/del/upd) : 40/0/0/0
    base dso name                     : TBL1_BASE_DSO
      dso access   (read/ins/del/upd) : 40/0/0/0
      dsi number   (access/total)     : 1/1
          base dsi name                   : TBL1_BASE_DSI
            dsi access (read/ins/del/upd) : 40/0/0/0
[3] OUTPUT
    record number       : 20
############################### SQL TRACE END ################################

group byありALL集合関数

[SQL性能情報の出力例]

###################### SQL TRACE START 17:12:03 05/10 ########################
SQL statement :
SELECT SUM(C1)FROM SCM1.TBL1 GROUP BY C2
Total Time   : 00:00:00(418)
==============================================================================
------------------------------------------------------------------------------
Section No   : 1
Section Time : 00:00:00(239)
------------------------------------------------------------------------------
[1] TABLE ACCESS
    table name                        : TBL1
      table access (read/ins/del/upd) : 3470/0/0/0
    base dso name                     : TBL1_BASE_DSO
      dso access   (read/ins/del/upd) : 3470/0/0/0
      dsi number   (access/total)     : 1/1
          base dsi name                   : TBL1_BASE_DSI
            dsi access (read/ins/del/upd) : 3470/0/0/0
[2] SORT INSERT
    sort name           : SORT0001
    sort type           : ALL
    key length(byte)    : 4
    record length(byte) : 8
    record number       : 3470
------------------------------------------------------------------------------
Section No   : 2
Section Time : 00:00:00(035)
------------------------------------------------------------------------------
[1] SORT SCAN
    sort name           : SORT0001
    sort type           : ALL
    record number       : 3470
    used memory(kb)     : 64
    file size(kb)       : 0
    run(number/capacity): 0/0
    run merge           : 0
[2] GROUPING
    result record number: 10
[3] OUTPUT
    record number       : 10
############################### SQL TRACE END ################################

副問合せ

[SQL性能情報の出力例]

###################### SQL TRACE START 17:54:42 05/17 ########################
SQL statement :
SELECT C2 FROM SCM1.TBL1 WHERE C1 NOT IN(SELECT C2 FROM SCM1.TBL2 WHERE C3=2)
Total Time   : 00:00:02(660)
==============================================================================
------------------------------------------------------------------------------
Section No   : 1
Section Time : 00:00:00(000)
------------------------------------------------------------------------------
[1] TABLE ACCESS
    table name                        : TBL2
      table access (read/ins/del/upd) : 10/0/0/0
    base dso name                     : TBL2_BASE_DSO
      dso access   (read/ins/del/upd) : 10/0/0/0
      dsi number   (access/total)     : 1/1
          base dsi name                   : TBL2_BASE_DSI
            dsi access (read/ins/del/upd) : 10/0/0/0
[2] WORK INSERT
    work name           : WORK0001
    record length(byte) : 4
    record number       : 5
------------------------------------------------------------------------------
Section No   : 2
Section Time : 00:00:00(038)
------------------------------------------------------------------------------
[1] TABLE ACCESS
    table name                        : TBL1
      table access (read/ins/del/upd) : 3470/0/0/0
    base dso name                     : TBL1_BASE_DSO
      dso access   (read/ins/del/upd) : 3470/0/0/0
      dsi number   (access/total)     : 1/1
          base dsi name                   : TBL1_BASE_DSI
            dsi access (read/ins/del/upd) : 3470/0/0/0
    subquery evaluation : 2-1
[2] OUTPUT
    record number       : 1300
==============================================================================
Sub query : 2-1
------------------------------------------------------------------------------
Section No   : 1
Section Time : 00:00:00(087)
------------------------------------------------------------------------------
[1] WORK SCAN
    work name           : WORK0001
    record number       : 13010
    used memory(kb)     : 64
    file size(kb)       : 0
############################### SQL TRACE END ################################

MERGE JOIN(インデックスを利用してジョインをして表データも取得する)

(1)(3)WHERE探索条件よりインデックス検索範囲を作成し、INDEX KEY SCANを行う。

(インデックスに検索範囲が生成できない場合は、INDEX ALL SCANを行う)

(2)(4)インデックスキー(ジョインキー)の昇順にレコードを取得する。

(5) ソートマージ法でジョインを行う。

(6) TBL1のTIDでソートを行う。

(7) ソートからレコードを取り出し、表をTABLE KEY SCANする。

(8) TBL2のTIDでソートを行う。

(9) ソートからレコードを取り出し、表をTABLE KEY SCANして、結果データをアプリケーションに返却する。


[SQL性能情報の出力例]

###################### SQL TRACE START 10:04:32 05/11 ########################
SQL statement :
SELECT*FROM SCM1.TBL1,SCM1.TBL2 WHERE TBL1.C1=TBL2.C1 AND TBL1.C2=TBL2.C2 AND
 TBL1.C1 BETWEEN 1 AND 5 AND TBL1.C3>0
Total Time   : 00:00:01(982)
==============================================================================
------------------------------------------------------------------------------
Section No   : 1
Section Time : 00:00:00(282)
------------------------------------------------------------------------------
[1] MERGE JOIN
    result record number : 5000
    max duplicate number : 1
    used memory(kb)      : 0
       1) TABLE ACCESS
          table name                        : TBL1
            table access (read/ins/del/upd) : 0/0/0/0
          base dso name                     : TBL1_BASE_DSO
            dso access   (read/ins/del/upd) : 0/0/0/0
            dsi number   (access/total)     : 0/1
          index dso name                    : TBL1_IX1_DSO
            dso access   (read/ins/del/upd) : 50/0/0/0
            dsi number   (access/total)     : 1/1
                index dsi name                  : TBL1_IX1_DSI
                  dsi access (read/ins/del/upd) : 50/0/0/0
       2) TABLE ACCESS
          table name                        : TBL2
            table access (read/ins/del/upd) : 0/0/0/0
          base dso name                     : TBL2_BASE_DSO
            dso access   (read/ins/del/upd) : 0/0/0/0
            dsi number   (access/total)     : 0/1
          index dso name                    : TBL2_IX1_DSO
            dso access   (read/ins/del/upd) : 5000/0/0/0
            dsi number   (access/total)     : 1/1
                index dsi name                  : TBL2_IX1_DSI
                  dsi access (read/ins/del/upd) : 5000/0/0/0
[2] SORT INSERT
    sort name           : SORT0001
    sort type           : ALL
    key length(byte)    : 12
    record length(byte) : 24
    record number       : 5000
------------------------------------------------------------------------------
Section No   : 2
Section Time : 00:00:00(116)
------------------------------------------------------------------------------
[1] SORT SCAN
    sort name           : SORT0001
    sort type           : ALL
    record number       : 5000
    used memory(kb)     : 1090
    file size(kb)       : 0
    run(number/capacity): 0/0
    run merge           : 0
[2] TABLE ACCESS
    table name                        : TBL1
      table access (read/ins/del/upd) : 5000/0/0/0
    base dso name                     : TBL1_BASE_DSO
      dso access   (read/ins/del/upd) : 5000/0/0/0
      dsi number   (access/total)     : 1/1
          base dsi name                   : TBL1_BASE_DSI
            dsi access (read/ins/del/upd) : 5000/0/0/0
[3] SORT INSERT
    sort name           : SORT0002
    sort type           : ALL
    key length(byte)    : 12
    record length(byte) : 132 record number : 2500
------------------------------------------------------------------------------
Section No   : 3
Section Time : 00:00:00(085)
------------------------------------------------------------------------------
[1] SORT SCAN
    sort name           : SORT0002
    sort type           : ALL
    record number       : 2500
    used memory(kb)     : 1090
    file size(kb)       : 0
    run(number/capacity): 0/0
    run merge           : 0
[2] TABLE ACCESS
    table name                        : TBL2
      table access (read/ins/del/upd) : 2500/0/0/0
    base dso name                     : TBL2_BASE_DSO
      dso access   (read/ins/del/upd) : 2500/0/0/0
      dsi number   (access/total)     : 1/1
          base dsi name                   : TBL2_BASE_DSI
            dsi access (read/ins/del/upd) : 2500/0/0/0
[3] OUTPUT
    record number       : 2500
############################### SQL TRACE END ################################

MERGE JOIN(ソートテーブルを利用してジョインする)

(1)インデックス検索と表データ取得を利用して得られたレコードを、ソートテーブルにINSERTする。

(2)検索範囲を生成できないのでINDEX ALL SCANを行う。

(3)(4)ソートテーブルとインデックスからジョインキーの昇順にレコードを取り出す。

(5) ソートマージ法でジョインを行う。

(6) TBL2のTIDでソートを行う。

(7) ソートからレコードを取り出し、表をTABLE KEY SCANして、結果データをアプリケーションに返却する。


[SQL性能情報の出力例]

###################### SQL TRACE START 10:32:18 05/11 ########################
SQL statement :
SELECT*FROM SCM1.TBL1,SCM1.TBL2 WHERE TBL1.C1=TBL2.C1 AND TBL1.C3 BETWEEN 1 A
ND 5
Total Time   : 00:00:00(931)
==============================================================================
------------------------------------------------------------------------------
Section No   : 1
Section Time : 00:00:00(020)
------------------------------------------------------------------------------
[1] TABLE ACCESS
    table name                        : TBL1
      table access (read/ins/del/upd) : 0/0/0/0
    base dso name                     : TBL1_BASE_DSO
      dso access   (read/ins/del/upd) : 0/0/0/0
      dsi number   (access/total)     : 0/1
    index dso name                    : TBL1_IX1_DSO
      dso access   (read/ins/del/upd) : 10/0/0/0
      dsi number   (access/total)     : 1/1
          index dsi name                  : TBL1_IX2_DSI
            dsi access (read/ins/del/upd) : 10/0/0/0
[2] SORT INSERT
    sort name           : SORT0002
    sort type           : ALL key
    length(byte)        : 12
    record length(byte) : 12
    record number       : 10
------------------------------------------------------------------------------
Section No   : 2
Section Time : 00:00:00(036)
------------------------------------------------------------------------------
[1] SORT SCAN
    sort name           : SORT0002
    sort type           : ALL
    record number       : 10
    used memory(kb)     : 64
    file size(kb)       : 0
    run(number/capacity): 0/0
    run merge           : 0
[2] TABLE ACCESS
    table name                        : TBL1
      table access (read/ins/del/upd) : 10/0/0/0
    base dso name                     : TBL1_BASE_DSO
      dso access   (read/ins/del/upd) : 10/0/0/0
      dsi number   (access/total)     : 1/1
          base dsi name                   : TBL1_BASE_DSI
            dsi access (read/ins/del/upd) : 10/0/0/0
[3] SORT INSERT
    sort name           : SORT0001
    sort type           : ALL
    key length(byte)    : 4
    record length(byte) : 120
    record number       : 10
------------------------------------------------------------------------------
Section No   : 3
Section Time : 00:00:00(434)
------------------------------------------------------------------------------
[1] MERGE JOIN
    result record number : 500
    max duplicate number : 1
    used memory(kb)      : 0
       1) TABLE ACCESS
          table name                        : TBL2
            table access (read/ins/del/upd) : 0/0/0/0
          base dso name                     : TBL2_BASE_DSO
            dso access   (read/ins/del/upd) : 0/0/0/0
            dsi number   (access/total)     : 0/1
          index dso name                    : TBL2_IX1_DSO
            dso access   (read/ins/del/upd) : 551/0/0/0
            dsi number   (access/total)     : 1/1
                index dsi name                  : TBL2_IX1_DSI
                  dsi access (read/ins/del/upd) : 551/0/0/0
       2) SORT SCAN
          sort name           : SORT0001
          sort type           : ALL
          record number       : 10
          used memory(kb)     : 64
          file size(kb)       : 0
          run(number/capacity): 0/0
          run merge           : 0
[2] SORT INSERT
    sort name           : SORT0003
    sort type           : ALL
    key length(byte)    : 12
    record length(byte) : 132
    record number       : 500
------------------------------------------------------------------------------
Section No   : 4
Section Time : 00:00:00(215)
------------------------------------------------------------------------------
[1] SORT SCAN
    sort name           : SORT0003
    sort type           : ALL
    record number       : 500
    used memory(kb)     : 577
    file size(kb)       : 0
    run(number/capacity): 0/0
    run merge           : 0
[2] TABLE ACCESS
    table name                        : TBL2
      table access (read/ins/del/upd) : 500/0/0/0
    base dso name                     : TBL2_BASE_DSO
      dso access   (read/ins/del/upd) : 500/0/0/0
      dsi number   (access/total)     : 1/1
          base dsi name                   : TBL2_BASE_DSI
            dsi access (read/ins/del/upd) : 500/0/0/0
[3] OUTPUT
    record number       : 500
############################### SQL TRACE END ################################

MERGE JOIN(ソートテーブルを利用してジョインする(ジョイン対象カラムに重複あり))

(1)インデックス検索と表データ取得を利用して得られたレコードを、ソートテーブルにINSERTする。

(2)検索範囲を生成できないのでINDEX ALL SCANを行う。

(3)(4)ソートテーブルとインデックスからジョインキーの昇順にレコードを取り出す。

(5) ソートマージ法でジョインを行う。

(6) TBL2のTIDでソートを行う。

(7) ソートからレコードを取り出し、表をTABLE KEY SCANして、結果データをアプリケーションに返却する。

[SQL性能情報の出力例]

###################### SQL TRACE START 13:41:42 05/11 ########################
SQL statement :
SELECT*FROM SCM1.TBL1,SCM1.TBL2 WHERE TBL1.C1=TBL2.C1 AND TBL1.C3 BETWEEN 1 A
ND 5
Total Time   : 00:00:13(629)
==============================================================================
------------------------------------------------------------------------------
Section No   : 1
Section Time : 00:00:00(039)
------------------------------------------------------------------------------
[1] TABLE ACCESS
    table name                        : TBL1
      table access (read/ins/del/upd) : 0/0/0/0
    base dso name                     : TBL1_BASE_DSO
      dso access   (read/ins/del/upd) : 0/0/0/0
      dsi number   (access/total)     : 0/1
    index dso name                    : TBL1_IX1_DSO
      dso access   (read/ins/del/upd) : 10/0/0/0
      dsi number   (access/total)     : 1/1
          index dsi name                  : TBL1_IX1_DSI
            dsi access (read/ins/del/upd) : 10/0/0/0
[2] SORT INSERT
    sort name           : SORT0002
    sort type           : ALL
    key length(byte)    : 12
    record length(byte) : 12
    record number       : 10
------------------------------------------------------------------------------
Section No     : 2
Section Time   : 00:00:00(034)
------------------------------------------------------------------------------
[1] SORT SCAN
    sort name           : SORT0002
    sort type           : ALL
    record number       : 10
    used memory(kb)     : 64
    file size(kb)       : 0
    run(number/capacity): 0/0
    run merge           : 0
[2] TABLE ACCESS
    table name                        : TBL1
      table access (read/ins/del/upd) : 10/0/0/0
    base dso name                     : TBL1_BASE_DSO
      dso access   (read/ins/del/upd) : 10/0/0/0
      dsi number   (access/total)     : 1/1
          base dsi name                   : TBL1_BASE_DSI
            dsi access (read/ins/del/upd) : 10/0/0/0
[3] SORT INSERT
    sort name           : SORT0001
    sort type           : ALL
    key length(byte)    : 4
    record length(byte) : 24
    record number       : 10
------------------------------------------------------------------------------
Section No   : 3
Section Time : 00:00:11(318)
------------------------------------------------------------------------------
[1] MERGE JOIN
    result record number : 50000
    max duplicate number : 5000
    used memory(kb)      : 32760
       1) SORT SCAN
          sort name           : SORT0001
          sort type           : ALL
          record number       : 10
          used memory(kb)     : 64
          file size(kb)       : 0
          run(number/capacity): 0/0
          run merge           : 0
       2) TABLE ACCESS
          table name                        : TBL2
            table access (read/ins/del/upd) : 0/0/0/0
          base dso name                     : TBL2_BASE_DSO
            dso access   (read/ins/del/upd) : 0/0/0/0
            dsi number   (access/total)     : 0/1
          index dso name                    : TBL2_IX1_DSO
            dso access   (read/ins/del/upd) : 50000/0/0/0
            dsi number   (access/total)     : 1/1
                index dsi name                  : TBL2_IX1_DSI
                  dsi access (read/ins/del/upd) : 50000/0/0/0
       3) WORK INSERT SCAN
          work name           : WORK0004
          record length(byte) : 12
          used memory(kb)     : 64
          file size(kb)       : 0
          work process count  (INSERT/SCAN) : 10/10
          record number       (INSERT/SCAN) : 2270/2270
          total record number (INSERT/SCAN) : 22700/22700
[2] SORT INSERT
    sort name           : SORT0003
    sort type           : ALL
    key length(byte)    : 12
    record length(byte) : 36
    record number       : 50000
------------------------------------------------------------------------------
Section No   : 4
Section Time : 00:00:00(917)
------------------------------------------------------------------------------
[1] SORT SCAN
    sort name           : SORT0003
    sort type           : ALL
    record number       : 50000
    used memory(kb)     : 3142
    file size(kb)       : 3584
    run(number/capacity): 2/21
    run merge           : 1
[2] TABLE ACCESS
    table name                        : TBL2
      table access (read/ins/del/upd) : 50000/0/0/0
    base dso name                     : TBL2_BASE_DSO
      dso access   (read/ins/del/upd) : 50000/0/0/0
      dsi number   (access/total)     : 1/1
          base dsi name                   : TBL2_BASE_DSI
            dsi access (read/ins/del/upd) : 50000/0/0/0
[3] OUTPUT
    record number       : 50000
############################### SQL TRACE END ################################

FETCH JOIN(ジョインされる側がインデックス)

(1) インデックス検索と表データ取得で取得したレコード取り出す。

(2) インデックスの検索範囲を作成し、INDEX TABLE SCANを行う。

(3) 結果データをアプリケーションに返却する。


[SQL性能情報の出力例]

###################### SQL TRACE START 13:05:13 05/11 ########################
SQL statement :
SELECT*FROM SCM1.TBL1,SCM1.TBL2 WHERE TBL1.C1=TBL2.C1 AND TBL1.C3=1
Total Time   : 00:00:00(405)
==============================================================================
------------------------------------------------------------------------------
Section No   : 1
Section Time : 00:00:00(347)
------------------------------------------------------------------------------
[1] FETCH JOIN
    result record number : 300
       1) TABLE ACCESS
          table name                        : TBL1
            table access (read/ins/del/upd) : 10/0/0/0
          base dso name                     : TBL1_BASE_DSO
            dso access   (read/ins/del/upd) : 10/0/0/0
            dsi number   (access/total)     : 1/1
                base dsi name                   : TBL1_BASE_DSI
                  dsi access (read/ins/del/upd) : 10/0/0/0
          index dso name : TBL1_IX1_DSO
            dso access   (read/ins/del/upd) : 10/0/0/0
            dsi number   (access/total)     : 1/1
                index dsi name                  : TBL1_IX2_DSI
                  dsi access (read/ins/del/upd) : 10/0/0/0
       2) TABLE ACCESS
          table name                        : TBL2
            table access (read/ins/del/upd) : 300/0/0/0
          base dso name                     : TBL2_BASE_DSO
            dso access   (read/ins/del/upd) : 300/0/0/0
            dsi number   (access/total)     : 1/1
                base dsi name                   : TBL2_BASE_DSI
                  dsi access (read/ins/del/upd) : 300/0/0/0
          index dso name                    : TBL2_IX1_DSO
            dso access   (read/ins/del/upd) : 300/0/0/0
            dsi number   (access/total)     : 1/1
                index dsi name                  : TBL2_IX1_DSI
                  dsi access (read/ins/del/upd) : 300/0/0/0
[2] OUTPUT
    record number       : 300
############################### SQL TRACE END ################################

FETCH JOIN(ジョインされる側が実表)

(1) 制約アクセスモデルを利用して得られたレコードを取り出す。

(2) TBL2についてTABLE ALL SCANを行う。

(3) 結果データをアプリケーションに返却する。


[アクセスプランの出力例]

###################### SQL TRACE START 13:05:13 08/05 ########################
SQL statement :
SELECT/*ASSIST LEADING_TABLE(TBL1,TBL2)JOIN_RULE(FETCH)*/*FROM SCM1.TBL1,SCM1.
TBL2 WHERE TBL1.C2=TBL2.C2 AND TBL1.C2=1
Total Time   : 00:00:00(405)
==============================================================================
------------------------------------------------------------------------------
Section No   : 1
Section Time : 00:00:00(347)
------------------------------------------------------------------------------
[1] FETCH JOIN
    result record number : 300
       1) TABLE ACCESS
          table name                        : TBL1
            table access (read/ins/del/upd) : 10/0/0/0
          base dso name                     : TBL1_BASE_DSO
            dso access   (read/ins/del/upd) : 10/0/0/0
            dsi number   (access/total)     : 1/1
                base dsi name                   : TBL1_BASE_DSI
                  dsi access (read/ins/del/upd) : 10/0/0/0
          index dso name : TBL1_IX1_DSO
            dso access   (read/ins/del/upd) : 10/0/0/0
            dsi number   (access/total)     : 1/1
                index dsi name                  : TBL1_IX2_DSI
                  dsi access (read/ins/del/upd) : 10/0/0/0
       2) TABLE ACCESS
          table name                        : TBL2
            table access (read/ins/del/upd) : 300/0/0/0
          base dso name                     : TBL2_BASE_DSO
            dso access   (read/ins/del/upd) : 300/0/0/0
            dsi number   (access/total)     : 1/10
                base dsi name                   : TBL2_BASE_DSI
                  dsi access (read/ins/del/upd) : 300/0/0/0
[2] OUTPUT
    record number       : 300
############################### SQL TRACE END ################################

NESTED LOOP JOIN(実表を直接読み込んでジョインする)

(1) TBL1についてTABLE ALL SCANを行う。

(2) (1)のレコードごとに、TBL2についてTABLE ALL SCANを行う。

(3) 結果データをアプリケーションに返却する。


[SQL性能情報の出力例]

###################### SQL TRACE START 13:58:28 05/11 ########################
SQL statement :
SELECT*FROM SCM1.TBL1,SCM1.TBL2 WHERE TBL1.C1>TBL2.C1 AND TBL1.C2<10
Total Time   : 00:00:02(285)
==============================================================================
------------------------------------------------------------------------------
Section No   : 1
Section Time : 00:00:02(285)
------------------------------------------------------------------------------
[1] NESTED LOOP JOIN
    result record number : 1350
       1) TABLE ACCESS
          table name                        : TBL2
            table access (read/ins/del/upd) : 3000/0/0/0
          base dso name                     : TBL2_BASE_DSO
            dso access   (read/ins/del/upd) : 3000/0/0/0
            dsi number   (access/total)     : 1/1
                base dsi name                   : TBL2_BASE_DSI
                  dsi access (read/ins/del/upd) : 3000/0/0/0
       2) TABLE ACCESS table name           : TBL1
            table access (read/ins/del/upd) : 300000/0/0/0
          base dso name                     : TBL1_BASE_DSO
            dso access   (read/ins/del/upd) : 300000/0/0/0
            dsi number   (access/total)     : 1/1
                base dsi name                   : TBL1_BASE_DSI
                  dsi access (read/ins/del/upd) : 300000/0/0/0
[2] OUTPUT
    record number             : 1350
############################### SQL TRACE END ################################

UPDATE:探索

(1) インデックス検索と表データ取得により更新標的レコードを位置づける。

(上記の例では、インデックス検索と表データ取得のアクセスモデルを採用している)

(2) 表レコードを取得する。

(3) 表レコードのC3部分を更新する。

(4) 更新前のデータからインデックスの当該レコードを削除して、新しいレコードを挿入する。


[SQL性能情報の出力例]

###################### SQL TRACE START 14:58:58 05/11 ########################
SQL statement :
UPDATE SCM1.TBL1 SET C3='UPDATE'WHERE C1=1 AND C2<10
Total Time   : 00:00:00(114)
==============================================================================
------------------------------------------------------------------------------
Section No   : 1
Section Time : 00:00:00(009)
------------------------------------------------------------------------------
[1] TABLE ACCESS
    table name                        : TBL1
      table access (read/ins/del/upd) : 0/0/0/0
    base dso name                     : TBL1_BASE_DSO
      dso access   (read/ins/del/upd) : 0/0/0/0
      dsi number   (access/total)     : 0/1
    index dso name                    : TBL1_IX1_DSO
      dso access   (read/ins/del/upd) : 49/0/0/0
      dsi number   (access/total)     : 1/1
          index dsi name                  : TBL1_IX1_DSI
            dsi access (read/ins/del/upd) : 49/0/0/0
[2] SORT INSERT
    sort name           : SORT0001
    sort type           : ALL
    key length(byte)    : 12
    record length(byte) : 12
    record number       : 49
------------------------------------------------------------------------------
Section No   : 2
Section Time : 00:00:00(069)
------------------------------------------------------------------------------
[1] SORT SCAN
    sort name           : SORT0001
    sort type           : ALL
    record number       : 49
    used memory(kb)     : 64
    file size(kb)       : 0
    run(number/capacity): 0/0
    run merge           : 0
[2] TABLE ACCESS
    table name                        : TBL1
      table access (read/ins/del/upd) : 49/0/0/49
    base dso name                     : TBL1_BASE_DSO
      dso access   (read/ins/del/upd) : 49/0/0/49
      dsi number   (access/total)     : 1/1
          base dsi name                   : TBL1_BASE_DSI
            dsi access (read/ins/del/upd) : 49/0/0/49
    index dso name                    : TBL1_IX1_DSO
      dso access   (read/ins/del/upd) : 0/49/49/0
      dsi number   (access/total)     : 1/1
          index dsi name                  : TBL1_IX2_DSI
            dsi access (read/ins/del/upd) : 0/49/49/0
[3] OUTPUT
    record number       : 0
############################### SQL TRACE END ################################

UPDATE:位置づけ

(1) 現在カーソル位置のレコードをTABLE KEY SCANで位置づける。

(2) 表レコードを取得する。

(3) 表レコードのC3部分を更新する。

(4) 更新前のデータからインデックスの当該レコードを削除して、新しいレコードを挿入する。


[SQL性能情報の出力例]

###################### SQL TRACE START 14:59:53 05/11 ########################
SQL statement :
SELECT C4 FROM SCM1.TBL1 WHERE C1=1 AND C2<10
Total Time   : 00:00:00(101)
==============================================================================
------------------------------------------------------------------------------
Section No   : 1
Section Time : 00:00:00(001)
------------------------------------------------------------------------------
[1] TABLE ACCESS
    table name                        : TBL1
      table access (read/ins/del/upd) : 0/0/0/0
    base dso name                     : TBL1_BASE_DSO
      dso access   (read/ins/del/upd) : 0/0/0/0
      dsi number   (access/total)     : 0/1
    index dso name                    : TBL1_IX1_DSO
      dso access   (read/ins/del/upd) : 49/0/0/0
      dsi number   (access/total)     : 1/1
          index dsi name                  : TBL1_IX1_DSI
            dsi access (read/ins/del/upd) : 49/0/0/0
[2] SORT INSERT
    sort name           : SORT0001
    sort type           : ALL
    key length(byte)    : 12
    record length(byte) : 12
    record number       : 49
------------------------------------------------------------------------------
Section No   : 2
Section Time : 00:00:00(038)
------------------------------------------------------------------------------
[1] SORT SCAN
    sort name           : SORT0001
    sort type           : ALL
    record number       : 49
    used memory(kb)     : 64
    file size(kb)       : 0
    run(number/capacity): 0/0
    run merge           : 0
[2] TABLE ACCESS
    table name                        : TBL1
      table access (read/ins/del/upd) : 49/0/0/0
    base dso name                     : TBL1_BASE_DSO
      dso access   (read/ins/del/upd) : 49/0/0/0
      dsi number   (access/total)     : 1/1
          base dsi name                   : TBL1_BASE_DSI
            dsi access (read/ins/del/upd) : 49/0/0/0
[3] OUTPUT
    record number       : 49
==============================================================================
UPDATE CURSOR / DELETE CURSOR INFORMATION
------------------------------------------------------------------------------
Section No   : 1
Section Time : 00:00:00(051)
------------------------------------------------------------------------------
[1] TABLE ACCESS
    table name                        : TBL1
      table access (read/ins/del/upd) : 49/0/0/49
    base dso name                     : TBL1_BASE_DSO
      dso access   (read/ins/del/upd) : 49/0/0/49
      dsi number   (access/total)     : 1/1
          base dsi name                   : TBL1_BASE_DSI
            dsi access (read/ins/del/upd) : 49/0/0/49
    index dso name                    : TBL1_IX1_DSO
      dso access   (read/ins/del/upd) : 0/49/49/0
      dsi number (access/total)       : 1/1
          index dsi name                  : TBL1_IX2_DSI
            dsi access (read/ins/del/upd) : 0/49/49/0
############################### SQL TRACE END ################################

DELETE:探索

(1) 表の全件検索により更新標的レコードを位置づける。

(2) 表レコードを取得する。

(3) 表レコードを削除する。

(4) 更新前のデータからインデックスの当該レコードを削除する。


[SQL性能情報の出力例]

###################### SQL TRACE START 15:22:58 05/11 ########################
SQL statement :
DELETE FROM SCM1.TBL1 WHERE C4<DATE'2000-01-01'
Total Time   : 00:00:00(342)
==============================================================================
------------------------------------------------------------------------------
Section No   : 1
Section Time : 00:00:00(317)
------------------------------------------------------------------------------
[1] TABLE ACCESS
    table name                        : TBL1
      table access (read/ins/del/upd) : 300/0/150/0
    base dso name                     : TBL1_BASE_DSO
      dso access   (read/ins/del/upd) : 300/0/150/0
      dsi number   (access/total)     : 1/1
          base dsi name                   : TBL1_BASE_DSI
            dsi access (read/ins/del/upd) : 300/0/150/0
    index dso name                    : TBL1_IX1_DSO
      dso access   (read/ins/del/upd) : 0/0/150/0
      dsi number   (access/total)     : 1/1
          index dsi name                  : TBL1_IX1_DSI
            dsi access (read/ins/del/upd) : 0/0/150/0
    index dso name                    : TBL1_IX2_DSO
      dso access   (read/ins/del/upd) : 0/0/150/0
      dsi number   (access/total)     : 1/1
          index dsi name                  : TBL1_IX2_DSI
            dsi access (read/ins/del/upd) : 0/0/150/0
[2] OUTPUT
    record number       : 0
############################### SQL TRACE END ################################

DELETE:位置づけ

(1) 現在カーソル位置のレコードをTABLE KEY SCANで位置づける。

(2) 表レコードを取得する。

(3) 表レコードを削除する。

(4) 更新前のデータからインデックスの当該レコードを削除する。


[SQL性能情報の出力例]

###################### SQL TRACE START 15:21:16 05/11 ########################
SQL statement :
SELECT C4 FROM SCM1.TBL1 WHERE C4<DATE'2000-01-01'
Total Time   : 00:00:00(614)
==============================================================================
------------------------------------------------------------------------------
Section No   : 1
Section Time : 00:00:00(201)
------------------------------------------------------------------------------
[1] TABLE ACCESS
    table name                        : TBL1
      table access (read/ins/del/upd) : 300/0/0/0
    base dso name                     : TBL1_BASE_DSO
      dso access   (read/ins/del/upd) : 300/0/0/0
      dsi number   (access/total)     : 1/1
          base dsi name                   : TBL1_BASE_DSI
            dsi access (read/ins/del/upd) : 300/0/0/0
[2] OUTPUT
    record number       : 150
==============================================================================
UPDATE CURSOR / DELETE CURSOR INFORMATION
------------------------------------------------------------------------------
Section No   : 1
Section Time : 00:00:00(355)
------------------------------------------------------------------------------ 
[1] TABLE ACCESS
    table name                        : TBL1
      table access (read/ins/del/upd) : 150/0/150/0
    base dso name                     : TBL1_BASE_DSO
      dso access   (read/ins/del/upd) : 150/0/150/0
      dsi number   (access/total)     : 1/1
          base dsi name                   : TBL1_BASE_DSI
            dsi access (read/ins/del/upd) : 150/0/150/0
    index dso name                    : TBL1_IX1_DSO
      dso access   (read/ins/del/upd) : 0/0/150/0
      dsi number   (access/total)     : 1/1
          index dsi name                  : TBL1_IX1_DSI
            dsi access (read/ins/del/upd) : 0/0/150/0
    index dso name                    : TBL1_IX2_DSO
      dso access   (read/ins/del/upd) : 0/0/150/0
      dsi number   (access/total)     : 1/1
          index dsi name                  : TBL1_IX2_DSI
            dsi access (read/ins/del/upd) : 0/0/150/0
############################### SQL TRACE END ################################

INSERT(挿入値リストを指定したINSERT)

(1) 表のレコードを作成し、表に挿入する。

(2) インデックスのレコードを作成し、インデックスに挿入する。


[SQL性能情報の出力例]

###################### SQL TRACE START 15:40:38 05/11 ########################
SQL statement :
INSERT INTO SCM1.TBL1(C1,C2,C3,C4,C5)VALUES(1,1,'INSERT_REC',DATE'2000-01-10'
,1)
Total Time   : 00:00:00(002)
==============================================================================
------------------------------------------------------------------------------
Section No   : 1
Section Time : 00:00:00(002)
------------------------------------------------------------------------------
[1] TABLE ACCESS
    table name                        : TBL1
      table access (read/ins/del/upd) : 0/1/0/0
    base dso name                     : TBL1_BASE_DSO
      dso access   (read/ins/del/upd) : 0/1/0/0
      dsi number   (access/total)     : 1/1
          base dsi name                   : TBL1_BASE_DSI
            dsi access (read/ins/del/upd) : 0/1/0/0
    index dso name                    : TBL1_IX1_DSO
      dso access   (read/ins/del/upd) : 0/1/0/0
      dsi number   (access/total)     : 1/1
          index dsi name                  : TBL1_IX1_DSI
            dsi access (read/ins/del/upd) : 0/1/0/0
    index dso name                    : TBL1_IX2_DSO
      dso access   (read/ins/del/upd) : 0/1/0/0
      dsi number   (access/total)     : 1/1
          index dsi name                  : TBL1_IX2_DSI
            dsi access (read/ins/del/upd) : 0/1/0/0
[2] OUTPUT
    record number       : 0
############################### SQL TRACE END ################################