プライマリ・コンテンツに移動
Oracle® Database Testingガイド
12cリリース1 (12.1)
B71349-07
目次へ移動
目次
索引へ移動
索引

前
次

14.3 例: ワークロード・インテリジェンスの結果

この項では、ワークロード・インテリジェンスがSwingbench(Oracle Databaseのストレス・テストに使用されるベンチマーク)で生成された取得ワークロードに対して使用されているシナリオを想定しています。

ワークロード・インテリジェンスで検出された最も有意なパターンは、次の6つのテンプレートのものです。

SELECT product_id, product_name, product_description, category_id, weight_class,
       supplier_id, product_status, list_price, min_price, catalog_url
  FROM product_information
 WHERE product_id = :1;
SELECT p.product_id, product_name, product_description, category_id, weight_class,
       supplier_id, product_status, list_price, min_price, catalog_url,
       quantity_on_hand, warehouse_id
  FROM product_information p, inventories i
 WHERE i.product_id = :1 and i.product_id = p.product_id;
INSERT INTO order_items (order_id, line_item_id, product_id, unit_price, quantity)
     VALUES (:1, :2, :3, :4, :5);
UPDATE orders
   SET order_mode = :1, order_status = :2, order_total = :3
 WHERE order_id = :4;
SELECT /*+ use_nl */ o.order_id, line_item_id, product_id, unit_price, quantity,
       order_mode, order_status, order_total, sales_rep_id, promotion_id,
       c.customer_id, cust_first_name, cust_last_name, credit_limit, cust_email
  FROM orders o, order_items oi, customers c
 WHERE o.order_id = oi.order_id
   AND o.customer_id = c.customer_id
   AND o.order_id = :1;
UPDATE inventories
   SET quantity_on_hand = quantity_on_hand - :1
 WHERE product_id = :2
   AND warehouse_id = :3;

このパターンは、製品の注文でよく行われるユーザー・アクションに対応します。この例で特定されたパターンは222,261回(または実行の合計数の約8.21%)実行され、DB時間は58,533.70秒(または合計DB時間の約11.21%)消費されました。

この例で、ワークロード・インテリジェンスでは、次の4つのテンプレートの別の有意なパターンも検出しています。

SELECT customer_seq.nextval
  FROM dual;
INSERT INTO customers (customer_id, cust_first_name, cust_last_name, nls_language,
                       nls_territory, credit_limit, cust_email, account_mgr_id)
     VALUES (:1, :2, :3, :4, :5, :6, :7, :8);
INSERT INTO logon
     VALUES (:1, :2);
SELECT customer_id, cust_first_name, cust_last_name, nls_language, nls_territory,
       credit_limit, cust_email, account_mgr_id
  FROM customers
 WHERE customer_id = :1;

このパターンは、新しい顧客アカウントの作成とその後のシステムへのログインに対応します。この例で特定されたパターンは90,699回(または実行の合計数の約3.35%)実行され、DB時間は17,484.97秒(または合計DB時間の約3.35%)消費されました。