Re: Re: The fastest way to update thousands of rows in moderately sized table

From: 林士博 <lin(at)repica(dot)co(dot)jp>
To: twoflower <standa(dot)kurik(at)gmail(dot)com>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Re: The fastest way to update thousands of rows in moderately sized table
Date: 2015-07-24 05:45:51
Message-ID: CACudzGj=dyNDdp_Q2PQutdZxyrDJW5pPF8izBcjqW_HPNzb7Lw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Try creating an index on TRANSLATION fk_job.

From the Execution plan you posted,
->(actual time=43262.266..43262.266 rows=0 loops=1)
actually, there is no row to be updated.

So, if you have a index on TRANSLATION fk_job, the update sql as behind
should be finished within several seconds.
->update "TRANSLATION" set fk_assignmentwhere fk_job = 1000;

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message twoflower 2015-07-24 05:51:55 Re: The fastest way to update thousands of rows in moderately sized table
Previous Message 林士博 2015-07-24 05:01:22 Re: Using the database to validate data