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 > package cache

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 10-13-06, 15:12
wehrle wehrle is offline
Registered User
 
Join Date: Jul 2005
Posts: 99
package cache

AIX 5.3 (JFS2)
DB2 8.2

Do all queries issued against a database get put in the package cache? To be clear, and say differently, I want to know if there is ever a an occasion for a given query to not have an entry in what is reported by the "db2 get snapshot for dynamic sql on db" command?

My intent is to use this to identify what queries (and tables) are involved in excessive execution times.

Thanks.
Reply With Quote
  #2 (permalink)  
Old 10-13-06, 17:01
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,196
That is true for Dynamic SQL, but not if the SQL statement is embeded static SQL in a application (C, COLBOL, etc) that is pre-compiled, compiled, and a bind package takes place. SQL Stored proecedures are also bound in packages.

Also, if the package cache is too small, and a package is bumped out to make room for a new package, then you may not see it with the snapshot.

Also, make sure your Statement Monitor is set ON in the dbm config.
__________________
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
  #3 (permalink)  
Old 10-13-06, 22:35
wehrle wehrle is offline
Registered User
 
Join Date: Jul 2005
Posts: 99
I don't suppose you know whether or not there is much embedded/compiled/bound sql with SAP?

There is currently a healthy listing in my package cache so there must be a good deal of dynamic sql.

Thanks again.
Reply With Quote
  #4 (permalink)  
Old 10-13-06, 23:20
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,196
You should be able to tell by looking at the list of packages in the Control Center. Obviously, you need to ignore any packages that come with DB2.
__________________
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
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