end loop
if have any error
print erro
rollback transaction
else
commit transaction
or you can you that in postgresql procedure.
2015-07-24 22:51 GMT+09:00 JPLapham :
> 林士博 wrote
> > If I am following correctly, you can do it in your application as
> follows.
> > 1
Thanks for sharing the results of your experiment !
Yes, partitioning by fk_job can significantly improve performance of this
update.
And all the SELECTs with definited fk_job can be faster.
All you should check carefully is those SELECTs without definited fk_job.
2015-07-24 17:18 GMT+09:00 twoflower :
> Thank you, I will look into those sugges
ck if postgresql can insert start from the
position of HWM(High Water Mark).
2015-07-24 15:58 GMT+09:00 twoflower :
> 林士博 wrote
> Can you post execution plan of the original update sql. EXPLAIN (ANALYZE
> ON, BUFFERS ON) update "TRANSLATION" set fk_assignmentwhere fk_job
Sorry, my mistake.
Execution plan of an update sql seems always get rows=0.
Can you post execution plan of the original update sql.
EXPLAIN (ANALYZE ON, BUFFERS ON) update "TRANSLATION" set
fk_assignmentwhere fk_job = 1000;
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.
->updat
Yes. You are right.
Do it in postgresql procedure is faster than in application.
If I am following correctly, you can do it in your application as follows.
1.begin transaction
2.insert each data. Catch db exception,
and save exception message and other information you need to array.
3.in the end ,you can get all the information about the wrong data in array
if there is any.