From 424a03f49cf1f1240184c5e81d58b274dae9080f Mon Sep 17 00:00:00 2001 From: sonika-shah <58761340+sonika-shah@users.noreply.github.com> Date: Tue, 20 Aug 2024 03:48:53 +0530 Subject: [PATCH] add index on extension_index table (#17496) --- bootstrap/sql/migrations/native/1.5.0/mysql/schemaChanges.sql | 2 ++ .../sql/migrations/native/1.5.0/postgres/schemaChanges.sql | 2 ++ 2 files changed, 4 insertions(+) diff --git a/bootstrap/sql/migrations/native/1.5.0/mysql/schemaChanges.sql b/bootstrap/sql/migrations/native/1.5.0/mysql/schemaChanges.sql index b8e4551c869..0217748f88b 100644 --- a/bootstrap/sql/migrations/native/1.5.0/mysql/schemaChanges.sql +++ b/bootstrap/sql/migrations/native/1.5.0/mysql/schemaChanges.sql @@ -298,3 +298,5 @@ update table_entity set json = JSON_SET( JSON_EXTRACT(json, '$.dataModel.owner') ) ) where json -> '$.dataModel.owner' is not null; + +ALTER TABLE entity_extension ADD INDEX extension_index(extension); diff --git a/bootstrap/sql/migrations/native/1.5.0/postgres/schemaChanges.sql b/bootstrap/sql/migrations/native/1.5.0/postgres/schemaChanges.sql index ac4dadaae9b..aa41e891629 100644 --- a/bootstrap/sql/migrations/native/1.5.0/postgres/schemaChanges.sql +++ b/bootstrap/sql/migrations/native/1.5.0/postgres/schemaChanges.sql @@ -280,3 +280,5 @@ update automations_workflow set json = json#-'{owner}' where json #>> '{owner}' update table_entity set json = jsonb_set(json#-'{dataModel,owner}', '{dataModel,owners}', jsonb_build_array(json#>'{dataModel,owner}')) where json #>> '{dataModel,owner}' is not null; + +CREATE INDEX IF NOT EXISTS extension_index ON entity_extension (extension);