Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cats: Update DB schema from 2171 to 2192
- Add an INDEX on Job.JobTDate to improve performance (MySQL only) - Fix integer out of range error by changing BaseFiles.BaseId to BIGINT/BIGSERIAL - Add new DDL update scripts for each supported DB backend - Set BDB_VERSION in cats.h - Remove unnecessary INDEX pathvisibility_jobid - Collation handling PostgreSQL >= 10 - Update basefiles sequence PostgreSQL >= 10 Fixes #1088: Integer out of range when using large amounts of files with Base Jobs Fixes #1061: Tremendous MySQL load
- Loading branch information
1 parent
b6d8053
commit a8b0f67
Showing
10 changed files
with
79 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
-- update db schema from 2171 to 2192 | ||
|
||
BEGIN; | ||
|
||
-- adapt index | ||
CREATE INDEX IF NOT EXISTS jobtdate_idx ON Job (JobTDate); | ||
|
||
-- change BaseFiles.BaseId data type | ||
ALTER TABLE BaseFiles MODIFY BaseId BIGINT; | ||
|
||
-- remove INDEX pathvisibility_jobid from pathvisibility | ||
DROP INDEX pathvisibility_jobid ON PathVisibility; | ||
|
||
UPDATE Version SET VersionId = 2192; | ||
|
||
COMMIT; | ||
|
||
ANALYZE TABLE Job; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
-- update db schema from 2171 to 2192 | ||
|
||
-- start transaction | ||
BEGIN; | ||
|
||
ALTER TABLE BaseFiles | ||
ALTER COLUMN BaseId TYPE BIGINT; | ||
|
||
DROP INDEX IF EXISTS pathvisibility_jobid; | ||
|
||
UPDATE Version SET VersionId = 2192; | ||
|
||
COMMIT; | ||
|
||
set client_min_messages = fatal; | ||
|
||
ANALYSE; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
-- update db schema from 2171 to 2192 | ||
|
||
-- Stop on error. Prevents, that tables get droped, when merging data into new table has failed. | ||
.bail on | ||
|
||
BEGIN; | ||
|
||
-- adapt index | ||
CREATE INDEX JobTDateIndex ON Job (JobTDate); | ||
|
||
-- remove INDEX pathvisibility_jobid from pathvisibility | ||
DROP INDEX IF EXISTS pathvisibility_jobid; | ||
|
||
UPDATE Version SET VersionId = 2192; | ||
|
||
COMMIT; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,5 +10,6 @@ | |
15.2.0=2004 | ||
17.2.2=2170 | ||
17.2.3=2171 | ||
19.2.0=2192 | ||
|
||
default=@BDB_VERSION@ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters