473,385 Members | 1,267 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

FLUSH PACKAGE CACHE DYNAMIC

Hello!
I have noticed that after (sucessfully) executing the command:
FLUSH PACKAGE CACHE DYNAMIC
the dynamic SQL statement cache is not completely cleared (some of the
dynamic SQL statement elements are not reset).

For example, looking at the dynamic SQL snapshot I see a certain SQL
statement that has been executed a number of times and has read a (big)
number of rows.
Then I execute the "FLUSH PACKAGE CACHE DYNAMIC" command.
Then I execute the same SQL statement one more time.
Now, when I issue another dynamic SQL snapshot I expect for this SQL
statement the number of executions to be one, and the number of rows read to
be equal to the number of rows read by *only* that last statement
invocation.
But this doesn't happen. Instead, the number of executions remains as before
the FLUSH command, increased by one, and the number of rows read is
increased by the number of rows read by the last invocation of the
statement.

Is this the expected result of the FLUSH command?
If so, how can I reset the NUM_EXECUTIONS and ROWS_READ (and to that matter
all other) elements of the dynamic SQL cache?

Regards,
Damir
Nov 11 '08 #1
2 8891
On Nov 11, 10:56*am, "Damir" <damirwil...@yahoo.comwrote:
* * Hello!
I have noticed that after (sucessfully) executing the command:
* * FLUSH PACKAGE CACHE DYNAMIC
the dynamic SQL statement cache is not completely cleared (some of the
dynamic SQL statement elements are not reset).

For example, looking at the dynamic SQL snapshot I see a certain SQL
statement that has been executed a number of times and has read a (big)
number of rows.
Then I execute the "FLUSH PACKAGE CACHE DYNAMIC" command.
Then I execute the same SQL statement one more time.
Now, when I issue another dynamic SQL snapshot I expect for this SQL
statement the number of executions to be one, and the number of rows readto
be equal to the number of rows read by *only* that last statement
invocation.
But this doesn't happen. Instead, the number of executions remains as before
the FLUSH command, increased by one, and the number of rows read is
increased by the number of rows read by the last invocation of the
statement.

Is this the expected result of the FLUSH command?
If so, how can I reset the NUM_EXECUTIONS and ROWS_READ (and to that matter
all other) elements of the dynamic SQL cache?

Regards,
* * Damir


db2 reset monitor all
db2 connect to yourdb user youruser using password
db2 flush package cache dynamic
db2 connect reset

db2 get snapshot .....................


Nov 11 '08 #2
You are missing the "db2 connect reset" statement that I specified in
the example.
Hmm... supposing that I have a WebSphere Application Server that holds open
(many) connections to the database (that keep executing the aforementioned
queries), and I cannot reset these connections (because it is a production
site), in that case it is impossible to reset the counters?
(in spite of all said, I can reset - for example - the table counters (i.e.
rows read, overflows, etc.) ... but not the dynSQL ones ...)

Regards,
Damir
Nov 12 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: xixi | last post by:
the formula for package cache hit ratio is 1 - (package cache inserts/package cache lookups), what the result would be a effective ratio? currently we have cache inserts=25, cache lookups=35, so...
10
by: datapro01 | last post by:
Running DB2 8.1.6A on AIX 5.1 We are experience package cache overflows. The high water mark for package cache is showing as 16,108,513 bytes, or approximately 3933 4K pages. The package...
3
by: Kyle Brandon | last post by:
Is there a way to flush the cache from a web service? basically i want to force a cache flush if there was an underlying database change so that subsequent calls would get new data...
0
by: ECathell | last post by:
I need to flush the ?cache? on a console application. I have supervisors who are allowed to override functions but then unauthorized users can simply arrow up through the inputs. I can not use...
0
by: shterke | last post by:
Good day, I've been monitoring a DB2 system and noticed a low package cache hit ratio, I calculated it based on the formula in the db2 information center: ...
3
by: PaulR | last post by:
Hi, I am trying to understand what invalidates Dynamic Packages in the Package Cache. By monitoring the Size of the Package Cache, it appears the following does 1. Performing a Runstats on...
1
by: Ramchandra | last post by:
Hi , i am facing problem in package cache hit ratio its between 47-45% which is very less:- here are my configuration related to package cache:- Catalog cache size (4KB) ...
4
by: Arun Srinivasan | last post by:
I've been trying to tune this complex sql that uses the 'exists' clause. It is damn slow, even though the tables are not big and I have indexes on the columns in the sql. Currently I am trying...
0
by: Ian | last post by:
Patrick Finnegan wrote: Yes. It doesn't matter where you execute the statement from. Is your question of "how do I check" asking how you check whether it works when executed from a client? ...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.