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 > Prepared statement persistence

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 06-22-04, 19:49
trini0 trini0 is offline
Registered User
 
Join Date: Aug 2003
Posts: 24
Prepared statement persistence

Just looking to see if DB2 8.1.3 (on w2k) prepared statements are stored in some persistent pool for later retrieval (sometime outside the session where it was created).
In my php scripts, db2 runs pretty fast, except when creating/populating tables, and I was wondering if I would get a boost, if I were to deploy prepared statements through out my code.
For example. With PostgreSQL, its prepared statements only live within the session, and since performance isnt an issue, it may not be a good thing to use prepared statements (since most, if not all statements are not even repeated).

Hope that made sense...
Thanks
Reply With Quote
  #2 (permalink)  
Old 06-22-04, 20:55
ARWinner ARWinner is offline
Registered User
 
Join Date: Jan 2003
Posts: 3,575
Look in the DB2 manual:
Application Development Guide: Programming Client Applications
Look at chapter 4 and 5 for a discussion on statis and dynamic SQL.

The prepared statements will be cached but not persisted. This means they will stick around untill freed, invalidated, or DB2 is shut down. They will be reused if they are in the cache.

HTH

Andy
Reply With Quote
  #3 (permalink)  
Old 06-22-04, 21:34
trini0 trini0 is offline
Registered User
 
Join Date: Aug 2003
Posts: 24
Im not sure of what manual you're referring to.
I know about the Information Center at http://publib.boulder.ibm.com/infoce...help/index.jsp

But I did come across some text at the Information Center concerning this at http://publib.boulder.ibm.com/infoce...n/r0000948.htm
which seems to support what you're saying.

So thanks for the kick in the right direction...
Reply With Quote
  #4 (permalink)  
Old 06-23-04, 08:07
ARWinner ARWinner is offline
Registered User
 
Join Date: Jan 2003
Posts: 3,575
PDFs of all the DB2 manuals can be found at:

http://www-306.ibm.com/cgi-bin/db2ww...bs.d2w/en_main

You should also have a CD with this documentation (it should be labeled: PDF Documentation).

Andy
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