in reply to Optimize DB update

Not withstanding javafan's excellent questions, a couple of possibilities that I've used successfully in the past to speed up updates.

  1. Upload the data required to make the updates into a simple, unindexed scratch table using the bulk loader.

    Apply the updates from the scratch table to their destination(s) using a stored procedure.

  2. Temporarily delete any indexes or foreign keys from the table to be updated, that aren't explicitly required for the update process, and re-create them afterwards.

Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
"I'd rather go naked than blow up my ass"

Replies are listed 'Best First'.
Re^2: Optimize DB update
by Anonymous Monk on Jan 28, 2010 at 03:37 UTC
    BrowserUK ++!
    It's a database question so that database way is the best for it.