Got it

Update Fault

307 0 10 0 3

This post is regarding an update fault. Below you may find the solution to this fault.


Impact


Use the parking lot data loading of the XX video cloud project as an example. When a vehicle enters the parking lot, its information will be written into the database table over the CopyManager interface in microbatch mode, such as the license plate number and entering time. When the vehicle leaves the parking lot, the leaving time corresponding to the license plate number will be updated in the database table.


If records are updated one by one, the huge update operations will bring great performance pressure to the database.


Inspection method


Investigate application developers and do code walkthrough if necessary to learn about the data update mode.


Optimization method


As to the fault above, change the update mode from one by one to batch update.


The procedure is as follows: In each batch update period (for example, 60s), batch load the primary key and the leaving time column for the records to be updated to a temporary table, then join the temporary table with the base table, and batch synchronize the leaving time column of all vehicles in the current period to the base table.


Note:


It is recommended that the size of a batch update window be the same as that of a microbatch window.


Comment

You need to log in to comment to the post Login | Register
Comment

Notice: To protect the legitimate rights and interests of you, the community, and third parties, do not release content that may bring legal risks to all parties, including but are not limited to the following:
  • Politically sensitive content
  • Content concerning pornography, gambling, and drug abuse
  • Content that may disclose or infringe upon others ' commercial secrets, intellectual properties, including trade marks, copyrights, and patents, and personal privacy
Do not share your account and password with others. All operations performed using your account will be regarded as your own actions and all consequences arising therefrom will be borne by you. For details, see " User Agreement."

My Followers

Login and enjoy all the member benefits

Login

Block
Are you sure to block this user?
Users on your blacklist cannot comment on your post,cannot mention you, cannot send you private messages.
Reminder
Please bind your phone number to obtain invitation bonus.