Sriharsha Chintalapani db8e2fa548
Improve indexing auto tune based on heap mem, parse custer metrics for new versions of OpenSearch (#21931)
* Improve indexing auto tune based on heap mem, parse custer metrics for new versions of OpenSearch

* Use native bulk processors

* lower the batch size, add composite index for app_runs table

* while updated secrets, if there is entityNotFoundException ignore and move on

* Fix deadlock

* Fix deadlock

* Fix gzip headers

* remove unnecessary code to check compression, batch sizes etc..

* Improved performance

* Improved performance

* fix merge error

* fix styling

* fix tests

* Fix build issues

* improve queue size recommendations

* put max limits on threads

* fix checkstyle
2025-06-30 07:40:25 -07:00

14 lines
569 B
SQL

-- Composite index for apps_extension_time_series to fix "Out of sort memory" error
-- This index optimizes the query: WHERE appId = ? AND extension = ? ORDER BY timestamp DESC
CREATE INDEX idx_apps_extension_composite
ON apps_extension_time_series(appId, extension, timestamp DESC);
CREATE INDEX idx_er_toEntity_toId_relation
ON entity_relationship (toEntity, toId, relation);
CREATE INDEX idx_er_fromEntity_toEntity
ON entity_relationship (fromEntity, toEntity);
CREATE INDEX idx_er_relation_fromEntity_toId
ON entity_relationship (relation, fromEntity, toId);