Entity timeseries table missing index on entityFQN causing slower queries (#7968)

This commit is contained in:
Sriharsha Chintalapani 2022-11-17 11:22:59 -08:00 committed by GitHub
parent b203a92565
commit 148eb5bf1b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 0 deletions

View File

@ -1,6 +1,9 @@
--
-- Upgrade changes for 0.13
--
ALTER TABLE `entity_extension_time_series` modify entityFQN varchar(768);
ALTER TABLE `entity_extension_time_series` ADD INDEX `entity_fqn_index` (`entityFQN`);
CREATE TABLE IF NOT EXISTS web_analytic_event (
id VARCHAR(36) GENERATED ALWAYS AS (json ->> '$.id') NOT NULL,
name VARCHAR(256) GENERATED ALWAYS AS (json ->> '$.name') NOT NULL,

View File

@ -1,6 +1,11 @@
--
-- Upgrade changes for 0.13
--
ALTER TABLE entity_extension_time_series ALTER COLUMN entityFQN TYPE varchar(768);
CREATE INDEX IF NOT EXISTS entity_extension_time_series_entity_fqn_index ON entity_extension_time_series(entityFQN);
CREATE TABLE IF NOT EXISTS web_analytic_event (
id VARCHAR(36) GENERATED ALWAYS AS (json ->> 'id') STORED NOT NULL,
name VARCHAR(256) GENERATED ALWAYS AS (json ->> 'name') STORED NOT NULL,