Home > Back-end >  About big data, the update line by line
About big data, the update line by line

Time:09-25

To ask you a great god, and I have here a table QiBaShiWanTiao data, the inside of the need to update a few fields, each field is a second query, found out the new value, write a for loop to value, and then to update once every 200 rows to submit in the outside, so efficiency is very low, want to consult everybody a great god is there a better way, can be optimized, the database is Oracle

CodePudding user response:

Merge into usage, you can see, just used to deal with the problem of you

CodePudding user response:

reference 1st floor qq_41622282 response:
merge into usage, you can see, just used to deal with the problem of you

The subquery results, not just the reference will also be involved, and if only merge into, that is because I have to seven times? I have seven fields updated?

CodePudding user response:

reference stars % % 2 floor response:
Quote: refer to 1st floor qq_41622282 response:

Merge into usage, you can see, just used to deal with the problem of you

The subquery results, not just the reference will also be involved, and if only merge into, that is because I have to seven times? I have seven fields updated?

Don't know what is your this calculation calculation, if they could be calculated through database query directly doing ok, conditions to satisfy is updated, if like you said that, to a complex queries can only make a calculation, the seven HuaHua does is to use

CodePudding user response:

Need to optimize the feeling is the logical problem, every time need seven times before the update queries, do not calculate the update time, the query of light, one is 10 ms, is a 70 ms, 1000 is the 70 s, you can't get up, of course, if you don't have the order of magnitude, is another matter

CodePudding user response:

reference 4 floor dkwuxiang response:
need to optimize the feeling is the logical problem, every time need seven times before the update queries, do not calculate the update time, the query of light, one is 10 ms, is a 70 ms, 1000 is the 70 s, you can't get up, of course, if you don't have the order of magnitude, is another matter

Logic problem? Don't understand, I now is to recalculation for detailed data, need this kind of processing, basic is orders of magnitude of about 100 w, you mean this?

CodePudding user response:

QueryCol code can stick? I see seven parameters is the last one, if you can only call once, the calculation of seven fields
  • Related