Title: Checking for event overlap
Last modified: June 19, 2020

---

# Checking for event overlap

 *  Resolved [awtd](https://wordpress.org/support/users/awtd/)
 * (@awtd)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/checking-for-event-overlap/)
 * I’ve got a use scenario that I’m sure can’t be unique, but I can’t find any info
   on it. Essentially, I’ve got a bunch of providers and a bunch of consumers, each
   with their own availability times (e.g. M-F 8am to 6pm), and I need to check 
   one against the other without causing my database to explode and catch on fire.
 * Some factors to reduce the complexity: consumers need to search providers, providers
   never need to search consumers. Availability only needs to be calculated 3-6 
   months into the future.
 * My thought was to have provider availability be a custom event type, but with
   200 providers and 3 months availability, that’s over 18 thousand events in the
   database. Which sounds to me like enough to seriously impact performance, but
   I’m not sure.
 * Has anyone encountered a use case like this? Is there a better solution or approach?
   Any ideas?

Viewing 1 replies (of 1 total)

 *  [Santiago](https://wordpress.org/support/users/sjaure/)
 * (@sjaure)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/checking-for-event-overlap/#post-13102745)
 * Hi [@awtd](https://wordpress.org/support/users/awtd/),
    Thanks for writing in,
 * There are lots of questions I’d like to ask about the way you will “check providers
   and cosumers one against the other” and also, what the bussiness rules are for
   that. But I will assume you have it already sorted?
 * About using events to represent a custom post type, note that this is not the
   expected use for our plugin, therefore you might bump into some issues.
    18 thousand
   sounds like a high number and I’m sure it will impact yourr site’s performance.
   The only workaround I can think of is setting each provider availability as a
   single multiday event (3 months long) and making clear in the event title or 
   details what the availability time is for each. That way you will only have 200
   events, one for each provider.
 * Let me know if this helps.
 * Best

Viewing 1 replies (of 1 total)

The topic ‘Checking for event overlap’ is closed to new replies.

 * ![](https://ps.w.org/the-events-calendar/assets/icon-256x256.gif?rev=2516440)
 * [The Events Calendar](https://wordpress.org/plugins/the-events-calendar/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/the-events-calendar/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/the-events-calendar/)
 * [Active Topics](https://wordpress.org/support/plugin/the-events-calendar/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/the-events-calendar/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/the-events-calendar/reviews/)

## Tags

 * [conflicts](https://wordpress.org/support/topic-tag/conflicts/)
 * [scheduling](https://wordpress.org/support/topic-tag/scheduling/)

 * 1 reply
 * 2 participants
 * Last reply from: [Santiago](https://wordpress.org/support/users/sjaure/)
 * Last activity: [5 years, 10 months ago](https://wordpress.org/support/topic/checking-for-event-overlap/#post-13102745)
 * Status: resolved