harbor/make/migrations/postgresql/0111_2.8.1_schema.up.sql
Chlins Zhang 4f6efeb3d1
[cherry-pick] fix: improve the performance of list artifacts (#18639)
fix: improve the performance of list artifacts

1. Change the query for listing tasks of scan which can use the db
   index.
2. Add the gin index for task.extra_attrs.report_uuids

Fixes: #18013

Signed-off-by: chlins <chenyuzh@vmware.com>
2023-05-05 14:05:46 +08:00

2 lines
119 B
SQL

CREATE INDEX IF NOT EXISTS idx_task_extra_attrs_report_uuids ON task USING gin ((extra_attrs::jsonb->'report_uuids'));