What does ”environment” and “section data” mean in "db2pd -dynamic” command output mean ?
Priyanka Joshi 270003HTNX Visits (7452)
Suppose you have 2 applications :
Eg 1 :
Application 1 : Wants to run the SQL in UR mode
Application 2 : Wants to run same SQL but in CS mode
Eg 2 :
Application 1 : SQL wants the result as one row for each fetch
Application 2 : SQL wants block result moved to client (faster)
So in both above examples, the SQL is same but has different isolations in e.g. 1 and different way of results in e.g. 2 so we will have 2 different environments in both cases.
So as you can see, the environment is based on the session settings, variables, options in SQL, command options etc. So if environment is same for 2 same SQL’s then they both are run under same environment.
2. In “db2pd dynamic” output, we see “Sect Size” which is the length of section data, what does "section data" mean ?
“Section data” contains the SQL compilation result. When we have the SQL compilation result we store it in “section data” (in shared memory) and we store the size of this result in “Sect Size” output.