Home skin

 

  Location : TOP > Usage for TG ver 0.7X
> Sample Transaction
 

 

 

 
 

- Step1 Preparation
- Step2 Load "SMPL_TRANS_OLTPvX.X.tgp"
- Step3 Create a sample schema and dummy data
- Step4 Start transactions
- Step5 Check performance
- Step6 Stop transactions
- Step7 Drop a sample schema

 
     
   >> TOP  

 

 

 

 

 

 

This chapter explains how to use the sample configuration - SMPL_TRANS_OLTPvX.X.tgp - which is attached with TG version 0.60 later. This sample is composed by a very simple object and SQL statements considering the transaction of the OLTP system.

 

  Step1 - Preparation -

In the begining, verify that your target database server meets the following requirements. If there is something not satisfied, change your database parameter or correct the sample configration for your system.

 
※CONFIGRATION FOR THE SAMPLE TRANSACTION
Database server IP address
192.168.1.100
SID name
testdb
Listener port number
1521
Password for SYSTEM database user
manager
Specified tablespace exists and has a enough space
USERS
Specified temporary tablespace exists and has a enough space
TEMP
 

 

  Step2 - Load the configration "SMPL_TRANS_OLTPvX.X.tgp" -

Startup TGC.

 
※ COMMAND-LINE SAMPLE
C:\> cd tg07X
C:\tg07X> tgc
 

 

Load the sample configration file. Click "File" menu and select "Open". To the next, choose "SMPL_TRANS_OLTPvX.X.tgp" file on the "Open" window.

 
 

 

  Step3 - Create a sample schema and dummy data -

Create a sample schema for the sample transaction. Click "Jobs" menu and select "Execute specified Job", execute "1. BUILD_SCHEMA" Job.

 
 

When specified job has completed successfully, following objects are created.

 
※OBJECTS
database user
TEST
Table x 3
ITEMLIST
ORDERCOUNT
ORDERLIST
Sequence
SEQ_ORDER_ID
 

 

To the next, create a dummy data. Click "Jobs" menu and select "Execute specified Job", execute "2. GENERATE_DATA" Job.

 
 

When specified job has completed successfully, 50000 dummy records are inserted into the "ITEMLIST" and "ORDERCOUNT" table. It may take a few minutes depending on your database server.

 

Finally, Create a indexes. Click "Jobs" menu and select "Execute specified Job", execute "3. BUILD_INDEXES" Job. It may also take a few minutes.

 
 

 

  Step4 - Start transactions -

Click "Agent" menu on the main window of TGC and select "Make agnets connect to database". You can make agents connect to the target database.

 
 

 

To the next, Click "Agent" menu and select "Activate agents". You can begin to put load (agents send SQL requests) on the database server.

 
 

 

The sample transaction is composed with following two kinds of SQL statements. Transaction "VIEW_ITEMS" is executed at 90% and "ORDER" is at 10%.

 

TRANSACTION NAME

RATIO

SQL
VIEW_ITEMS
90%
select * from ITEMLIST
where CATEGORY = :VAL_CATEGORY;
ORDER
10%
insert into ORDERLIST values
(SEQ_ORDER_ID.nextval,
:VAL_ITEM_ID,
sysdate);
update ORDERCOUNT
set ORDER_COUNT = ORDER_COUNT + 1
where ITEM_ID = :VAL_ITEM_ID;
commit;

 

 

The above ":VAL_CATEGORY" and ":VAL_ITEM_ID" are random variables. The range of the value is as follows.

 

VARIABLE NAME

RANGE
:VAL_CATEGORY
1 - 1000
:VAL_ITEM_ID
1 - 50000

 

 

  Step5 - Check performance -

You can confirm the transaction statistics. Click "Monitor" menu and select "Monitoring start > show summary".

 
 

 

The status of transaction execution is displayed on the "TG Console" window. The value of "TPS:" on the righ edge is a number of execution of the transaction per second.

 

TG> Monitoring start. [ 600 Seconds ]
04:22:31 AgS:ACTV Act:20/20 SES:20/20 ErD:0/20 ERR:0 TPS:96
04:22:32 AgS:ACTV Act:20/20 SES:20/20 ErD:0/20 ERR:0 TPS:52
04:22:33 AgS:ACTV Act:20/20 SES:20/20 ErD:0/20 ERR:0 TPS:118
04:22:34 AgS:ACTV Act:20/20 SES:20/20 ErD:0/20 ERR:0 TPS:84
04:22:37 AgS:ACTV Act:20/20 SES:20/20 ErD:0/20 ERR:0 TPS:187
04:22:38 AgS:ACTV Act:20/20 SES:20/20 ErD:0/20 ERR:0 TPS:84
04:22:39 AgS:ACTV Act:20/20 SES:20/20 ErD:0/20 ERR:0 TPS:101
04:22:41 AgS:ACTV Act:20/20 SES:20/20 ErD:0/20 ERR:0 TPS:106

 

 

The monitoring will end after five minutes by default. The value of "Average TPS:" is average of TPS in five minutes.

 

04:25:31 AgS:ACTV Act:20/20 SES:20/20 ErD:0/20 ERR:0 TPS:96
04:25:32 AgS:ACTV Act:20/20 SES:20/20 ErD:0/20 ERR:0 TPS:52
04:27:31 AgS:ACTV Act:20/20 SES:20/20 ErD:0/20 ERR:0 TPS:118
Monitoring start : Tue May 09 04:22:31 JST 2006
Monitoring end : Tue May 09 04:27:31 JST 2006
Average TPS : 107.0 (Total transaction count : 64200 / monitoring time : 600)

TG>

 

When you stop the monitoring forcely, Click "Monitor" menu and select "Monitoring stop forcely". When you change the monitoring period, select "Specify monitoring period" and input (in millisecond) the value.

 

  Step6 - Stop transactions -

When you stop the transaction, Click "Agent" menu and select "Freeze agents".

 
 

 

And, Click "Agent" menu and select "Make agents disconnect from database".

 
 

 

  Step7 - Drop a sample schema -

If you want to drop sample data and objects, Click "Jobs" menu and select "Execute specified Job", execute "4. DROP_SCHEMA" Job.

 
 

     
  >> TOP > Usage for TG ver 0.7X
> Sample transaction
 

 

Copyright 2003 - 2008 tgmstr. All rights reserved.