Results 1 to 3 of 3
  1. #1
    Join Date
    Apr 2010
    Posts
    6

    Question Unanswered: Update table instantly or “Bulk” Update in database later? And is it advisable?

    Hi,

    I have a question regarding a semi-constant update in a database. In short it is regarding a checkout function on a web page, which each time the checkout function is evoked it do five steps.

    I want to try to optimize this function and have my eye on a step where I update a table each time the checkout is performed. I take the information retrieved from the shopping cart and then update the table in question.

    I do have some indexes on the table, the gain from those are greater than leaving them so this is a cost I’m willing to take.

    Now, my question is. Could it in some way regarding to performance be better to not update the table instantly but collect every checkout items and save them in some way (maybe in a file) and then at a specific time (or several times) at day take this file and then update the table with the new information.

    Then I started thinking about if there was a possibility to use some sort of Bulk Update to take a file, hashmap, array (or?) and then update it.

    And I’m using IBM DB2 version 9.7

    - Mestika

  2. #2
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    DB2 can usually handle over a thousand inserts/updates per second (assuming there is no lock contention), even on a dual core system. I would not look at bulk processing unless you have millions of rows to process at one time.
    M. A. Feldman
    IBM Certified DBA on DB2 for Linux, UNIX, and Windows
    IBM Certified DBA on DB2 for z/OS and OS/390

  3. #3
    Join Date
    Apr 2010
    Posts
    6
    Hi Marcus,

    thank you for your answer.

    You maybe right, the performance gain would be negligible and might nonexistent. I will try to increase performance in another way and leave the updates and insertions alone.

Tags for this Thread

Posting Permissions

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