db2 - Update table instantly or “Bulk” Update in database later? And is it advisable? -


I have a question about a semi-static update in a database. In short, it's a checkout function on a web page. In the relationship, the checkout function is developed every time, it is done in five steps.

I want to try to optimize this function and keep my eye on that stage where I am checkedout every time, then update a table. I take the information from the shopping cart and then update the table in question.

I have some indexes on the table, the benefit of them is more than leaving them, so this is a cost, ready to take I.

Now, my question is, would it be better to not perform an update in the table in some way, but it can save every checkout item and somehow save them (possibly In a file) and then take this file at a specific time (or several times) in the day and update the table with new information.

Then I started thinking that to use any kind of bulk update, there is a possibility to take a file, hashp, array (or?) And then update it.

and I am using IBM DB2 version 9.7

Mestica

You will lose the ability to do the transaction, or failure after the middle of one stage will be cured, so I will avoid using this approach. You will use the statement prepared by JDBC 2.0, or use batch updates. You can try to, where many statements were submitted to DB as a unit Are there.


Comments