株式会社コーソル

コーソルDatabaseエンジニアのブログ

技術ブログ

lotspios.sql from TPT Scripts : Generate Lots of Physical IOs for testing purposes

このエントリは (全部俺) Oracle ACE Director Tanel Poder Advent Calendar 2013 8日目の記事です。 http://co-sol.jp/techdb/2013/12/advanced-oracle-troubleshooting-guide-part-2-no-magic-is-needed-systematic-approach-will-do-ja.html で使われていたlotspios.sqlについて説明を記載します。

大量のテーブルに対して

select /*+ FULL(t) */ count(*) from >owner<.>tabname<;
というSQLを実行して、大量の物理I/Oを発生させます。

アクセス対象となる表は、以下のfor文でリストされる表です。(改行を入れて整形しています)

for t in (select owner, table_name from all_tables 
            where owner = 'TANEL' ←★
              and (owner,table_name) not in (select owner,table_name from all_external_tables)) 
loop

特にスクリプトを修正していない場合、'TANEL'スキーマ内の外部表以外の表が対象となります。適宜★の箇所を修正すべきでしょう。

プロフィール

On7tWW6m1Ul4

渡部 亮太

・Oracle ACE
・AWS Certified Solutions Architect - Associate
・ORACLE MASTER Platinum Oracle Database 11g, 12c 他多数

カテゴリー

アーカイブ