Results 1 to 4 of 4
  1. #1
    Join Date
    Aug 2003
    Posts
    24

    Unanswered: 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

  2. #2
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    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

  3. #3
    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...

  4. #4
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •