0 Replies Latest reply on May 12, 2003 9:17 AM by vivek.chaudhri

    read-ahead with on-find strategy

    vivek.chaudhri

      Hello:

      I am using JBOSS 3.0.0. I am trying to use read-ahead with the strategy being on-find. I have set the eager-loading appropriately in the bean to load up the appropriate fields. I have also specified read-ahead strategy in the query section. I have to get a collection based on a query and iterate through all its elements. That is the reason I am using the on-find strategy.

      The SQL that I see getting generated, is not that for on-find but that of on-load.

      The sql is something like:
      select a, b, c from d where (id=?) OR (id=?) OR (id=?) and so on.

      This query is causing my perforamce to go down.

      What I am trying to do is to read all the rows from the DB that meet the specified criteria in one shot and with minimal stuff in my where clause.

      Please let me know what I am doing wrong.

      Thanks a lot for the help.
      Vivek