Title: slow query
Last modified: November 14, 2018

---

# slow query

 *  Resolved [jaymo1711](https://wordpress.org/support/users/jaymo1711/)
 * (@jaymo1711)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/slow-query-14/)
 * Hi, we’ve been getting a lot of queries from Events Manager showing up in the
   MySQL slow query log. They all look something like this:
 * “SELECT DISTINCT SQL_CALC_FOUND_ROWS wp_em_events.post_id FROM wp_em_events
    
   LEFT JOIN wp_em_locations ON wp_em_locations.location_id=wp_em_events.location_id
   WHERE (`event_status`=1) AND (`recurrence`!=1 OR `recurrence` IS NULL) A [truncated,
   538 bytes total]”
 * It’s a school website, so there are typically a lot of events. I’m hoping someone
   has suggestions for optimizing this query, as the server frequently gets bogged
   down with these queries.
 * Thanks

Viewing 1 replies (of 1 total)

 *  [Tim Vergara](https://wordpress.org/support/users/tim01/)
 * (@tim01)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/slow-query-14/#post-10881509)
 * Hello,
 * The queries from Events Manager should be optimized already. In which part of
   Events Manager page do you it to trigger? checking of the query it seems to get
   the row counts of locations.
 * There is also a chance that the issue is on the Server itself, chances are MySQL
   Server is configured on your hosting properly. I have an EM installed on a cheapest
   hosting plan of Hostgator and I don’t have the same problem where sites became
   too slow.

Viewing 1 replies (of 1 total)

The topic ‘slow query’ is closed to new replies.

 * ![](https://ps.w.org/events-manager/assets/icon-256x256.png?rev=1039078)
 * [Events Manager - Calendar, Bookings, Tickets, and more!](https://wordpress.org/plugins/events-manager/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/events-manager/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/events-manager/)
 * [Active Topics](https://wordpress.org/support/plugin/events-manager/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/events-manager/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/events-manager/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Tim Vergara](https://wordpress.org/support/users/tim01/)
 * Last activity: [7 years, 6 months ago](https://wordpress.org/support/topic/slow-query-14/#post-10881509)
 * Status: resolved