"Tag table" is used for labeling the status of the related molecules when docking. When there are plenty of computing clients request data from database, they should know which ones has already been booked or are being managed by other clients. So the "tag table" is designed for tracing the status of the data.
Innodb owns the character of "line lock", which can improve the performance of the "tag table", because "tag table" needed to be locked for updating frequently. If using MYISAM, which can only table-locked, then all the requests of updating will be blocked when one client trying to get and update the data of this table. The things, however, are different, when using innodb. Only the updating lines with its one former line and one following line will be locked.
The MySQL codes are like
set autocommit=0
select a_id,id from atag where sign=0 limit %d for update
/* update command let sign=1*/
commit
set autocommit=1
sign=0 means needing to manage. sign=1 means managing. When finishing, update sign=2.
No comments:
Post a Comment