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

@ -71,7 +71,11 @@ use Psr\Log\LogLevel;
* This entity describes a entry in the event log.
*
* @ORM\Entity(repositoryClass="App\Repository\LogEntryRepository")
* @ORM\Table("log")
* @ORM\Table("log", indexes={
* @ORM\Index(name="log_idx_type", columns={"type"}),
* @ORM\Index(name="log_idx_type_target", columns={"type", "target_type", "target_id"}),
* @ORM\Index(name="log_idx_datetime", columns={"datetime"}),
* })
* @ORM\InheritanceType("SINGLE_TABLE")
* @ORM\DiscriminatorColumn(name="type", type="smallint")
* @ORM\DiscriminatorMap({