3 Replies Latest reply on Mar 9, 2003 4:53 AM by frank

    EJB-CMP query times

    luigifonti

      I am astonished about query times of EJB with CMP.
      I wrote a client program to scan all the records of a mysql database using an cmp-entity bean. Total time: more than 4 minutes.
      If the same client uses direct SQL queries the execution times is less than 4 seconds!
      Does somebody have similar experiences ?
      Luigi Fonti

        • 1. Re: EJB-CMP query times

          I'd say your tx settings are fucked up, or you misconfigured your CMP engine.

          • 2. Re: EJB-CMP query times
            tchan

            I am actually experiencing the same problem the previous gentleman experienced. The query time with 4 concurrent users is around 4 minutes. Obviously, I must have f'd up something. But could somebody give me some pointers on how to configure the tx correctly to cure this problem, or simply where to look at to improve the performance?

            • 3. Re: EJB-CMP query times

              It could be that serialization is killing you. You can test this by retrieving the resultset, serialize it to a file (or what ever) and read it back again checking the times spend along the way.

              You can speed things up orders of magnitude using the --Externalize-- interface.