Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
1 | A CASE STUDY OF USING ORACLE DATABASE IN-MEMORY WITH ORACLE EBS ORDER MANAGEMENT
Table of Contents
Introduction.......................................................................................................................................................................................... 3
Setting up Database In-Memory for E-business suite.......................................................................................................................... 3
Order Management Use cases:............................................................................................................................................................. 3
Query from Order Organizer:...........................................................................................................................................................3
Observation:................................................................................................................................................................................. 6
Initialize Credit Summaries Table:...................................................................................................................................................6
Observation:................................................................................................................................................................................. 9
Order Import:................................................................................................................................................................................... 9
Observation:............................................................................................................................................................................... 13
2 | A CASE STUDY OF USING ORACLE DATABASE IN-MEMORY WITH ORACLE EBS ORDER MANAGEMENT
Introduction
The purpose of this white paper is to publish the results from various test cases performed on certain Order management use
cases after enabling In-Memory column store feature of Oracle database 12C. Three performance intensive use cases have been
selected for this case study and numerous tests have been performed by changing the data that is loaded into In-Memory column
store, keeping all other database parameters constant. This paper publishes the results of those tests and also provides
recommendations about what data needs to be loaded into In-Memory.
As is evident, these forms are exceptionally flexible, with several tabs as well as a huge number of fields that can be queried either
individually or collectively. While this degree of flexibility enables easy mapping to business functions, it will typically result in
performance issues if a user only queries a non-indexed column, or a column with poor selectivity. If the Order Organizer is always
used and queried in a particular way, associated indexes could be added. However, as mentioned earlier, adding indexes for
every queryable field to allow the maximum functionality is inadvisable due to the maintenance overhead. While it may speed up
queries in this form, it could have a significant negative impact on associated processes.
Having some fields indexed and others not may be perceived as inconsistent response times by users without the knowledge of
the underlying schema. A very common problem that we see is a user report that says “The system is slow today”. It may well be
the case that they actually ran a different set of queries using different combinations of fields, some of which are indexed and
some that are not. This is one of the main issues when an Oracle E-Business Suite user reports that the Order Organizer Find
Window occasionally “freezes”.
3| A CASE STUDY OF USING ORACLE DATABASE IN-MEMORY WITH ORACLE EBS ORDER MANAGEMENT
For the current use case we have chosen one such attribute “Shipment Priority(shipment_priority_code)” which is not an indexed
column in oe_order_lines_all table.
This run was performed without loading any tables/columns into in-memory.Total time taken by order organizer to query orders
based on shipment priority was 166.85 seconds and top most query took 142.04 seconds.
SELECT HEADER_ID
FROM
OE_ORDER_HEADERS OE_ORDER_HEADERS_V WHERE EXISTS (SELECT 'X' FROM
OE_ORDER_LINES OE_ORDER_LINES_V WHERE ( OE_ORDER_LINES_V.HEADER_ID=
OE_ORDER_HEADERS_V.HEADER_ID AND SHIPMENT_PRIORITY_CODE=
:SHIPMENT_PRIORITY_CODE))
4| A CASE STUDY OF USING ORACLE DATABASE IN-MEMORY WITH ORACLE EBS ORDER MANAGEMENT
In-Memory run with oe_order_lines_all and oe_order_headers_all loaded completely into in-memory
This run was performed after loading both oe_order_lines_all and oe_order_headers_all tables completely into in-memory. Total
time taken by order organizer to query orders based on shipment priority was3.86 seconds and top most query took 3.23
seconds.
SELECT HEADER_ID
FROM
OE_ORDER_HEADERS OE_ORDER_HEADERS_V WHERE EXISTS (SELECT 'X' FROM
OE_ORDER_LINES OE_ORDER_LINES_V WHERE ( OE_ORDER_LINES_V.HEADER_ID=
OE_ORDER_HEADERS_V.HEADER_ID AND SHIPMENT_PRIORITY_CODE=
:SHIPMENT_PRIORITY_CODE))
In-Memory run with 4 columns of oe_order_lines_all and full oe_order_headers_all loaded into
in-memory
This run was performed after loading 4 columns (Line_id, header_id, org_id and shipment_priority_code) of oe_order_lines_all
table, and complete oe_order_headers_all table into in-memory.Line_id from oe_order_lines_all has been loaded since it is the
primary key of oe_order_lines_all table and will help improve performance. Total time taken by order organizer to query orders
based on shipment priority was 0.67 seconds and top most query took 0 seconds.
SELECT HEADER_ID
FROM
OE_ORDER_HEADERS OE_ORDER_HEADERS_V WHERE EXISTS (SELECT 'X' FROM
OE_ORDER_LINES OE_ORDER_LINES_V WHERE ( OE_ORDER_LINES_V.HEADER_ID=
OE_ORDER_HEADERS_V.HEADER_ID AND SHIPMENT_PRIORITY_CODE=
:SHIPMENT_PRIORITY_CODE))
5| A CASE STUDY OF USING ORACLE DATABASE IN-MEMORY WITH ORACLE EBS ORDER MANAGEMENT
In-Memory run with 4 columns of oe_order_lines_all and 2 columns of oe_order_headers_all (only
where clause columns) into in-memory.
This run was performed after loading 4 columns(Line_id, header_id, org_id and shipment_priority_code) from oe_order_lines_all
table, which are part of where clause and 2 columns(Header_id and org_id) from oe_order_headers_all, which are part of where
clause into in-memory Total time taken by order organizer to query orders based on shipment priority was0.77 seconds and top
most query took 0.05 seconds.
SELECT HEADER_ID
FROM
OE_ORDER_HEADERS OE_ORDER_HEADERS_V WHERE EXISTS (SELECT 'X' FROM
OE_ORDER_LINES OE_ORDER_LINES_V WHERE ( OE_ORDER_LINES_V.HEADER_ID=
OE_ORDER_HEADERS_V.HEADER_ID AND SHIPMENT_PRIORITY_CODE=
:SHIPMENT_PRIORITY_CODE))
Observation:
Based on the above test case results we see that minimum time was taken by order organizer whenoe_order_headers_all is loaded
completely into in-memory and where clause columns from oe_order_lines_all are loaded into in-memory (.67 seconds). However
time taken was almost same (.77seconds) when only where clause columns from bothoe_order_lines_all and oe_order_headers_all
tables are loaded into in-memory. Since the difference in time is minimal and since loading just two columns from
oe_order_headers_all into in-memory consumes much less in-memory space compared to loading completeoe_order_headers_all
into in-memory, it is recommended to load only where clause columns into in-memory. If space is not a constraint, then full
oe_order_headers_all table can be loaded as well.
6| A CASE STUDY OF USING ORACLE DATABASE IN-MEMORY WITH ORACLE EBS ORDER MANAGEMENT
Baseline Run: With no tables loaded into in-memory:
This run was performed without loading any tables/columns into in-memory.Total time taken by the program was 1877.17
seconds and top most query took 792.75 seconds.
7| A CASE STUDY OF USING ORACLE DATABASE IN-MEMORY WITH ORACLE EBS ORDER MANAGEMENT
INSERT INTO OE_INIT_CREDIT_SUMM_GTT (LINE_ORDERED_QUANTITY ,
LINE_UNIT_SELLING_PRICE, ORDER_INVOICE_TO_ORG_ID, RL_AMOUNT,
RL_QUANTITY_ORDERED, ORDER_ORG_ID , ORDER_TRANSACTIONAL_CURR_CODE,
LINE_SCHEDULE_SHIP_DATE , LINE_REQUEST_DATE , ORDER_REQUEST_DATE,
.
.
FROM OE_ORDER_LINES_ALL L , OE_ORDER_HEADERS_ALL
H , HZ_CUST_SITE_USES_ALL SU , HZ_CUST_ACCT_SITES_ALL S , HZ_CUST_ACCOUNTS
CA , HZ_CUST_SITE_USES_ALL SU_L , HZ_CUST_ACCT_SITES_ALL S_L ,
HZ_CUST_ACCOUNTS CA_L , RA_INTERFACE_LINES_ALL RL WHERE H.HEADER_ID =
L.HEADER_ID AND H.BOOKED_FLAG = 'Y' AND RL.ORIG_SYSTEM_BILL_CUSTOMER_ID =
CA.CUST_ACCOUNT_ID AND NVL(RL.INTERFACE_STATUS, '~') <> 'P' AND
RL.INTERFACE_LINE_CONTEXT = 'ORDER ENTRY' AND RL.INTERFACE_LINE_ATTRIBUTE1 =
H.ORDER_NUMBER AND NVL( L.INVOICED_QUANTITY, 0 ) <> 0 AND SU.SITE_USE_ID =
H.INVOICE_TO_ORG_ID AND SU.CUST_ACCT_SITE_ID = S.CUST_ACCT_SITE_ID AND
CA.CUST_ACCOUNT_ID = S.CUST_ACCOUNT_ID AND SU_L.SITE_USE_ID =
L.INVOICE_TO_ORG_ID AND SU_L.CUST_ACCT_SITE_ID = S_L.CUST_ACCT_SITE_ID AND
CA_L.CUST_ACCOUNT_ID = S_L.CUST_ACCOUNT_ID AND EXISTS ( SELECT /*+
no_unnest */ NULL FROM OE_PAYMENT_TYPES_ALL T WHERE T.CREDIT_CHECK_FLAG =
'Y' AND NVL(T.ORG_ID,-99) = NVL(H.ORG_ID, -99) AND L.PAYMENT_TYPE_CODE IS
NOT NULL AND T.PAYMENT_TYPE_CODE = L.PAYMENT_TYPE_CODE UNION ALL SELECT /*+
no_unnest */ NULL FROM OE_PAYMENT_TYPES_ALL T WHERE T.CREDIT_CHECK_FLAG =
'Y' AND NVL(T.ORG_ID,-99) = NVL(H.ORG_ID, -99) AND L.PAYMENT_TYPE_CODE IS
NULL AND H.PAYMENT_TYPE_CODE IS NOT NULL AND T.PAYMENT_TYPE_CODE =
H.PAYMENT_TYPE_CODE UNION ALL SELECT /*+ no_unnest */ NULL FROM
OE_PAYMENT_TYPES_ALL T WHERE T.CREDIT_CHECK_FLAG = 'Y' AND NVL(T.ORG_ID,-99)
= NVL(H.ORG_ID, -99) AND L.PAYMENT_TYPE_CODE IS NULL AND
H.PAYMENT_TYPE_CODE IS NULL )
OE_PRICE_ADJUSTMENTS CREDIT_OR_CHARGE_FLAG,ARITHMETIC_OPERATOR,OPERAND,APPLIED_FLAG,
HEADER_ID,LINE_ID,PRICE_ADJUSTMENT_ID,ADJUSTED_AMOUNT,PARENT_ADJ
USTMENT_ID, LIST_LINE_TYPE_CODE
OE_ORDER_LINES_ALL ORDERED_QUANTITY,UNIT_SELLING_PRICE,SCHEDULE_SHIP_DATE,REQUEST_D
ATE,TAX_LINE_VALUE,TAX_VALUE,shipment_priority_code,INVOICE_TO_ORG_ID,LI
NE_CATEGORY_CODE,INVOICED_QUANTITY,PAYMENT_TYPE_CODE,LINE_ID,HE
ADER_ID,ORG_ID,OPEN_FLAG,CHARGE_PERIODICITY_CODE,CANCELLED_FLAG
OE_PAYMENT_TYPES_ALL ORG_ID,PAYMENT_TYPE_CODE,CREDIT_CHECK_FLAG
OE_ORDER_HEADERS_ALL INVOICE_TO_ORG_ID,HEADER_ID,BOOKED_FLAG,ORDER_NUMBER,ORG_ID,PAY
MENT_TYPE_CODE,TRANSACTIONAL_CURR_CODE,REQUEST_DATE,CREATION_D
ATE,ORDER_CATEGORY_CODE
HZ_CUST_SITE_USES_ALL SITE_USE_ID,CUST_ACCT_SITE_ID
HZ_CUST_ACCT_SITES_ALL CUST_ACCOUNT_ID,CUST_ACCT_SITE_ID
RA_INTERFACE_LINES_ALL ORIG_SYSTEM_BILL_CUSTOMER_ID,INTERFACE_STATUS,INTERFACE_LINE_CON
TEXT,INTERFACE_LINE_ATTRIBUTE1,INTERFACE_LINE_ATTRIBUTE6,QUANTITY_
ORDERED,AMOUNT,INTERFACE_LINE_ATTRIBUTE11
8| A CASE STUDY OF USING ORACLE DATABASE IN-MEMORY WITH ORACLE EBS ORDER MANAGEMENT
INSERT INTO OE_INIT_CREDIT_SUMM_GTT (LINE_ORDERED_QUANTITY ,
LINE_UNIT_SELLING_PRICE, ORDER_INVOICE_TO_ORG_ID, RL_AMOUNT,
RL_QUANTITY_ORDERED, ORDER_ORG_ID , ORDER_TRANSACTIONAL_CURR_CODE,
LINE_SCHEDULE_SHIP_DATE , LINE_REQUEST_DATE , ORDER_REQUEST_DATE,
.
.
FROM OE_ORDER_LINES_ALL L , OE_ORDER_HEADERS_ALL
H , HZ_CUST_SITE_USES_ALL SU , HZ_CUST_ACCT_SITES_ALL S , HZ_CUST_ACCOUNTS
CA , HZ_CUST_SITE_USES_ALL SU_L , HZ_CUST_ACCT_SITES_ALL S_L ,
HZ_CUST_ACCOUNTS CA_L , RA_INTERFACE_LINES_ALL RL WHERE H.HEADER_ID =
L.HEADER_ID AND H.BOOKED_FLAG = 'Y' AND RL.ORIG_SYSTEM_BILL_CUSTOMER_ID =
CA.CUST_ACCOUNT_ID AND NVL(RL.INTERFACE_STATUS, '~') <> 'P' AND
RL.INTERFACE_LINE_CONTEXT = 'ORDER ENTRY' AND RL.INTERFACE_LINE_ATTRIBUTE1 =
H.ORDER_NUMBER AND NVL( L.INVOICED_QUANTITY, 0 ) <> 0 AND SU.SITE_USE_ID =
H.INVOICE_TO_ORG_ID AND SU.CUST_ACCT_SITE_ID = S.CUST_ACCT_SITE_ID AND
CA.CUST_ACCOUNT_ID = S.CUST_ACCOUNT_ID AND SU_L.SITE_USE_ID =
L.INVOICE_TO_ORG_ID AND SU_L.CUST_ACCT_SITE_ID = S_L.CUST_ACCT_SITE_ID AND
CA_L.CUST_ACCOUNT_ID = S_L.CUST_ACCOUNT_ID AND EXISTS ( SELECT /*+
no_unnest */ NULL FROM OE_PAYMENT_TYPES_ALL T WHERE T.CREDIT_CHECK_FLAG =
'Y' AND NVL(T.ORG_ID,-99) = NVL(H.ORG_ID, -99) AND L.PAYMENT_TYPE_CODE IS
NOT NULL AND T.PAYMENT_TYPE_CODE = L.PAYMENT_TYPE_CODE UNION ALL SELECT /*+
no_unnest */ NULL FROM OE_PAYMENT_TYPES_ALL T WHERE T.CREDIT_CHECK_FLAG =
'Y' AND NVL(T.ORG_ID,-99) = NVL(H.ORG_ID, -99) AND L.PAYMENT_TYPE_CODE IS
NULL AND H.PAYMENT_TYPE_CODE IS NOT NULL AND T.PAYMENT_TYPE_CODE =
H.PAYMENT_TYPE_CODE UNION ALL SELECT /*+ no_unnest */ NULL FROM
OE_PAYMENT_TYPES_ALL T WHERE T.CREDIT_CHECK_FLAG = 'Y' AND NVL(T.ORG_ID,-99)
= NVL(H.ORG_ID, -99) AND L.PAYMENT_TYPE_CODE IS NULL AND
H.PAYMENT_TYPE_CODE IS NULL )
Observation:
For initialize credit summaries program, loading just columns used in where and select clauses from the tables involved
proved to be more performance friendly that loading full tables into in-memory. So it is recommended to load only
columns into in-memory instead of full tables.
Order Import:
Order Import is an Order Management Open Interface that consists of open interface tables and a set of APIs. Order
Import can import new, changed, and completed sales orders or returns from other applications such as a legacy system.
The orders may come from any source such as EDI transactions that are processed by the Oracle e-Commerce
Gateway or internal orders created for internal requisitions developed in Oracle Purchasing or returns. Order Import
features include validation and defaulting, processing constraint checks, applying and releasing of order holds, scheduling
of shipments, then ultimately inserting, updating or deleting the orders in the base Order Management tables. Order
Management checks all the data during the import process to ensure its validity within Order Management. Valid
transactions are then converted into orders with lines, reservations, price adjustments, and sales credits in the base Order
Management tables. Most customers import huge volumes of data using this program and if lots of orders are being
imported, this program can take a lot of time to complete. We have seen lot of issues till date where customer reported that
Order Import program takes more than 10 hours to complete.
In the current case study Order Import has been run to import 10000 lines.
9| A CASE STUDY OF USING ORACLE DATABASE IN-MEMORY WITH ORACLE EBS ORDER MANAGEMENT
SELECT 'N'
FROM
OE_ORDER_LINES L WHERE L.LINE_NUMBER = :B3 AND L.HEADER_ID = :B2 AND
L.LINE_ID <> :B1 AND ( L.ITEM_TYPE_CODE = 'STANDARD' OR (
L.TOP_MODEL_LINE_ID = L.LINE_ID AND L.ITEM_TYPE_CODE = 'MODEL'))
SELECT 'N'
FROM
OE_ORDER_LINES L WHERE L.LINE_NUMBER = :B3 AND L.HEADER_ID = :B2 AND
L.LINE_ID <> :B1 AND ( L.ITEM_TYPE_CODE = 'STANDARD' OR (
L.TOP_MODEL_LINE_ID = L.LINE_ID AND L.ITEM_TYPE_CODE = 'MODEL'))
After the tables are loaded into in-memory total time taken by Order Import program to import 10000 lines was3170.99 seconds
and top most query took 326.46 seconds. This performance degradation is likely due to limited system resources to
accommodate a large number of table rows and columns stored in-memory.
SELECT 'N'
FROM
OE_ORDER_LINES L WHERE L.LINE_NUMBER = :B3 AND L.HEADER_ID = :B2 AND
L.LINE_ID <> :B1 AND ( L.ITEM_TYPE_CODE = 'STANDARD' OR (
L.TOP_MODEL_LINE_ID = L.LINE_ID AND L.ITEM_TYPE_CODE = 'MODEL'))
11| A CASE STUDY OF USING ORACLE DATABASE IN-MEMORY WITH ORACLE EBS ORDER MANAGEMENT
It should also be noted that one particular query which took 2.72 seconds in baseline run took 134.76 seconds after
loading tables into in-memory
Baseline Query:
********************************************************************************
In-Memory Run:
12| A CASE STUDY OF USING ORACLE DATABASE IN-MEMORY WITH ORACLE EBS ORDER MANAGEMENT
Observation:
It is not recommended to go for in-memory column store for Order Import. Order Import performs lots of row by row
processing and in cases where row by row processing is predominant loading tables/columns into in-memory column store
does not prove to be beneficial.
13| A CASE STUDY OF USING ORACLE DATABASE IN-MEMORY WITH ORACLE EBS ORDER MANAGEMENT
Orac
Worldwide Inquiries
Phone: +1.650.506.7000
Fax: +1.650.506.7200
Corporation, World Headquarters
500 Oracle Parkway
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. This document is provided for information purposes only, and the
contents hereof are subject to change without notice. This document is not warranted to be error-free, nor subject to any other
warranties or conditions, whether expressed orally or implied in law,including implied warranties and conditions of merchantability or
fitness for a particular purpose. We specifically disclaim any liability with respect to this document, and no contractual obligations are
formed either directly or indirectly by this document. This document may not be reproduced or transmitted in any form or by any means,
electronic or mechanical, for any purpose, without our prior written permission.
Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.
Intel and Intel Xeon are trademarks or registered trademarks of Intel Corporation. All SPARC trademarks are used under license and
are trademarks or registered trademarks of SPARC International, Inc. AMD,Opteron, the AMD logo, and the AMD Opteron logo are
trademarks or registered trademarks of Advanced Micro Devices. UNIX is a registeerd trademark of The Open Group.0115
A case study of using Oracle database In-Memory with Oracle EBS Order Management
July 2015
Authors: Suneela Pothula
Contributing Authors: Rakesh Moharana, Srecko Bartl
CONNECT WITH US
blogs.oracle.com/oracle
facebook.com/oracle
twitter.com/oracle
oracle.com
14| A CASE STUDY OF USING ORACLE DATABASE IN-MEMORY WITH ORACLE EBS ORDER MANAGEMENT
15| A CASE STUDY OF USING ORACLE DATABASE IN-MEMORY WITH ORACLE EBS ORDER MANAGEMENT