-
Notifications
You must be signed in to change notification settings - Fork 46
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
d6faf4c
commit db47fb6
Showing
6 changed files
with
47 additions
and
0 deletions.
There are no files selected for viewing
Empty file.
1 change: 1 addition & 0 deletions
1
svc/pkg/cluster/db/cluster/migrations/20240809225012_add_idx.up.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 @@ | ||
CREATE INVERTED INDEX ON db_cluster.servers (cloud_destroy_ts, pool_type2); |
Empty file.
18 changes: 18 additions & 0 deletions
18
svc/pkg/ds/db/servers/migrations/20240809224504_add_idx.up.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,18 @@ | ||
|
||
CREATE INDEX ON db_dynamic_servers.servers (datacenter_id, stop_ts); | ||
|
||
CREATE INDEX ON db_dynamic_servers.server_nomad (nomad_dispatched_job_id) STORING (nomad_alloc_plan_ts); | ||
DROP INDEX db_dynamic_servers.server_nomad@server_nomad_nomad_dispatched_job_id_idx; | ||
|
||
CREATE INDEX ON db_dynamic_servers.server_nomad (nomad_dispatched_job_id) | ||
STORING ( | ||
nomad_alloc_id, | ||
nomad_node_id, | ||
nomad_alloc_plan_ts, | ||
nomad_alloc_state, | ||
nomad_eval_plan_ts, | ||
nomad_node_name, | ||
nomad_node_public_ipv4, | ||
nomad_node_vlan_ipv4 | ||
); | ||
DROP INDEX db_dynamic_servers.server_nomad@server_nomad_nomad_dispatched_job_id_idx; |
Empty file.
28 changes: 28 additions & 0 deletions
28
svc/pkg/workflow/db/workflow/migrations/20240809005851_add_idx.up.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,28 @@ | ||
-- Unused | ||
DROP INDEX workflows@workflows_wake_deadline_ts_idx; | ||
DROP INDEX workflows@workflows_wake_sub_workflow_id_idx; | ||
DROP INDEX workflows@gin_workflows_wake_signals; | ||
|
||
-- For forgetting events in `update_loop` fn | ||
CREATE INDEX ON workflow_activity_events (loop_location) STORING (activity_name, input_hash, input, output, create_ts, forgotten); | ||
CREATE INDEX ON workflow_loop_events (loop_location) STORING (iteration, output, forgotten); | ||
CREATE INDEX ON workflow_message_send_events (loop_location) STORING (tags, message_name, body, forgotten); | ||
CREATE INDEX ON workflow_signal_events (loop_location) STORING (signal_id, signal_name, body, ack_ts, forgotten); | ||
CREATE INDEX ON workflow_signal_send_events (loop_location) STORING (signal_id, signal_name, body, forgotten); | ||
CREATE INDEX ON workflow_sub_workflow_events (loop_location) STORING (sub_workflow_id, create_ts, forgotten); | ||
|
||
-- For `pull_workflows` fn | ||
CREATE INDEX ON signals (ack_ts) STORING (workflow_id, signal_name); | ||
CREATE INDEX ON tagged_signals (ack_ts) STORING (tags, signal_name); | ||
CREATE INDEX ON workflows (worker_instance_id) | ||
STORING ( | ||
workflow_name, create_ts, ray_id, input, output, error, wake_immediate, wake_deadline_ts, wake_signals, wake_sub_workflow_id, tags | ||
); | ||
DROP INDEX workflows@workflows_worker_instance_id_idx; | ||
|
||
-- For `workflow-gc` | ||
CREATE INDEX ON db_workflow.worker_instances (last_ping_ts); | ||
|
||
-- For `workflow-metrics-publish` | ||
CREATE INDEX ON db_workflow.workflows (wake_deadline_ts, wake_sub_workflow_id, error) | ||
STORING (workflow_name, output, wake_immediate, wake_signals); |