From 0754cfe9c9e7a3fc9d6d084743edf5a5eaf34ddc Mon Sep 17 00:00:00 2001 From: Sergey Matvienko Date: Fri, 9 Jul 2021 10:24:35 +0300 Subject: [PATCH] fixed merge for schema-entities-idx.sql --- .../sql/schema-entities-idx-psql-addon.sql | 2 +- .../main/resources/sql/schema-entities-idx.sql | 16 ---------------- 2 files changed, 1 insertion(+), 17 deletions(-) diff --git a/dao/src/main/resources/sql/schema-entities-idx-psql-addon.sql b/dao/src/main/resources/sql/schema-entities-idx-psql-addon.sql index 9884d48a1b..5ea65a3380 100644 --- a/dao/src/main/resources/sql/schema-entities-idx-psql-addon.sql +++ b/dao/src/main/resources/sql/schema-entities-idx-psql-addon.sql @@ -35,4 +35,4 @@ CREATE INDEX IF NOT EXISTS idx_event_tenant_entity_type_entity_event_type_create WITH (FILLFACTOR=95); COMMENT ON INDEX public.idx_event_tenant_entity_type_entity_event_type_created_time_des - IS 'This index helps to open latest events on UI fast'; \ No newline at end of file + IS 'This index helps to open latest events on UI fast'; diff --git a/dao/src/main/resources/sql/schema-entities-idx.sql b/dao/src/main/resources/sql/schema-entities-idx.sql index 443d99faad..78b1eda905 100644 --- a/dao/src/main/resources/sql/schema-entities-idx.sql +++ b/dao/src/main/resources/sql/schema-entities-idx.sql @@ -45,19 +45,3 @@ CREATE INDEX IF NOT EXISTS idx_attribute_kv_by_key_and_last_update_ts ON attribu CREATE INDEX IF NOT EXISTS idx_audit_log_tenant_id_and_created_time ON audit_log(tenant_id, created_time); CREATE INDEX IF NOT EXISTS idx_rpc_tenant_id_device_id ON rpc(tenant_id, device_id); - -CREATE INDEX IF NOT EXISTS idx_event_ts - ON public.event USING btree - (ts DESC NULLS LAST) - WITH (FILLFACTOR=95); - -COMMENT ON INDEX public.idx_event_ts - IS 'This index helps to delete events by TTL using timestamp'; - -CREATE INDEX IF NOT EXISTS idx_event_tenant_entity_type_entity_event_type_created_time_des - ON public.event USING btree - (tenant_id ASC NULLS LAST, entity_type ASC NULLS LAST, entity_id ASC NULLS LAST, event_type ASC NULLS LAST, created_time DESC NULLS LAST) - WITH (FILLFACTOR=95); - -COMMENT ON INDEX public.idx_event_tenant_entity_type_entity_event_type_created_time_des - IS 'This index helps to open latest events on UI fast'; \ No newline at end of file