Skip to content

Commit

Permalink
adding additional indexes for log_event and log_detail tables to allo…
Browse files Browse the repository at this point in the history
…w for improved sorting on requests from admin UI
  • Loading branch information
Sushant committed Jul 11, 2022
1 parent 5f132a5 commit 66458f5
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion ansible/roles/logger-service/files/db/schema.sql
Original file line number Diff line number Diff line change
Expand Up @@ -239,4 +239,15 @@ SET character_set_client = @saved_cs_client;
CREATE INDEX esbee_entity_uid ON event_summary_breakdown_email_entity (entity_uid(6));
CREATE INDEX esbre_entity_uid ON event_summary_breakdown_reason_entity (entity_uid(6));

CREATE INDEX month_idx ON log_event (`month`);
-- required indexes for log_event to allow faster/more efficient sorting.
CREATE INDEX month_idx ON log_event (`month`);
CREATE INDEX log_event_type_id_idx ON log_event (`log_event_type_id`);
CREATE INDEX log_source_type_id_idx ON log_event (`log_source_type_id`);
CREATE INDEX log_reason_type_id_idx ON log_event (`log_reason_type_id`);
CREATE INDEX user_email_idx ON log_event (`user_email`);
CREATE INDEX source_idx ON log_event (`source`);

-- required indexes for log_detail to allow faster/more efficient sorting.
CREATE INDEX entity_type_idx ON log_event (`entity_type`);
CREATE INDEX entity_uid_idx ON log_event (`entity_uid`);
CREATE INDEX record_count_idx ON log_event (`record_count`);

0 comments on commit 66458f5

Please sign in to comment.