Check the MySQL slow query log to identify which query(ies) are causing the delay, then run EXPLAIN on them to see which (if any) indexes are being used. If you see that indexes are not being used, consider adding indexes to relevant columns. Such columns would be those used in WHERE and JOIN clauses. For example, if you are joining venues
to events
on venue_id
you may want to index events
.venue_id
to improve JOIN performance.
For example:
CREATE INDEX event_venue_id ON events (venue_id);
solved MySQL create index …performance issues [closed]