Skip to content

Add indexes to catalog_resources

Furkan Ayhan requested to merge 428443-indexes-for-catalog_resources into master

What does this MR do and why?

Related to #428443 (closed)

This MR adds this index to catalog_resources;

CREATE INDEX index_catalog_resources_on_state ON catalog_resources USING btree (state);

After discussions, we decided to add only a state index to the catalog_resources table because it's more than enough for its near-future size.

We are planning to have these queries for now;

SELECT catalog_resources.* FROM catalog_resources WHERE state = 1 ORDER BY latest_released_at ASC; -- or /DESC

SELECT catalog_resources.* FROM catalog_resources WHERE state = 1 ORDER BY created_at ASC; -- or /DESC

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Furkan Ayhan

Merge request reports