Results 1 to 7 of 7
  1. #1
    Join Date
    Aug 2009
    Posts
    2

    Post Unanswered: Delte 1000 Records In Jdbc Batch

    Hi,

    I have a requirement where I have to delete 1000 records from a single table for a given set of conditions. How can I go ahead with JDBC batch? Is there any perormance issue for this approach? If few of the records are not deleted from this batch, then the whether all others will be commited?

    Thanks for the help.

    Regards,
    nd1980

  2. #2
    Join Date
    Apr 2006
    Location
    Belgium
    Posts
    2,514
    Provided Answers: 11
    delete from .. where ..
    if statement executed and not succeeded it will be rolled back
    the only problem could be logspace (not with 1000 rows)
    Best Regards, Guy Przytula
    Database Software Consultant
    Good DBAs are not formed in a week or a month. They are created little by little, day by day. Protracted and patient effort is needed to develop good DBAs.
    Spoon feeding : To treat (another) in a way that discourages independent thought or action, as by overindulgence.
    DB2 UDB LUW Certified V7-V8-V9-V9.7-V10.1-V10.5 DB Admin - Advanced DBA -Dprop..
    Information Server Datastage Certified
    http://www.infocura.be

  3. #3
    Join Date
    Aug 2009
    Posts
    2
    Actually My requirement is to do the batch delete from a JAVA application through JDBC Batch feature. My concern is if few records are not getting deleted, then whether the whole batch will be rolled back?

  4. #4
    Join Date
    Apr 2006
    Location
    Belgium
    Posts
    2,514
    Provided Answers: 11
    it depends on the commit
    it will rollback to last luw
    (I find it strange that so many people are trying to use DB2 and have not read at least 1 book about it or never consult the online infocenter)
    Best Regards, Guy Przytula
    Database Software Consultant
    Good DBAs are not formed in a week or a month. They are created little by little, day by day. Protracted and patient effort is needed to develop good DBAs.
    Spoon feeding : To treat (another) in a way that discourages independent thought or action, as by overindulgence.
    DB2 UDB LUW Certified V7-V8-V9-V9.7-V10.1-V10.5 DB Admin - Advanced DBA -Dprop..
    Information Server Datastage Certified
    http://www.infocura.be

  5. #5
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    Quote Originally Posted by przytula_guy
    (I find it strange that so many people are trying to use DB2 and have not read at least 1 book about it or never consult the online infocenter)
    Why should they when there are so many people willing to spoon feed them (instead of asking them to RTFM) on this forum in order to rack up posting counts (must be in their performance plan)?

    I have answered a lot of questions, but I make a lot of references to the manuals, usually telling them exactly which manual to look in.
    M. A. Feldman
    IBM Certified DBA on DB2 for Linux, UNIX, and Windows
    IBM Certified DBA on DB2 for z/OS and OS/390

  6. #6
    Join Date
    Aug 2008
    Location
    Toronto, Canada
    Posts
    2,367
    Quote Originally Posted by Marcus_A
    Why should they when there are so many people willing to spoon feed them (instead of asking them to RTFM) on this forum in order to rack up posting counts (must be in their performance plan)?

    I may be wrong... but I have a feeling that I'm part of this group of people. Given them hints and telling to RTFM is perfectly fine (and this is what I try to do), but this doesn't work for all. I get to work with different kinds of people - some are extremely knowledgeable DBAs and one hint is more than enough and some are very new to DB2 or the DBA role. So, giving them a few hints and telling to RTFM is often not enough. So, I'm kind of used to "spoon feed them". If this is against the rules of this forum, then I'll stop.

    And I'm not doing it to "rack up posting counts"... I could care less about it.

  7. #7
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    Quote Originally Posted by db2girl
    If this is against the rules of this forum, then I'll stop.
    it isn't

    the only time you should not offer a solution is when it's an obvious homework assignment

    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •