Improve performance of AppointmentRules.getOverlap() query

Description

The AppointmentRules.getOverlap() method used by BookingServiceImpl can sometimes take many seconds to return a result for a single row.

On closer inspection, this is because it is using the wrong index. Duplicate the date range onto the participation join so that the correct index is used.

Environment

None

Assignee

Tim Anderson

Reporter

Tim Anderson

Labels

None

Components

Fix versions

Affects versions

Priority

Minor
Configure