TAFJ-DB Performance
TAFJ-DB Performance
TAFJ-DB Performance
R20
TAFJ-DB P e rf o r m a n c e
Amendment History:
Revisio
Date Amended Name Description
n
Page 2
TAFJ-DB P e rf o r m a n c e
Copyri g h t
Copyright © Temenos Headquarters SA 2009-2020. All rights reserved.
This document contains proprietary information that is protected by copyright. No part of this document may
be reproduced, transmitted, or made available directly or indirectly to a third party without the express
written agreement of TEMENOS UK Limited. Receipt of this material directly TEMENOS UK Limited
constitutes its express permission to copy. Permission to use or copy this document expressly excludes
modifying it for any purpose, or using it to create a derivative therefrom.
Temenos Headquarters SA
2 Rue de l’Ecole-de-Chimie,
CH - 1205 Geneva,
Switzerland
Please include your name, company, address, and telephone and fax numbers, and email
address if applicable. [email protected]
Page 3
TAFJ-DB P e rf o r m a n c e
Table of Contents
Copyright................................................................................................................................................ 3
Errata and Comments............................................................................................................................ 3
TAFJ Promoted Columns....................................................................................................................... 5
Introduction............................................................................................................................ 5
Promoting Columns for SQLServer example........................................................................ 5
Promoting Columns for DB2 example................................................................................... 5
Promoting Columns for Oracle example............................................................................... 6
Drop and Recreate the Views (All Databases)...................................................................... 6
USE CASE.......................................................................................................................... 10
Jql.................................................................................................................................... 10
Sql translation.................................................................................................................. 10
Alter Table for each multi-value....................................................................................... 10
Create Indexes for each new column.............................................................................. 10
Recreate the view with new columns............................................................................... 11
Change query.................................................................................................................. 13
JDBC Fetch size setup......................................................................................................................... 14
Goal..................................................................................................................................... 14
Oracle.................................................................................................................................. 14
Weblogic.......................................................................................................................... 14
JBoss............................................................................................................................... 15
Webpshere...................................................................................................................... 16
MSSQL................................................................................................................................ 17
DB2..................................................................................................................................... 18
Tuning DB2 Connect by Increasing the I/O Block Size................................................... 18
Page 4
TAFJ-DB P e rf o r m a n c e
returns INTEGER
Page 5
TAFJ-DB P e rf o r m a n c e
add (
);
Page 6
TAFJ-DB P e rf o r m a n c e
This is a DB2 example only for recreating the view to use the new column RANK.
,a.RECID "CURRENCY_CODE"
,RANK "RANK"
Page 7
TAFJ-DB P e rf o r m a n c e
Page 8
TAFJ-DB P e rf o r m a n c e
Page 9
TAFJ-DB P e rf o r m a n c e
FROM
"FBNK_CURRENCY" a
Page 10
TAFJ-DB P e rf o r m a n c e
USE CASE
Here is an advanced example with column SCRIPT.GROUP a multi-value column
Jql
SELECT F.SEAT.SCRIPTS WITH SCRIPT.STATUS EQ 'ACTIVE' AND WITH SCRIPT.GROUP EQ
'TB01- START'
Sql tran s l a t i o n
SELECT RECID FROM "TAFJV_F_SEAT_SCRIPTS" WHERE "SCRIPT_STATUS" = 'ACTIVE' and
( XMLEXISTS('$t/c 1 0[ t ex t() = " TB0 1- START"]' PASSING "SCRIPT_GROUP_10" as "t") )
The above cre a t e s a full table scan. Her e is one way to index it.
Page 11
TAFJ-DB P e rf o r m a n c e
,a.RECID "SCRIPT_ID"
,SCRIPT_GROUP_N "SCRIPT_GROUP_10"
,SCRIPT_GROUP_1
,SCRIPT_GROUP_2
,SCRIPT_GROUP_3
,SCRIPT_GROUP_4
,SCRIPT_GROUP_5
Page 12
TAFJ-DB P e rf o r m a n c e
Page 13
TAFJ-DB P e rf o r m a n c e
FROM
"F_SEAT_SCRIPTS" a
Cha n g e qu ery
Page 14
TAFJ-DB P e rf o r m a n c e
This parameter could make a significant difference in terms of performance and round trip
between application and database.
For example if the number of rows to be transferred is 1000 and the fetch size is 10, 100
network round trip are required where it would be only 10 with a fetch size of 100, which
would be most likely 10 times faster.
Although not supported by all JDBC drivers, this parameter could be defined
programmatically on the statement or result set object.
Our goal is to define it by configuration at application server level, more specifically at data
source connection level. However memory usage has to be considered as bigger the fetch
size at connection level is, bigger the memory usage will be at JDBC layer client level.
Oracl e
The default oracle driver fetch size is 10.
Web l o g i c
It has to be done at connection level in the custom property section.
Page 15
TAFJ-DB P e rf o r m a n c e
Scripting
if (dbDriver.startswith('oracle')):
cd('/JDBCSystemResources/T24/JDBCResource/T24/JDBCDriverParams/T24/Properties/T24')
cmo.createProperty('defaultRowPrefetch')
cd('/JDBCSystemResources/T24/JDBCResource/T24/JDBCDriverParams/T24/Properties/T24
/Properties/defaultRowPrefetch')
cmo.unSet('SysPropValue')
cmo.unSet('EncryptedValue')
cmo.setValue('100')
JBos s
i.e.
<connection-url>jdbc:oracle:thin:@localhost:1521:R15</connection-url>
Page 16
TAFJ-DB P e rf o r m a n c e
<driver>ora12c</driver>
<connection-property name="defaultRowPrefetch">100</connection-property>
Scripting
/subsystem=datasources/data-source=t24DS/connection-
properties=defaultRowPrefetch:add(value="100")
Web p s h e r e
Set a connectionProperties named defaultRowPrefetch at data source custom property
level.
Data sources > TAFJ XA ORACLE Data source > Custom properties
Scripting
AdminConfig.create('J2EEResourceProperty',Datasource_props,[["name", "connectionProperties"],
["type","java.lang.String"],["value","defaultRowPrefetch=100"],["required","false"]])
Page 17
TAFJ-DB P e rf o r m a n c e
MS SQL
MSSQL driver is not supporting the fetch size setup and is returning all rows.
To avoid returning all rows, the default selectMethod should be changed from direct to
cursor or create a statement as specified below.
https://technet.microsoft.com/en-us/library/aa342344(SQL.90).aspx
Consider using the setMaxRows method (or SET ROWCOUNT or SELECT TOP N SQL syntax) to
limit the number of rows returned from potentially large result sets. If you must deal with large result
sets, consider using a server cursor by setting the connection string property selectMethod=cursor.
Alternatively, you can create the statement with
com.microsoft.sqlserver.jdbc.SQLServerResultSet.TYPE_SS_SERVER_CURSOR_FORWARD_ONL
Y (2004) scrollability for forward-only, read-only access, and then use the setFetchSize method to tune
performance.
Page 18
TAFJ-DB P e rf o r m a n c e
DB 2
DB2 is using a default fetch size of 32KB and not a number of row.
https://docs.oracle.com/cd/B40099_02/books/ImpAppsDB2390/ImpAppsDB2390_ImpPrep15
.html
The RQRIOBLK database manager configuration parameter specifies the maximum size of the client I/O blocks used to
store the results of queries sent by a database client to a remote database.
To ensure that database queries which return large blocks of data do not cause DB2 Connect users to experience long
response times, you can change the value of the client RQRIOBLK database manager configuration parameter.
The default value for the RQRIOBLK parameter on DB2 Connect is 32 KB and the maximum size is 65 KB. DB2 for
z/OS V8 can support up to 10MB cursor blocks. If you are using DB2 for z/OS V8, you can increase the value of the
RQRIOBLK parameter to 65 KB and so improve performance.
Using the Command Line Processor, change the RQRIOBLK size by typing the following:
Note
http://www.ibm.com/support/knowledgecenter/ssw_i5_54/rzaha/conprop.htm
block 0, 8, 16, This is the number of rows that are fetched at a time for a result set. For typical
size 32, 64, forward-only processing of a result set, a block of this size is obtained. Then the
128, 256, database is not accessed because each row is processed by your application. The
512 database requests another block of data only when the end of the block is reached.
This value is only used if the blocking enabled property is set to true.
Setting the block size property to 0 has the same effect as setting the blocking
enabled property to false.
The default is to use blocking with a block size of 32. This is a fairly arbitrary
decision and the default could change in the future.
Page 19