# Execute Ddl Statement (Continue...)


![left](./student-guide/diagram/05-DDL-execution-01-02.png)
------------------------------------------------------------
When the worker module in the TiDB Server with the owner role starts processing a job, it read the job from TiKV first, and the job is persisted in the queue. Here's an introduction to the queues in TiKV:

Job queue: is a queue data structure for persisting unexecuted jobs in TiKV. There is only one for each TiDB database.

Job history queue: This is a queue data structure in TiKV that stores jobs that have been processed persistently. Each TiDB database has only one.

Therefore, the worker process fetches the first unexecuted job from the job queue for execution. After execution is complete, it puts the job in the job history queue for query.

When a job is executing, it will go through several states: none, delete only, write reorganizaton (delete reorganization), and public to ensure that DDL statements can not lock the table. For detailed principles, please refer to: implement of Google F1's online asynchronous schema change algorithm