From 1cae8eb8378385db23632d723a58adac83563a35 Mon Sep 17 00:00:00 2001 From: AlanJager Date: Wed, 20 Sep 2017 10:52:48 +0800 Subject: [PATCH] Create index for NotificationVO.resourceUuid Resolves ZSTAC-6962 Before create index cost 1.2 sec After create index cost 0.00-0.01 sec Signed-off-by: AlanJager --- conf/db/upgrade/V2.2.0__schema.sql | 1 + 1 file changed, 1 insertion(+) diff --git a/conf/db/upgrade/V2.2.0__schema.sql b/conf/db/upgrade/V2.2.0__schema.sql index b95900f7e15..326ac05c711 100644 --- a/conf/db/upgrade/V2.2.0__schema.sql +++ b/conf/db/upgrade/V2.2.0__schema.sql @@ -73,3 +73,4 @@ select update_policy(uuid, 'SCHEDULER.TRIGGER.UPDATE', '[{\"name\":\"scheduler.t select update_policy(uuid, 'SCHEDULER.ADD', '[{\"name\":\"scheduler.add\",\"effect\":\"Allow\",\"actions\":[\"scheduler:APIAddSchedulerJobToSchedulerTriggerMsg\"]}]') from AccountVO where type<>'SystemAdmin'; select update_policy(uuid, 'SCHEDULER.REMOVE', '[{\"name\":\"scheduler.remove\",\"effect\":\"Allow\",\"actions\":[\"scheduler:APIRemoveSchedulerJobFromSchedulerTriggerMsg\"]}]') from AccountVO where type<>'SystemAdmin'; +CREATE INDEX notification_resource_uuid_idx ON NotificationVO (resourceUuid); \ No newline at end of file