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
27 lines
1.1 KiB
SQL
27 lines
1.1 KiB
SQL
ALTER TABLE user_entity
|
|
ADD COLUMN lastLoginTime BIGINT GENERATED ALWAYS AS ((json->>'lastLoginTime')::bigint) STORED;
|
|
|
|
ALTER TABLE user_entity
|
|
ADD COLUMN lastActivityTime BIGINT GENERATED ALWAYS AS ((json->>'lastActivityTime')::bigint) STORED;
|
|
|
|
|
|
CREATE INDEX idx_user_entity_last_login_time ON user_entity(lastLoginTime);
|
|
CREATE INDEX idx_user_entity_last_activity_time ON user_entity(lastActivityTime);
|
|
CREATE INDEX idx_user_entity_last_login_deleted ON user_entity(lastLoginTime, deleted);
|
|
CREATE INDEX idx_user_entity_last_activity_deleted ON user_entity(lastActivityTime, deleted);
|
|
|
|
-- Composite index for apps_extension_time_series to fix query performance
|
|
-- Create index only if it doesn't exist
|
|
CREATE INDEX IF NOT EXISTS idx_apps_extension_composite
|
|
ON apps_extension_time_series(appId, extension, timestamp DESC);
|
|
|
|
CREATE INDEX IF NOT EXISTS idx_er_toEntity_toId_relation
|
|
ON entity_relationship (toEntity, toId, relation);
|
|
|
|
CREATE INDEX IF NOT EXISTS idx_er_fromEntity_toEntity
|
|
ON entity_relationship (fromEntity, toEntity);
|
|
|
|
CREATE INDEX IF NOT EXISTS idx_er_relation_fromEntity_toId
|
|
ON entity_relationship (relation, fromEntity, toId);
|
|
|