bf2343b7e4
Integration Tests - MySQL + Elasticsearch / Detect Changes (push) Has been cancelled
Integration Tests - MySQL + Elasticsearch / integration-tests-mysql-elasticsearch (push) Has been cancelled
Integration Tests - PostgreSQL + Elasticsearch + Redis / Detect Changes (push) Has been cancelled
Integration Tests - PostgreSQL + Elasticsearch + Redis / integration-tests-postgres-elasticsearch-redis (push) Has been cancelled
Integration Tests - PostgreSQL + OpenSearch / Detect Changes (push) Has been cancelled
Integration Tests - PostgreSQL + OpenSearch / integration-tests-postgres-opensearch (push) Has been cancelled
Java Checkstyle / java-checkstyle (push) Has been cancelled
Maven Collate Tests / maven-collate-ci (push) Has been cancelled
OpenMetadata Service Unit Tests / openmetadata-service-unit-tests-status (push) Has been cancelled
Publish Package to Maven Central Repository / publish-maven-packages (push) Has been cancelled
OpenMetadata Service Unit Tests / Detect Changes (push) Has been cancelled
OpenMetadata Service Unit Tests / openmetadata-service-unit-tests (push) Has been cancelled
OpenMetadata Service Unit Tests / k8s_operator-unit-tests (push) Has been cancelled
12 lines
881 B
SQL
12 lines
881 B
SQL
-- Change entity_extension_time_series.timestamp from VIRTUAL to STORED for performance.
|
|
-- STORED columns are materialized on disk, making unique constraint checks and range
|
|
-- queries on timestamp significantly faster (especially for bulk pipeline status upserts).
|
|
-- MySQL does not allow ALTER from VIRTUAL to STORED directly, so we drop and re-add.
|
|
-- NOTE: This will lock the table for a full rebuild. On large deployments with millions
|
|
-- of rows in entity_extension_time_series, plan for downtime accordingly.
|
|
ALTER TABLE entity_extension_time_series
|
|
DROP INDEX entity_extension_time_series_constraint,
|
|
DROP COLUMN `timestamp`,
|
|
ADD COLUMN `timestamp` bigint unsigned GENERATED ALWAYS AS (json_unquote(json_extract(`json`, _utf8mb4'$.timestamp'))) STORED NOT NULL,
|
|
ADD UNIQUE KEY `entity_extension_time_series_constraint` (`entityFQNHash`, `extension`, `timestamp`);
|