Nikeev / sesdashboard

Analytics and activity tracking dashboard for AWS Simple Email Service
https://sesdashboard.com/
MIT License
86 stars 27 forks source link

Indexes missing #65

Open jgimenez opened 7 months ago

jgimenez commented 7 months ago

After some time of usage, the dashboard becomes very very slow, up to the point of queries timing out.

I found these two indices help:

ALTER TABLE email_event ADD INDEX timestamp (timestamp);
ALTER TABLE email ADD INDEX project_id_timestamp (project_id,timestamp);
matt-t-d commented 6 months ago

Also consider

ALTER TABLE email ADD INDEX message_id (message_id);