-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(jdbc): improve logs indexes (#1882)
Without this new index, the index on timestamp is always used. Fixes #1810 as far as we understand the issue.
- Loading branch information
1 parent
13bf280
commit a6344b4
Showing
3 changed files
with
9 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
DROP INDEX logs_namespace; | ||
DROP INDEX logs_timestamp; | ||
CREATE INDEX logs_namespace_flow ON logs (deleted, timestamp, level, namespace, flow_id); |
3 changes: 3 additions & 0 deletions
3
jdbc-mysql/src/main/resources/migrations/mysql/V16_index_logs.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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
DROP INDEX ix_namespace ON logs; | ||
DROP INDEX ix_timestamp ON logs; | ||
CREATE INDEX ix_namespace_flow ON logs (deleted, timestamp, level, namespace, flow_id); |
3 changes: 3 additions & 0 deletions
3
jdbc-postgres/src/main/resources/migrations/postgres/V21_index_logs.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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
DROP INDEX logs_namespace; | ||
DROP INDEX logs_timestamp; | ||
CREATE INDEX logs_namespace_flow ON logs (deleted, timestamp, level, namespace, flow_id); |