Home > database >  Multithreaded access database
Multithreaded access database

Time:11-19

Excuse me:
Suppose that a thread or process for database query, another thread or process or to write database query operations, the write operation is to wait until the end of a thread to query execution? Is a thread for a long time to take up the data query, will affect the other threads access to the database?

CodePudding user response:

The write operation is to wait until the end of a thread query execution, as if to go to the bathroom, there is only one vacancy, a people in convenient, come out, after the second person to get in,
So, a thread take up data query for a long time, will affect the other threads access to the database,
Thread on the method is: will the data lock, after operation is completed in memory, the data release, the next thread to access data,

CodePudding user response:

No, this has no effect
  • Related