diff options
Diffstat (limited to 'src/exchangedb/0002-work_shards.sql')
-rw-r--r-- | src/exchangedb/0002-work_shards.sql | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/exchangedb/0002-work_shards.sql b/src/exchangedb/0002-work_shards.sql index fbe7e7086..6347d42c5 100644 --- a/src/exchangedb/0002-work_shards.sql +++ b/src/exchangedb/0002-work_shards.sql @@ -20,7 +20,7 @@ CREATE TABLE work_shards ,start_row INT8 NOT NULL ,end_row INT8 NOT NULL ,completed BOOLEAN NOT NULL DEFAULT FALSE - ,job_name VARCHAR NOT NULL + ,job_name TEXT NOT NULL ,PRIMARY KEY (job_name, start_row) ); COMMENT ON TABLE work_shards @@ -44,3 +44,13 @@ CREATE INDEX work_shards_by_job_name_completed_last_attempt_index ,completed ,last_attempt ASC ); + +CREATE INDEX work_shards_by_end_row_index + ON work_shards + (end_row DESC); + +CREATE INDEX work_shards_by_rows + ON work_shards + (job_name + ,start_row + ,end_row); |