Add database indices to improve performance

This commit is contained in:
Jan Böhmer 2022-09-25 18:33:13 +02:00
parent 9d069149d7
commit ed91ffc60a
17 changed files with 193 additions and 18 deletions

View file

@ -75,7 +75,10 @@ use Symfony\Component\Validator\Constraints as Assert;
* Otherwise this class would be too big, to be maintained.
*
* @ORM\Entity(repositoryClass="App\Repository\PartRepository")
* @ORM\Table("`parts`")
* @ORM\Table("`parts`", indexes={
* @ORM\Index(name="parts_idx_datet_name_last_id_needs", columns={"datetime_added", "name", "last_modified", "id", "needs_review"}),
* @ORM\Index(name="parts_idx_name", columns={"name"}),
* })
*/
class Part extends AttachmentContainingDBElement
{