1 Reply Latest reply on Sep 10, 2002 1:16 PM by Pete Whitney

    PreparedStatement cache

    naven Newbie

      hi all,

      can anyone tell me whether Jboss2.2.2 maintains preparedstatement caches..
      if so how to configure it..

      we have been testing the speeds of statements and preparedstatements and the speeds are identical on jboss even for 1k inserts. Can anyone explain me this behavior..

      thanks in advance

      naveen

        • 1. Re: PreparedStatement cache
          Pete Whitney Newbie

          Prepared statements are connection related entities,
          and as such are managed by JDBC / your datasource
          and not by JBoss. JBoss can be configured to use
          connection pooling and when this is configured
          properly and prepared statements are used then
          you should see a performance improvement with
          prepared statements. As a result ensure that your
          server is configured properly for connection pooling.
          Try setting the pool size to 1 connection and issuing
          the same sql statement several time. If the same
          connection is returned then you should see a performance
          improvement.

          Hope that helps.

          Good Luck,
          Pete.