harbor/make/migrations/postgresql/0130_2.10.0_schema.up.sql
Chlins Zhang 43ccd2f09f
perf: optimize the performance of accessory query (#19557)
1. Add db index for subject_artifact_id in table artifact_accessory.
2. Optimize the SQL of excluding the accessory for artifact count.

Signed-off-by: chlins <chenyuzh@vmware.com>
2023-11-22 02:11:11 +00:00

3 lines
159 B
SQL

DROP TABLE IF EXISTS harbor_resource_label;
CREATE INDEX IF NOT EXISTS idx_artifact_accessory_subject_artifact_id ON artifact_accessory (subject_artifact_id);