摘要 |
The invention discloses a task scheduling method and device based on a horizontal partitioning type distributed database. The method comprises the steps of extracting a first database partition ID carried by a task to be processed after the task to be processed is received; determining a first database instance to which the first database partition ID belongs according to the mapping relation between database partition IDs and database instances; determining a first thread corresponding to the first database instance according to the mapping relation between the database instances and threads, wherein one database instance only corresponds to one thread; allocating the task to be processed to the first thread to be executed so that waiting or interlocking can be avoided during parallel task execution. |