forked from apache/incubator-kie-kogito-apps
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[kie-issues#923] Add index to foreign key columns to improve performa…
…nce in postgresql (apache#1985)
- Loading branch information
1 parent
c22400e
commit 09a01d9
Showing
1 changed file
with
17 additions
and
0 deletions.
There are no files selected for viewing
17 changes: 17 additions & 0 deletions
17
...data-index-storage-postgresql/src/main/resources/db/migration/V1.45.0.3__add_fk_index.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,17 @@ | ||
create index if not exists idx_attachments_tid on attachments(task_id); | ||
create index if not exists idx_comments_tid on comments(task_id); | ||
create index if not exists idx_definitions_addons_pid_pv on definitions_addons(process_id, process_version); | ||
create index if not exists idx_definitions_annotations_pid_pv on definitions_annotations(process_id, process_version); | ||
create index if not exists idx_definitions_metadata_pid_pv on definitions_metadata(process_id, process_version); | ||
create index if not exists idx_definitions_nodes_pid_pv on definitions_nodes(process_id, process_version); | ||
create index if not exists idx_definitions_nodes_metadata_pid_pv on definitions_nodes_metadata(process_id, process_version); | ||
create index if not exists idx_definitions_roles_pid_pv on definitions_roles(process_id, process_version); | ||
create index if not exists idx_milestones_piid on milestones(process_instance_id); | ||
create index if not exists idx_nodes_piid on nodes(process_instance_id); | ||
create index if not exists idx_processes_addons_pid on processes_addons(process_id); | ||
create index if not exists idx_processes_roles_pid on processes_roles(process_id); | ||
create index if not exists idx_tasks_admin_groups_tid on tasks_admin_groups(task_id); | ||
create index if not exists idx_tasks_admin_users_tid on tasks_admin_users(task_id); | ||
create index if not exists idx_tasks_excluded_users_tid on tasks_excluded_users(task_id); | ||
create index if not exists idx_tasks_potential_groups_tid on tasks_potential_groups(task_id); | ||
create index if not exists idx_tasks_potential_users_tid on tasks_potential_users(task_id); |