From 3b6579b63f7bc818204edf470b8fdf7efbbcb121 Mon Sep 17 00:00:00 2001 From: Federico D'Ulizia Date: Tue, 4 Jun 2024 15:28:08 +0200 Subject: [PATCH] AAE-22912 Add index to improve bulk delete performance (#1457) AAE-22912 add index to improve bulk delete performance --- .../23-alter.oracle.schema.8.6.0.sql | 18 +++++++++++++++++ .../changelog/23-alter.pg.schema.8.6.0.sql | 18 +++++++++++++++++ .../config/query/liquibase/master.xml | 20 +++++++++++++++++++ 3 files changed, 56 insertions(+) create mode 100644 activiti-cloud-query-service/activiti-cloud-services-query/activiti-cloud-services-query-liquibase/src/main/resources/config/query/liquibase/changelog/23-alter.oracle.schema.8.6.0.sql create mode 100644 activiti-cloud-query-service/activiti-cloud-services-query/activiti-cloud-services-query-liquibase/src/main/resources/config/query/liquibase/changelog/23-alter.pg.schema.8.6.0.sql diff --git a/activiti-cloud-query-service/activiti-cloud-services-query/activiti-cloud-services-query-liquibase/src/main/resources/config/query/liquibase/changelog/23-alter.oracle.schema.8.6.0.sql b/activiti-cloud-query-service/activiti-cloud-services-query/activiti-cloud-services-query-liquibase/src/main/resources/config/query/liquibase/changelog/23-alter.oracle.schema.8.6.0.sql new file mode 100644 index 00000000000..0b2e7065170 --- /dev/null +++ b/activiti-cloud-query-service/activiti-cloud-services-query/activiti-cloud-services-query-liquibase/src/main/resources/config/query/liquibase/changelog/23-alter.oracle.schema.8.6.0.sql @@ -0,0 +1,18 @@ +/* + * Copyright 2017-2020 Alfresco Software, Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +CREATE INDEX CONCURRENTLY IF NOT EXISTS task_process_variable_task_id_idx ON task_process_variable (task_id); +CREATE INDEX CONCURRENTLY IF NOT EXISTS task_process_variable_process_variable_id_idx ON task_process_variable (process_variable_id); diff --git a/activiti-cloud-query-service/activiti-cloud-services-query/activiti-cloud-services-query-liquibase/src/main/resources/config/query/liquibase/changelog/23-alter.pg.schema.8.6.0.sql b/activiti-cloud-query-service/activiti-cloud-services-query/activiti-cloud-services-query-liquibase/src/main/resources/config/query/liquibase/changelog/23-alter.pg.schema.8.6.0.sql new file mode 100644 index 00000000000..0b2e7065170 --- /dev/null +++ b/activiti-cloud-query-service/activiti-cloud-services-query/activiti-cloud-services-query-liquibase/src/main/resources/config/query/liquibase/changelog/23-alter.pg.schema.8.6.0.sql @@ -0,0 +1,18 @@ +/* + * Copyright 2017-2020 Alfresco Software, Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +CREATE INDEX CONCURRENTLY IF NOT EXISTS task_process_variable_task_id_idx ON task_process_variable (task_id); +CREATE INDEX CONCURRENTLY IF NOT EXISTS task_process_variable_process_variable_id_idx ON task_process_variable (process_variable_id); diff --git a/activiti-cloud-query-service/activiti-cloud-services-query/activiti-cloud-services-query-liquibase/src/main/resources/config/query/liquibase/master.xml b/activiti-cloud-query-service/activiti-cloud-services-query/activiti-cloud-services-query-liquibase/src/main/resources/config/query/liquibase/master.xml index 7e553c35825..6fabf402430 100644 --- a/activiti-cloud-query-service/activiti-cloud-services-query/activiti-cloud-services-query-liquibase/src/main/resources/config/query/liquibase/master.xml +++ b/activiti-cloud-query-service/activiti-cloud-services-query/activiti-cloud-services-query-liquibase/src/main/resources/config/query/liquibase/master.xml @@ -462,4 +462,24 @@ stripComments="true"/> + + + + + + + +