Tim, It is because the first time you run a stored procedure DB2 has to load the libraries required to execute it. That could take some extra seconds and subsequent executions uses the already loaded libraries. You might want to look into turning the following database manger parameters KEEPDARI, MAXDARI, INITDARI_JVM and NUM_INITDARIS to control execution of java and other DARI procedures. Regards, Ajith
-----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 13, 2003 12:47 PM To: [EMAIL PROTECTED] Subject: [DB2EUG] Stored Procedure Cache? Hello List, We have a some java stored procedures that are defined on a DB2 UDB version 7.2 fixpack 9 machine. When the stored procedure is invoked for the first time it takes around 20 seconds to return results. When it is executed again with the same variables, it returns quickly. Now most people would say that this is a bufferpool problem, but I don't believe that it is. When a program is invoked that performs the same SQL, in returns fast everytime no matter what parameters are being used in the SQL. It almost seems like there is some type of stored procedure cache that is not sized correctly but I am not familiar with any setting like this. Can someone steer me in some direction on this? Does a cache of this sort exist and if so what is it? Thanks, Tim Traxson - ::: When replying to the list, please use 'Reply-All' and make sure ::: a copy goes to the list ([EMAIL PROTECTED]). *** To unsubscribe, send 'unsubscribe' to [EMAIL PROTECTED] *** For more information, check http://www.db2eug.uni.cc - ::: When replying to the list, please use 'Reply-All' and make sure ::: a copy goes to the list ([EMAIL PROTECTED]). *** To unsubscribe, send 'unsubscribe' to [EMAIL PROTECTED] *** For more information, check http://www.db2eug.uni.cc
