If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > Flushing Dynamic sql cache

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-14-07, 05:21
lekhrajm lekhrajm is offline
Registered User
 
Join Date: Dec 2007
Posts: 8
Flushing Dynamic sql cache

Hi,
I want to flush Dynamic Sql CACHE completely in db2 9.1.2
I used command "db2 FLUSH PACKAGE CACHE DYNAMIC".
But it lefts some queries in cache. These are fixed queries.

It creats problem for me to find out top 10 queries with high hit ratio, using table function snap_get_dyn_sql_v91().
These queries come in top 10 most of the time.

Is there any way to flush dynamic sql cache completely.

Lekh Raj
Reply With Quote
  #2 (permalink)  
Old 12-14-07, 08:20
ARWinner ARWinner is offline
Registered User
 
Join Date: Jan 2003
Posts: 3,575
My guess is why the package cache did not flush totally is that those statements were active at the time of the flush command. Things you can do to try to fix this situation:

A) quiesce the db/instance, then flush when db is consistant
B) db2stop and db2start

I am not sure about A, but B is guaranteed to work.

Andy
Reply With Quote
  #3 (permalink)  
Old 12-14-07, 11:39
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,196
Try doing:
db2 reset monitor all

Then only select the SQL statements with number of executions greater than zero.
__________________
M. A. Feldman
IBM Certified DBA on DB2 for Linux, UNIX, and Windows
IBM Certified DBA on DB2 for z/OS and OS/390
Reply With Quote
  #4 (permalink)  
Old 12-17-07, 00:10
lekhrajm lekhrajm is offline
Registered User
 
Join Date: Dec 2007
Posts: 8
Thanks ARWinner and Marcus_A for reply.
I cannot restart db/instance everytime. "reset monitor all" sounds good, but I want to reset dynamic sql counters only, not all.
Will check if "reset monitor all" doesn't affect other counters.


Lekh Raj
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On