a07300567e
Add indexes to dcmanager database to improve query performance: - subcloud_status_subcloud_id_idx on subcloud_status(subcloud_id) - subclouds_region_name_idx on subclouds(region_name) These indexes were added to optimize queries that: 1. Select subcloud status by subcloud_id 2. Filter subclouds by region_name Previously these queries were performing sequential table scans, resulting in slow query execution times. The new indexes will enable index scans for these common query patterns, improving performance. Test Plan: 01. PASS - Run "sudo dcmanager-manage db_sync" and verify that both indexes were created successfully. 02. PASS - Verify query performance improvement by running EXPLAIN ANALYZE on the queries that were previously slow. Confirm that index scans are now being used instead of sequential scans and verify that the execution times have been reduced. 03. PASS - Run subcloud audit and manage on a scale environment and verify that the overall execution time has been reduced and that there are no slow query logs in postgresql. Story: 2011106 Task: 51245 Change-Id: If50d2719ce571e1a5f3c774ed8ecf2874a51ab18 Signed-off-by: Gustavo Herzmann <gustavo.herzmann@windriver.com> |
||
---|---|---|
.. | ||
sqlalchemy | ||
__init__.py | ||
api.py | ||
utils.py |