Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1788844
  • 博文数量: 335
  • 博客积分: 4690
  • 博客等级: 上校
  • 技术积分: 4341
  • 用 户 组: 普通用户
  • 注册时间: 2010-05-08 21:38
个人简介

无聊之人--除了技术,还是技术,你懂得

文章分类

全部博文(335)

文章存档

2016年(29)

2015年(18)

2014年(7)

2013年(86)

2012年(90)

2011年(105)

分类: DB2/Informix

2012-04-26 22:51:13

thread  are  an importance resource.
A thread is a DB2 structure that  descirbes a connection made by a application and trace its 
process. (notice  its  equals   connection's)
kind of  thread
allied thread
database access thread (DBAT )
set limit:
1  set  max user & max remote active  
the total number of the above  is 2000
2  for the tso connect and Call attachment facility,you limit the number of the threads indirected by  choosing values for the MAX TSO CONNECT & MAX BATCH CONNECT 

ALLIED THREAD CREATION
1  CHECK THE MAXIMUM NUMBER OF THE  THREAD
2  CHECK THE PLAN AUTHORIZATION
3 FOR AN APPLICATION PLAN, LOAD THE CONTROL STRUCTURE ASSOSIATIED WITH THE PLAN
THE CONTROL BLOCK OF AN PLAN IS DIVIDE INTO SECTIONS:
THE HEADER AND DIRECTORY CONTAIN THE CONTROL INFORMATION
SQL SECTION  CONTAIN SQL STATEMENT FROM THE APPLICATION
A COPY OF THE PLAN'S CONTROL STRUCTURE IS MADE FOR EACH THREAD EXECUTING THE PLAN
.ONLY THE HEADER AND DIRECTORY ARE LOADED WHEN THE THREAD IS CREATED.
4 LOAD THE DESCRIPTOR NECESSARY TO PROCESS THE PLAN
SOME OF THE CONTROL STRUCTURE DESCRIBE THE DB2 TABLE SPACE,TABLES,AND INDEXES USED BY THE APPLICATION.IF ACQUIRE(ALLOCATE) IS USED,ALL THE DESCRIPTORS REFERRED TO THE THE PLAN ARE 
LOAD NOW.IF THE PLAN IS BOUND WITH ACQUIRE(USE),THEY ARE LOADED WHEN THE SQL STATEMENT ARE 
EXECUTED.
THE MOST RELEVANT FACTION FROM A SYSTEM PERFORMANCE POINT OF VIEW ARE:
THREAD REUSE
THREAD CREATION IS A SIGNIFICANT COST FOR A SMALL AND MEDIUM TRANSACTION
WHEN EXEC OF A TRAN IS TERMINATED,THE THREAD CAN SOMETIMES REUSED BY ANOTHER TRANS USING THE SAME PLAN.
EDMPOOL SIZE 
THE SIZE OF THE EDM POOL INFLUNENCES THE NUMBER OF THE I/O NEEDED TO LOAD THE CONTROL STRCTURES NECESSARY TO PROCESS THE PLAN OR PACKAGE.
ACQUIRE OPTION OF BIND
RESOURCE ALLOCATION
4KB PAGES  ----------------STRUCTURES   
IF NOT AVAIABLE ,FIRST LOAD INTO BP0 ,THEN COPY IT FROM THERE TO EDM POOL

SQL STATEMENT EXECUTION
IF THE STATEMENT RESIDES IN A PACKAGE,THE DIRECTORY AND HEADER OF THE PACKAGE'S CS(CONTROL STRUCTURE)  IS LOAD AT THE TIME OF THE FIRST EXEC OF THE STATEMENT IN THE  PACKAGE.
THE CS FOR A PACKAGE IS ALLOCATE AT STATEMENT EXEC TIME.THIS IS CONTRAST WITH THE CS FOR PLANS BOUNDS WITH ACQUIRE(ALLOCATE),WHICH ARE CREATE AT THREAD CREATION TIME.
THE HEADER OF THE PLAN'S CS IS ALLOCATED AT THREAD CREATION REGARDLESS OF THE ACQUIRE(ALLOCATE & USE).
STEP 4 COMMIT AND THREAD TERMINATION
COMMIT PROCESS CAN OCCUR MANY TIMES WHILE A THREAD IS ACITVE.
WHEN THE APPLICATION  PROGRAM OR THE THREAD TERMI NATES ,AN IMPLICT COMMIT OR SYNCPOINT IS ISSUED.
NEXT IS TWO-PHASE COMMIT


阅读(1353) | 评论(0) | 转发(0) |
0

上一篇:事务隔离级别

下一篇:数据库笔记(2)

给主人留下些什么吧!~~