4 Replies Latest reply on Jul 23, 2002 11:26 AM by benw

    CMP, Cache, and performance

    asharzaman

      I have a CMP Entity which contains 18000 entries in the DB. On my first findAll() call, it takes only 2 seconds to return a collection with all of the data. Once I make another call to the same bean, it takes 87 seconds to return the same data. My cache is set to 1000000 beans, and I have 512 MB of RAM (no shortage). I am using DB2 as the database. Can someone please tell me what I am missing.

      Thanks

      Ashar

        • 1. Re: CMP, Cache, and performance
          asharzaman

           

          • 2. Re: CMP, Cache, and performance
            joelvogt

            How long is the period between these two calls?

            • 3. Re: CMP, Cache, and performance
              kiuma

              Believe me, you really don't need 1000000 of records in one single call. Try to split your search result! That number is really orrible for a database.
              No help for this, just recode.
              Cya

              • 4. Re: CMP, Cache, and performance
                benw

                I am having the same problem. I have an entity that contains only 976 records. With commit option A and read-ahead set to either on-load or on-find, the findAll() call basically gets all the data from the database the first time around (which is fine). However, when I tried to access the data the 2nd time, it took over 40 secs to return the data from the cache. I tested this using JBoss 3.0.0 final and JBoss 3.0.1 rc1. JBoss 3.0.0 final was even taking longer, often over 90 seconds for the data to come back from the cache.

                P.S. The time between the two calls was very short (like a couple of seconds).

                Any insights on this will be greatly appreciated,
                Ben