Browse Source

Merge pull request #9832 from volodymyr-babak/fix/add-edge-idx

Added edge_event idx by tenant id and edge id
pull/9841/head
Andrew Shvayka 3 years ago
committed by GitHub
parent
commit
1a64030d5b
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      application/src/main/data/upgrade/3.6.1/schema_update.sql
  2. 2
      dao/src/main/resources/sql/schema-entities-idx.sql

2
application/src/main/data/upgrade/3.6.1/schema_update.sql

@ -35,3 +35,5 @@ ALTER TABLE resource ADD COLUMN IF NOT EXISTS external_id uuid;
CREATE INDEX IF NOT EXISTS idx_resource_etag ON resource(tenant_id, etag);
-- RESOURCES UPDATE END
CREATE INDEX IF NOT EXISTS idx_edge_event_tenant_id_edge_id_created_time ON edge_event(tenant_id, edge_id, created_time DESC);

2
dao/src/main/resources/sql/schema-entities-idx.sql

@ -67,6 +67,8 @@ CREATE INDEX IF NOT EXISTS idx_audit_log_id ON audit_log(id);
CREATE INDEX IF NOT EXISTS idx_edge_event_tenant_id_and_created_time ON edge_event(tenant_id, created_time DESC);
CREATE INDEX IF NOT EXISTS idx_edge_event_tenant_id_edge_id_created_time ON edge_event(tenant_id, edge_id, created_time DESC);
CREATE INDEX IF NOT EXISTS idx_edge_event_id ON edge_event(id);
CREATE INDEX IF NOT EXISTS idx_rpc_tenant_id_device_id ON rpc(tenant_id, device_id);

Loading…
Cancel
Save