1 Reply Latest reply on Dec 17, 2003 11:18 AM by Surga Moin

    How to remove high data objects

    Cor Hofman Newbie

      I have the following situation:

      o A database containing several 100,000 rows, which also have a EJB representation as a BMP.
      o At some point in time a need will arrise to partially remove a large chunk of these rows.
      o I cannot shutdown/restart the system for this.

      How do I do this in a clever way. Surely going in
      and issuing a findByxxx() method and then calling
      remove() repeatedly will lead to problems returning a Collection of several 100,000 objects, not to mention
      the huge amoung of overhead introduced by calling the
      remove() method for each row seperately.

      Performing a sneaky delete from aTable where xxx='y' will
      lead to problems, where I can have BMP around representing a row that has long gone.

      I am looking forward to some smart suggestions here :-)
      Kind regards,

      Cor Hofman.

        • 1. Re: How to remove high data objects
          Surga Moin Newbie

          I have faced it.....
          Container takes hell lot of time to remove rows in Bulk......

          I have a workaround, its just a workaround......
          I wrote that just to give a try, its against the j2ee spec's i guess.

          What I did is, am having a stored procedure for my data base to delete all specified rows. and I am using JMX to call that Stored Procedure and that would get excuted out side the container. That worked for me.

          Regards
          naseer.