File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and the fly likes Could you please go through the problem and suggest solution to solve this problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Could you please go through the problem and suggest solution to solve this problem" Watch "Could you please go through the problem and suggest solution to solve this problem" New topic
Author

Could you please go through the problem and suggest solution to solve this problem

chandrakanth boga
Ranch Hand

Joined: Mar 15, 2006
Posts: 49
We need to enhance a particular functionality:-

The problem is :-
----------------------------------------------------------------------------

The basic implementation of the dbclean up process is completed. we need to enhance for removing the database records in a smaller chunks. As of now this program will try to delete millions of records, hence database will fail out of log space.
we are using Springs Framework to manage database.

----------------------------------------------------------------------------


We need to enhance the functionality so that it can remove data in chunks´┐Ż.
What we can do for this ??

Please send your solutions as soon as possible.
Rajah Nagur
Ranch Hand

Joined: Nov 06, 2002
Posts: 239
Are you trying to delete records one by one or is it a single query?

What is the database?

You got to index the table (probably you might have already done).

Have a batch process and group your records as logical chunks; the best grouping would be based on date field (if there any such column exists).

One more thing "Are the deletes transactional"?

---just my thoughts..


You can't wake a person who is <b><i>pretending</i></b> to be asleep.<br />Like what <b>"it"</b> does not like - <i> Gurdjieff </i>
chandrakanth boga
Ranch Hand

Joined: Mar 15, 2006
Posts: 49
Thanks Rajah Nagur for your reply.

its s single query and database is DB2

i am not understanding whether deletes are transactional. but it deletes based on trade ids.
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

Moving to the JDBC forum where the database gurus hang out.


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Jeanne Boyarsky
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 30752
    
156

Originally posted by chandrakanth boga:
i am not understanding whether deletes are transactional. but it deletes based on trade ids.

Rajah is asking whether you have it set up so that the whole process will rollback if one delete fails?


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Could you please go through the problem and suggest solution to solve this problem