0 Replies Latest reply on Oct 30, 2002 9:30 AM by pranesh

    URGENT: CMP optimizations

    pranesh

      I've generated custom finders for my queries.

      My problems is that the server only returns primary keys for the result. Which means i would have to use findByPrimaryKey in order to retrieve the beans contents. Which also means that for a query that returns 200 keys i would then have to use my findByPrimarykey method to get the rows contents. Which means another 200 queries to the db.

      I read somewhere that you can use read-ahead for your finder so that it loads all the fields for you along with the PK.

      I've tried this approach. I see the query in the server log. It seems to be selecting everything in the table but i don't get any data back.

      Is this the only way you can get it to load all the fields instead of go of going the other route?


      Examples of the ejb-jar.xml,jboss.xml, files would be really appreciated

      Thanks
      Pranesh