-
Notifications
You must be signed in to change notification settings - Fork 921
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
313b42b
commit 3e4083d
Showing
2 changed files
with
12 additions
and
9 deletions.
There are no files selected for viewing
13 changes: 9 additions & 4 deletions
13
kyuubi-server/src/main/resources/sql/mysql/005-KYUUBI-5327.mysql.sql
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 |
---|---|---|
@@ -1,8 +1,13 @@ | ||
SELECT '< KYUUBI-5131: Create index on metastore.create_time' AS ' '; | ||
SELECT '< KYUUBI-5327: Introduce priority in metadata' AS ' '; | ||
|
||
ALTER TABLE metadata ADD COLUMN priority int default 10 COMMENT 'the application priority, high value means high priority'; | ||
|
||
-- mysql 5.7 does not support mix order index | ||
-- mysql 8 allow create mix order index and can be used in order by | ||
-- here create it in 5.7 won't cause error | ||
-- In mysql 5.7, A key_part specification can end with ASC or DESC. | ||
-- These keywords are permitted for future extensions for specifying ascending or descending index value storage. | ||
-- Currently, they are parsed but ignored; index values are always stored in ascending order. | ||
-- In mysql 8 this can take effect and this index will be hit if query order by priority DESC, create_time ASC. | ||
-- See more detail in: | ||
-- https://dev.mysql.com/doc/refman/8.0/en/index-hints.html | ||
-- https://dev.mysql.com/doc/refman/8.0/en/create-index.html | ||
-- https://dev.mysql.com/doc/refman/5.7/en/create-index.html | ||
ALTER TABLE metadata ADD INDEX priority_create_time_index(priority DESC, create_time ASC); |
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