Project

General

Profile

Actions

Refactor #24256

closed

Get rid of useless db indices and imrpove index ordering

Added by Tomer Brisker over 6 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Database
Target version:
-
Difficulty:
Triaged:
No
Fixed in Releases:
Found in Releases:

Description

Both postesql and mysql know how to use partial indices, so there is no need to have multiple indices to cover the same columns.
Additionally, in some cases the indices order can be improved, e.g. for polymorphic relations, first index the relation type then the id.


Related issues 1 (0 open1 closed)

Related to Foreman - Refactor #24573: Adding missing foreign keys and indicesRejectedLukas ZapletalActions
Actions

Also available in: Atom PDF