Skip to content

Email participants of on-call rotation when alerts occur

Sarah Yasonik requested to merge sy-email-oncall-users-for-alert into master

What does this MR do?

Emails the users who are currently on-call when an alert comes in.

This MR currently targets !52374 (merged) for ease of review. I'll rebase against master once that MR merges.

Context:

  • We have an existing setting which sends emails to project members when alert notifications come in. See Settings > Operations > Incidents : "Send a separate email notification to Developers" (aka IncidentManagement::ProjectIncidentManagementSetting#send_email).
  • This MR piggy-backs on that functionality to notify on-call users of an incoming alert. For this MR, the email is getting sent in all scenarios. In a follow-up, I'll prevent the emails sending for acknowledged alerts per #262866 (comment 496460845).
  • The on-call user(s) for the project are identified based on all available OncallSchedules & their OncallRotations. (This will change down the road once we implement escalation policies & other alerting rules, so I tried to keep that in mind organizationally.)
  • Historical/currently running OncallShifts are stored in the DB for record-keeping !50239 (merged). New shifts are generated based on the attributes of the OncallRotation. We don't want to email someone different from who we've recorded as on-call, so the logic to identify on-call users does two things:
    • first, it looks to the DB for a current on-call shift & uses that if available
    • second, if there is no saved shift, it attempts to generate a shift & use that instead
    • after #262859 (closed) is done, it will be possible to have no one on-call for a rotation & we'll email no one.
  • For most circumstances, we'll expect that if there is a current shift running for a rotation, then it will be saved in the DB. But as this is on-call notifications, I've opted to be cautious and re-generate the shift just is case.

Queries & performance

I tried to shorten & minimize queries as much as possible, but it's a bit tricky. We only need to generate shifts for rotations which do not have one saved, so we end up needing a couple of queries over the same tables.

As on-call schedules are still behind a feature flag, I seeded some local data to test queries. Details of this data creation can be found below.

Local data creation for query analysis

Below is the count of records added.

Projects: 101 # using incident management
OncallShifts: 144904
OncallParticipants: 12045
OncallRotations: 875
OncallSchedules: 293

I didn't want to muck up my DB, so I wrote tests to seed & analyze. It's not fast (~30min), but it's clean enough and left me free to do other things.

# frozen_string_literal: true

require 'spec_helper'
require 'activerecord-explain-analyze'

RSpec.describe Projects::Alerting::NotifyService do
  before_all do
    75.times { create_project_with_oncall }
    @project = create_project_with_oncall
    25.times { create_project_with_oncall }
    
    p "#{Time.current} - Done generating projects."
  end

  describe 'shift finding query' do
    def query(query_time)
      puts "\n\n\nSHIFT-FINDING QUERY EXPLAIN\n\n"
      puts @project.incident_management_oncall_rotations
            .merge(IncidentManagement::OncallShift.for_timestamp(query_time))
            .joins(shifts: { participant: :user })
            .explain(analyze: true)

    end

    it 'pre-rotation start' do query(7.months.ago) end
    it 'all the shifts' do query(2.days.ago) end
    it 'in the future' do query(3.months.from_now) end
    it 'at the current time' do query(Time.current) end
  end

  describe 'shift generating query' do
    def query(query_time)
      puts "\n\n\nSHIFT-GENERATING QUERY EXPLAIN\n\n"
      puts ::IncidentManagement::OncallUsersFinder.new(
        @project,
        oncall_at: query_time
      ).send(:rotations_without_persisted_shifts).explain(analyze: true)
    end

    it 'pre-rotation start' do query(7.months.ago) end
    it 'all the shifts' do query(2.days.ago) end
    it 'in the future' do query(3.months.from_now) end
    it 'at the current time' do query(Time.current) end
  end

  describe 'users query' do
    def query(query_time)
      puts "\n\n\nUSERS QUERY EXPLAIN\n\n"
      puts User.id_in(
        ::IncidentManagement::OncallUsersFinder.new(
          @project,
          oncall_at: query_time
        ).send(:user_ids)
      ).explain(analyze: true)
    end

    # it 'pre-rotation start' do query(7.months.ago) end
    # it 'all the shifts' do query(2.days.ago) end
    # it 'in the future' do query(3.months.from_now) end
    it 'at the current time' do query(Time.current) end
  end

  private

  def create_project_with_oncall
    project = create(:project)
    p "#{Time.current} - Creating project: #{project.id}"

    schedule_count = rand(1..5)
    schedules = create_list(:incident_management_oncall_schedule, schedule_count, project: project) do |schedule|
      rotation_count = rand(1..5)

      schedule.rotations = create_list(:incident_management_oncall_rotation, rotation_count, schedule: schedule) do |rotation|
        rotation.starts_at = rand(6.months.ago..1.month.from_now)
        rotation.length_unit = [:hours, :days, :weeks].sample
        rotation.length = rand(1..12)

        participant_count = rand(3..25)
        rotation.participants = create_list(:incident_management_oncall_participant, participant_count, :with_developer_access, rotation: rotation)

        IncidentManagement::OncallShift.bulk_insert!(
          IncidentManagement::OncallShiftGenerator.new(rotation).for_timeframe(
            starts_at: rotation.starts_at,
            ends_at: rand(5.hours.ago..5.hours.from_now)
          )
        )
      end
    end

    p "#{Time.current}"
    p "#{Time.current} - IncidentManagement::OncallShifts: #{IncidentManagement::OncallShift.count}"
    p "#{Time.current} - IncidentManagement::OncallParticipants: #{IncidentManagement::OncallParticipant.count}"
    p "#{Time.current} - IncidentManagement::OncallRotations: #{IncidentManagement::OncallRotation.count}"
    p "#{Time.current} - IncidentManagement::OncallSchedules: #{IncidentManagement::OncallSchedule.count}"
    project
  end
end
Click for test output w/ index:
"2021-02-03 21:38:34 UTC - Creating project: 1"
"2021-02-03 21:38:38 UTC"
"2021-02-03 21:38:38 UTC - IncidentManagement::OncallShifts: 307"
"2021-02-03 21:38:38 UTC - IncidentManagement::OncallParticipants: 18"
"2021-02-03 21:38:38 UTC - IncidentManagement::OncallRotations: 3"
"2021-02-03 21:38:38 UTC - IncidentManagement::OncallSchedules: 1"
"2021-02-03 21:38:38 UTC - Creating project: 2"
"2021-02-03 21:38:57 UTC"
"2021-02-03 21:38:57 UTC - IncidentManagement::OncallShifts: 833"
"2021-02-03 21:38:57 UTC - IncidentManagement::OncallParticipants: 207"
"2021-02-03 21:38:57 UTC - IncidentManagement::OncallRotations: 15"
"2021-02-03 21:38:57 UTC - IncidentManagement::OncallSchedules: 5"
"2021-02-03 21:38:58 UTC - Creating project: 3"
"2021-02-03 21:39:21 UTC"
"2021-02-03 21:39:21 UTC - IncidentManagement::OncallShifts: 2583"
"2021-02-03 21:39:21 UTC - IncidentManagement::OncallParticipants: 412"
"2021-02-03 21:39:21 UTC - IncidentManagement::OncallRotations: 31"
"2021-02-03 21:39:21 UTC - IncidentManagement::OncallSchedules: 10"
"2021-02-03 21:39:21 UTC - Creating project: 4"
"2021-02-03 21:39:43 UTC"
"2021-02-03 21:39:43 UTC - IncidentManagement::OncallShifts: 6431"
"2021-02-03 21:39:43 UTC - IncidentManagement::OncallParticipants: 565"
"2021-02-03 21:39:43 UTC - IncidentManagement::OncallRotations: 45"
"2021-02-03 21:39:43 UTC - IncidentManagement::OncallSchedules: 13"
"2021-02-03 21:39:43 UTC - Creating project: 5"
"2021-02-03 21:39:50 UTC"
"2021-02-03 21:39:50 UTC - IncidentManagement::OncallShifts: 6452"
"2021-02-03 21:39:50 UTC - IncidentManagement::OncallParticipants: 627"
"2021-02-03 21:39:50 UTC - IncidentManagement::OncallRotations: 50"
"2021-02-03 21:39:50 UTC - IncidentManagement::OncallSchedules: 14"
"2021-02-03 21:39:50 UTC - Creating project: 6"
"2021-02-03 21:40:16 UTC"
"2021-02-03 21:40:16 UTC - IncidentManagement::OncallShifts: 9163"
"2021-02-03 21:40:16 UTC - IncidentManagement::OncallParticipants: 853"
"2021-02-03 21:40:16 UTC - IncidentManagement::OncallRotations: 66"
"2021-02-03 21:40:16 UTC - IncidentManagement::OncallSchedules: 19"
"2021-02-03 21:40:16 UTC - Creating project: 7"
"2021-02-03 21:40:17 UTC"
"2021-02-03 21:40:17 UTC - IncidentManagement::OncallShifts: 9164"
"2021-02-03 21:40:17 UTC - IncidentManagement::OncallParticipants: 863"
"2021-02-03 21:40:17 UTC - IncidentManagement::OncallRotations: 67"
"2021-02-03 21:40:17 UTC - IncidentManagement::OncallSchedules: 20"
"2021-02-03 21:40:17 UTC - Creating project: 8"
"2021-02-03 21:40:39 UTC"
"2021-02-03 21:40:39 UTC - IncidentManagement::OncallShifts: 9717"
"2021-02-03 21:40:39 UTC - IncidentManagement::OncallParticipants: 1056"
"2021-02-03 21:40:39 UTC - IncidentManagement::OncallRotations: 84"
"2021-02-03 21:40:39 UTC - IncidentManagement::OncallSchedules: 25"
"2021-02-03 21:40:39 UTC - Creating project: 9"
"2021-02-03 21:40:46 UTC"
"2021-02-03 21:40:46 UTC - IncidentManagement::OncallShifts: 9851"
"2021-02-03 21:40:46 UTC - IncidentManagement::OncallParticipants: 1123"
"2021-02-03 21:40:46 UTC - IncidentManagement::OncallRotations: 90"
"2021-02-03 21:40:46 UTC - IncidentManagement::OncallSchedules: 27"
"2021-02-03 21:40:46 UTC - Creating project: 10"
"2021-02-03 21:41:02 UTC"
"2021-02-03 21:41:02 UTC - IncidentManagement::OncallShifts: 11219"
"2021-02-03 21:41:02 UTC - IncidentManagement::OncallParticipants: 1260"
"2021-02-03 21:41:02 UTC - IncidentManagement::OncallRotations: 98"
"2021-02-03 21:41:02 UTC - IncidentManagement::OncallSchedules: 29"
"2021-02-03 21:41:02 UTC - Creating project: 11"
"2021-02-03 21:41:07 UTC"
"2021-02-03 21:41:07 UTC - IncidentManagement::OncallShifts: 11370"
"2021-02-03 21:41:07 UTC - IncidentManagement::OncallParticipants: 1310"
"2021-02-03 21:41:07 UTC - IncidentManagement::OncallRotations: 102"
"2021-02-03 21:41:07 UTC - IncidentManagement::OncallSchedules: 32"
"2021-02-03 21:41:07 UTC - Creating project: 12"
"2021-02-03 21:41:20 UTC"
"2021-02-03 21:41:20 UTC - IncidentManagement::OncallShifts: 12046"
"2021-02-03 21:41:20 UTC - IncidentManagement::OncallParticipants: 1417"
"2021-02-03 21:41:20 UTC - IncidentManagement::OncallRotations: 111"
"2021-02-03 21:41:20 UTC - IncidentManagement::OncallSchedules: 35"
"2021-02-03 21:41:20 UTC - Creating project: 13"
"2021-02-03 21:41:23 UTC"
"2021-02-03 21:41:23 UTC - IncidentManagement::OncallShifts: 12066"
"2021-02-03 21:41:23 UTC - IncidentManagement::OncallParticipants: 1435"
"2021-02-03 21:41:23 UTC - IncidentManagement::OncallRotations: 113"
"2021-02-03 21:41:23 UTC - IncidentManagement::OncallSchedules: 37"
"2021-02-03 21:41:23 UTC - Creating project: 14"
"2021-02-03 21:41:37 UTC"
"2021-02-03 21:41:37 UTC - IncidentManagement::OncallShifts: 12882"
"2021-02-03 21:41:37 UTC - IncidentManagement::OncallParticipants: 1582"
"2021-02-03 21:41:37 UTC - IncidentManagement::OncallRotations: 122"
"2021-02-03 21:41:37 UTC - IncidentManagement::OncallSchedules: 42"
"2021-02-03 21:41:37 UTC - Creating project: 15"
"2021-02-03 21:42:01 UTC"
"2021-02-03 21:42:01 UTC - IncidentManagement::OncallShifts: 14270"
"2021-02-03 21:42:01 UTC - IncidentManagement::OncallParticipants: 1794"
"2021-02-03 21:42:01 UTC - IncidentManagement::OncallRotations: 135"
"2021-02-03 21:42:01 UTC - IncidentManagement::OncallSchedules: 47"
"2021-02-03 21:42:01 UTC - Creating project: 16"
"2021-02-03 21:42:21 UTC"
"2021-02-03 21:42:21 UTC - IncidentManagement::OncallShifts: 15523"
"2021-02-03 21:42:21 UTC - IncidentManagement::OncallParticipants: 1948"
"2021-02-03 21:42:21 UTC - IncidentManagement::OncallRotations: 147"
"2021-02-03 21:42:21 UTC - IncidentManagement::OncallSchedules: 52"
"2021-02-03 21:42:21 UTC - Creating project: 17"
"2021-02-03 21:42:35 UTC"
"2021-02-03 21:42:35 UTC - IncidentManagement::OncallShifts: 17395"
"2021-02-03 21:42:35 UTC - IncidentManagement::OncallParticipants: 2056"
"2021-02-03 21:42:35 UTC - IncidentManagement::OncallRotations: 154"
"2021-02-03 21:42:35 UTC - IncidentManagement::OncallSchedules: 54"
"2021-02-03 21:42:36 UTC - Creating project: 18"
"2021-02-03 21:43:02 UTC"
"2021-02-03 21:43:02 UTC - IncidentManagement::OncallShifts: 18651"
"2021-02-03 21:43:02 UTC - IncidentManagement::OncallParticipants: 2260"
"2021-02-03 21:43:02 UTC - IncidentManagement::OncallRotations: 168"
"2021-02-03 21:43:02 UTC - IncidentManagement::OncallSchedules: 57"
"2021-02-03 21:43:02 UTC - Creating project: 19"
"2021-02-03 21:43:09 UTC"
"2021-02-03 21:43:09 UTC - IncidentManagement::OncallShifts: 18661"
"2021-02-03 21:43:09 UTC - IncidentManagement::OncallParticipants: 2319"
"2021-02-03 21:43:09 UTC - IncidentManagement::OncallRotations: 172"
"2021-02-03 21:43:09 UTC - IncidentManagement::OncallSchedules: 58"
"2021-02-03 21:43:09 UTC - Creating project: 20"
"2021-02-03 21:43:21 UTC"
"2021-02-03 21:43:21 UTC - IncidentManagement::OncallShifts: 19313"
"2021-02-03 21:43:21 UTC - IncidentManagement::OncallParticipants: 2415"
"2021-02-03 21:43:21 UTC - IncidentManagement::OncallRotations: 178"
"2021-02-03 21:43:21 UTC - IncidentManagement::OncallSchedules: 60"
"2021-02-03 21:43:21 UTC - Creating project: 21"
"2021-02-03 21:43:29 UTC"
"2021-02-03 21:43:29 UTC - IncidentManagement::OncallShifts: 21472"
"2021-02-03 21:43:29 UTC - IncidentManagement::OncallParticipants: 2450"
"2021-02-03 21:43:29 UTC - IncidentManagement::OncallRotations: 180"
"2021-02-03 21:43:29 UTC - IncidentManagement::OncallSchedules: 61"
"2021-02-03 21:43:29 UTC - Creating project: 22"
"2021-02-03 21:43:44 UTC"
"2021-02-03 21:43:44 UTC - IncidentManagement::OncallShifts: 23068"
"2021-02-03 21:43:44 UTC - IncidentManagement::OncallParticipants: 2577"
"2021-02-03 21:43:44 UTC - IncidentManagement::OncallRotations: 189"
"2021-02-03 21:43:44 UTC - IncidentManagement::OncallSchedules: 63"
"2021-02-03 21:43:44 UTC - Creating project: 23"
"2021-02-03 21:44:01 UTC"
"2021-02-03 21:44:01 UTC - IncidentManagement::OncallShifts: 24707"
"2021-02-03 21:44:01 UTC - IncidentManagement::OncallParticipants: 2702"
"2021-02-03 21:44:01 UTC - IncidentManagement::OncallRotations: 199"
"2021-02-03 21:44:01 UTC - IncidentManagement::OncallSchedules: 65"
"2021-02-03 21:44:01 UTC - Creating project: 24"
"2021-02-03 21:44:36 UTC"
"2021-02-03 21:44:36 UTC - IncidentManagement::OncallShifts: 30843"
"2021-02-03 21:44:36 UTC - IncidentManagement::OncallParticipants: 2906"
"2021-02-03 21:44:36 UTC - IncidentManagement::OncallRotations: 216"
"2021-02-03 21:44:36 UTC - IncidentManagement::OncallSchedules: 70"
"2021-02-03 21:44:36 UTC - Creating project: 25"
"2021-02-03 21:44:48 UTC"
"2021-02-03 21:44:48 UTC - IncidentManagement::OncallShifts: 31550"
"2021-02-03 21:44:48 UTC - IncidentManagement::OncallParticipants: 3012"
"2021-02-03 21:44:48 UTC - IncidentManagement::OncallRotations: 226"
"2021-02-03 21:44:48 UTC - IncidentManagement::OncallSchedules: 73"
"2021-02-03 21:44:49 UTC - Creating project: 26"
"2021-02-03 21:45:10 UTC"
"2021-02-03 21:45:10 UTC - IncidentManagement::OncallShifts: 32437"
"2021-02-03 21:45:10 UTC - IncidentManagement::OncallParticipants: 3200"
"2021-02-03 21:45:10 UTC - IncidentManagement::OncallRotations: 236"
"2021-02-03 21:45:10 UTC - IncidentManagement::OncallSchedules: 75"
"2021-02-03 21:45:10 UTC - Creating project: 27"
"2021-02-03 21:45:25 UTC"
"2021-02-03 21:45:25 UTC - IncidentManagement::OncallShifts: 33242"
"2021-02-03 21:45:25 UTC - IncidentManagement::OncallParticipants: 3340"
"2021-02-03 21:45:25 UTC - IncidentManagement::OncallRotations: 247"
"2021-02-03 21:45:25 UTC - IncidentManagement::OncallSchedules: 80"
"2021-02-03 21:45:26 UTC - Creating project: 28"
"2021-02-03 21:45:36 UTC"
"2021-02-03 21:45:36 UTC - IncidentManagement::OncallShifts: 35108"
"2021-02-03 21:45:36 UTC - IncidentManagement::OncallParticipants: 3396"
"2021-02-03 21:45:36 UTC - IncidentManagement::OncallRotations: 251"
"2021-02-03 21:45:36 UTC - IncidentManagement::OncallSchedules: 82"
"2021-02-03 21:45:36 UTC - Creating project: 29"
"2021-02-03 21:45:50 UTC"
"2021-02-03 21:45:50 UTC - IncidentManagement::OncallShifts: 36335"
"2021-02-03 21:45:50 UTC - IncidentManagement::OncallParticipants: 3512"
"2021-02-03 21:45:50 UTC - IncidentManagement::OncallRotations: 258"
"2021-02-03 21:45:50 UTC - IncidentManagement::OncallSchedules: 85"
"2021-02-03 21:45:50 UTC - Creating project: 30"
"2021-02-03 21:46:11 UTC"
"2021-02-03 21:46:11 UTC - IncidentManagement::OncallShifts: 37532"
"2021-02-03 21:46:11 UTC - IncidentManagement::OncallParticipants: 3702"
"2021-02-03 21:46:11 UTC - IncidentManagement::OncallRotations: 272"
"2021-02-03 21:46:11 UTC - IncidentManagement::OncallSchedules: 89"
"2021-02-03 21:46:11 UTC - Creating project: 31"
"2021-02-03 21:46:47 UTC"
"2021-02-03 21:46:47 UTC - IncidentManagement::OncallShifts: 38008"
"2021-02-03 21:46:47 UTC - IncidentManagement::OncallParticipants: 4021"
"2021-02-03 21:46:47 UTC - IncidentManagement::OncallRotations: 291"
"2021-02-03 21:46:47 UTC - IncidentManagement::OncallSchedules: 94"
"2021-02-03 21:46:47 UTC - Creating project: 32"
"2021-02-03 21:46:49 UTC"
"2021-02-03 21:46:49 UTC - IncidentManagement::OncallShifts: 38010"
"2021-02-03 21:46:49 UTC - IncidentManagement::OncallParticipants: 4042"
"2021-02-03 21:46:49 UTC - IncidentManagement::OncallRotations: 292"
"2021-02-03 21:46:49 UTC - IncidentManagement::OncallSchedules: 95"
"2021-02-03 21:46:49 UTC - Creating project: 33"
"2021-02-03 21:47:07 UTC"
"2021-02-03 21:47:07 UTC - IncidentManagement::OncallShifts: 40195"
"2021-02-03 21:47:07 UTC - IncidentManagement::OncallParticipants: 4171"
"2021-02-03 21:47:07 UTC - IncidentManagement::OncallRotations: 301"
"2021-02-03 21:47:07 UTC - IncidentManagement::OncallSchedules: 97"
"2021-02-03 21:47:07 UTC - Creating project: 34"
"2021-02-03 21:47:18 UTC"
"2021-02-03 21:47:18 UTC - IncidentManagement::OncallShifts: 40543"
"2021-02-03 21:47:18 UTC - IncidentManagement::OncallParticipants: 4268"
"2021-02-03 21:47:18 UTC - IncidentManagement::OncallRotations: 309"
"2021-02-03 21:47:18 UTC - IncidentManagement::OncallSchedules: 99"
"2021-02-03 21:47:18 UTC - Creating project: 35"
"2021-02-03 21:47:40 UTC"
"2021-02-03 21:47:40 UTC - IncidentManagement::OncallShifts: 42238"
"2021-02-03 21:47:40 UTC - IncidentManagement::OncallParticipants: 4454"
"2021-02-03 21:47:40 UTC - IncidentManagement::OncallRotations: 324"
"2021-02-03 21:47:40 UTC - IncidentManagement::OncallSchedules: 104"
"2021-02-03 21:47:40 UTC - Creating project: 36"
"2021-02-03 21:47:51 UTC"
"2021-02-03 21:47:51 UTC - IncidentManagement::OncallShifts: 42731"
"2021-02-03 21:47:51 UTC - IncidentManagement::OncallParticipants: 4543"
"2021-02-03 21:47:51 UTC - IncidentManagement::OncallRotations: 329"
"2021-02-03 21:47:51 UTC - IncidentManagement::OncallSchedules: 105"
"2021-02-03 21:47:52 UTC - Creating project: 37"
"2021-02-03 21:47:55 UTC"
"2021-02-03 21:47:55 UTC - IncidentManagement::OncallShifts: 42745"
"2021-02-03 21:47:55 UTC - IncidentManagement::OncallParticipants: 4573"
"2021-02-03 21:47:55 UTC - IncidentManagement::OncallRotations: 331"
"2021-02-03 21:47:55 UTC - IncidentManagement::OncallSchedules: 107"
"2021-02-03 21:47:55 UTC - Creating project: 38"
"2021-02-03 21:48:20 UTC"
"2021-02-03 21:48:20 UTC - IncidentManagement::OncallShifts: 44416"
"2021-02-03 21:48:20 UTC - IncidentManagement::OncallParticipants: 4787"
"2021-02-03 21:48:20 UTC - IncidentManagement::OncallRotations: 345"
"2021-02-03 21:48:20 UTC - IncidentManagement::OncallSchedules: 110"
"2021-02-03 21:48:20 UTC - Creating project: 39"
"2021-02-03 21:48:34 UTC"
"2021-02-03 21:48:34 UTC - IncidentManagement::OncallShifts: 45861"
"2021-02-03 21:48:34 UTC - IncidentManagement::OncallParticipants: 4882"
"2021-02-03 21:48:34 UTC - IncidentManagement::OncallRotations: 352"
"2021-02-03 21:48:34 UTC - IncidentManagement::OncallSchedules: 112"
"2021-02-03 21:48:34 UTC - Creating project: 40"
"2021-02-03 21:48:51 UTC"
"2021-02-03 21:48:51 UTC - IncidentManagement::OncallShifts: 48971"
"2021-02-03 21:48:51 UTC - IncidentManagement::OncallParticipants: 4980"
"2021-02-03 21:48:51 UTC - IncidentManagement::OncallRotations: 359"
"2021-02-03 21:48:51 UTC - IncidentManagement::OncallSchedules: 115"
"2021-02-03 21:48:52 UTC - Creating project: 41"
"2021-02-03 21:48:58 UTC"
"2021-02-03 21:48:58 UTC - IncidentManagement::OncallShifts: 49496"
"2021-02-03 21:48:58 UTC - IncidentManagement::OncallParticipants: 5024"
"2021-02-03 21:48:58 UTC - IncidentManagement::OncallRotations: 362"
"2021-02-03 21:48:58 UTC - IncidentManagement::OncallSchedules: 117"
"2021-02-03 21:48:58 UTC - Creating project: 42"
"2021-02-03 21:49:14 UTC"
"2021-02-03 21:49:14 UTC - IncidentManagement::OncallShifts: 52523"
"2021-02-03 21:49:14 UTC - IncidentManagement::OncallParticipants: 5123"
"2021-02-03 21:49:14 UTC - IncidentManagement::OncallRotations: 371"
"2021-02-03 21:49:14 UTC - IncidentManagement::OncallSchedules: 120"
"2021-02-03 21:49:14 UTC - Creating project: 43"
"2021-02-03 21:49:20 UTC"
"2021-02-03 21:49:20 UTC - IncidentManagement::OncallShifts: 53044"
"2021-02-03 21:49:20 UTC - IncidentManagement::OncallParticipants: 5165"
"2021-02-03 21:49:20 UTC - IncidentManagement::OncallRotations: 375"
"2021-02-03 21:49:20 UTC - IncidentManagement::OncallSchedules: 121"
"2021-02-03 21:49:20 UTC - Creating project: 44"
"2021-02-03 21:49:40 UTC"
"2021-02-03 21:49:40 UTC - IncidentManagement::OncallShifts: 56098"
"2021-02-03 21:49:40 UTC - IncidentManagement::OncallParticipants: 5315"
"2021-02-03 21:49:40 UTC - IncidentManagement::OncallRotations: 385"
"2021-02-03 21:49:40 UTC - IncidentManagement::OncallSchedules: 124"
"2021-02-03 21:49:40 UTC - Creating project: 45"
"2021-02-03 21:49:51 UTC"
"2021-02-03 21:49:51 UTC - IncidentManagement::OncallShifts: 56445"
"2021-02-03 21:49:51 UTC - IncidentManagement::OncallParticipants: 5408"
"2021-02-03 21:49:51 UTC - IncidentManagement::OncallRotations: 393"
"2021-02-03 21:49:51 UTC - IncidentManagement::OncallSchedules: 127"
"2021-02-03 21:49:51 UTC - Creating project: 46"
"2021-02-03 21:49:59 UTC"
"2021-02-03 21:49:59 UTC - IncidentManagement::OncallShifts: 57009"
"2021-02-03 21:49:59 UTC - IncidentManagement::OncallParticipants: 5475"
"2021-02-03 21:49:59 UTC - IncidentManagement::OncallRotations: 400"
"2021-02-03 21:49:59 UTC - IncidentManagement::OncallSchedules: 129"
"2021-02-03 21:50:00 UTC - Creating project: 47"
"2021-02-03 21:50:16 UTC"
"2021-02-03 21:50:16 UTC - IncidentManagement::OncallShifts: 59224"
"2021-02-03 21:50:16 UTC - IncidentManagement::OncallParticipants: 5552"
"2021-02-03 21:50:16 UTC - IncidentManagement::OncallRotations: 406"
"2021-02-03 21:50:16 UTC - IncidentManagement::OncallSchedules: 131"
"2021-02-03 21:50:16 UTC - Creating project: 48"
"2021-02-03 21:50:48 UTC"
"2021-02-03 21:50:48 UTC - IncidentManagement::OncallShifts: 63578"
"2021-02-03 21:50:48 UTC - IncidentManagement::OncallParticipants: 5742"
"2021-02-03 21:50:48 UTC - IncidentManagement::OncallRotations: 420"
"2021-02-03 21:50:48 UTC - IncidentManagement::OncallSchedules: 136"
"2021-02-03 21:50:48 UTC - Creating project: 49"
"2021-02-03 21:50:51 UTC"
"2021-02-03 21:50:51 UTC - IncidentManagement::OncallShifts: 63603"
"2021-02-03 21:50:51 UTC - IncidentManagement::OncallParticipants: 5763"
"2021-02-03 21:50:51 UTC - IncidentManagement::OncallRotations: 422"
"2021-02-03 21:50:51 UTC - IncidentManagement::OncallSchedules: 138"
"2021-02-03 21:50:51 UTC - Creating project: 50"
"2021-02-03 21:51:19 UTC"
"2021-02-03 21:51:19 UTC - IncidentManagement::OncallShifts: 68067"
"2021-02-03 21:51:19 UTC - IncidentManagement::OncallParticipants: 5955"
"2021-02-03 21:51:19 UTC - IncidentManagement::OncallRotations: 437"
"2021-02-03 21:51:19 UTC - IncidentManagement::OncallSchedules: 143"
"2021-02-03 21:51:20 UTC - Creating project: 51"
"2021-02-03 21:51:56 UTC"
"2021-02-03 21:51:56 UTC - IncidentManagement::OncallShifts: 75049"
"2021-02-03 21:51:56 UTC - IncidentManagement::OncallParticipants: 6097"
"2021-02-03 21:51:56 UTC - IncidentManagement::OncallRotations: 451"
"2021-02-03 21:51:56 UTC - IncidentManagement::OncallSchedules: 146"
"2021-02-03 21:51:56 UTC - Creating project: 52"
"2021-02-03 21:52:12 UTC"
"2021-02-03 21:52:12 UTC - IncidentManagement::OncallShifts: 76026"
"2021-02-03 21:52:12 UTC - IncidentManagement::OncallParticipants: 6236"
"2021-02-03 21:52:12 UTC - IncidentManagement::OncallRotations: 461"
"2021-02-03 21:52:12 UTC - IncidentManagement::OncallSchedules: 149"
"2021-02-03 21:52:12 UTC - Creating project: 53"
"2021-02-03 21:52:29 UTC"
"2021-02-03 21:52:29 UTC - IncidentManagement::OncallShifts: 76453"
"2021-02-03 21:52:29 UTC - IncidentManagement::OncallParticipants: 6380"
"2021-02-03 21:52:29 UTC - IncidentManagement::OncallRotations: 470"
"2021-02-03 21:52:29 UTC - IncidentManagement::OncallSchedules: 153"
"2021-02-03 21:52:29 UTC - Creating project: 54"
"2021-02-03 21:52:42 UTC"
"2021-02-03 21:52:42 UTC - IncidentManagement::OncallShifts: 76784"
"2021-02-03 21:52:42 UTC - IncidentManagement::OncallParticipants: 6467"
"2021-02-03 21:52:42 UTC - IncidentManagement::OncallRotations: 476"
"2021-02-03 21:52:42 UTC - IncidentManagement::OncallSchedules: 155"
"2021-02-03 21:52:42 UTC - Creating project: 55"
"2021-02-03 21:53:04 UTC"
"2021-02-03 21:53:04 UTC - IncidentManagement::OncallShifts: 77489"
"2021-02-03 21:53:04 UTC - IncidentManagement::OncallParticipants: 6666"
"2021-02-03 21:53:04 UTC - IncidentManagement::OncallRotations: 490"
"2021-02-03 21:53:04 UTC - IncidentManagement::OncallSchedules: 160"
"2021-02-03 21:53:04 UTC - Creating project: 56"
"2021-02-03 21:53:23 UTC"
"2021-02-03 21:53:23 UTC - IncidentManagement::OncallShifts: 79943"
"2021-02-03 21:53:23 UTC - IncidentManagement::OncallParticipants: 6790"
"2021-02-03 21:53:23 UTC - IncidentManagement::OncallRotations: 500"
"2021-02-03 21:53:23 UTC - IncidentManagement::OncallSchedules: 163"
"2021-02-03 21:53:23 UTC - Creating project: 57"
"2021-02-03 21:53:58 UTC"
"2021-02-03 21:53:58 UTC - IncidentManagement::OncallShifts: 85077"
"2021-02-03 21:53:58 UTC - IncidentManagement::OncallParticipants: 6968"
"2021-02-03 21:53:58 UTC - IncidentManagement::OncallRotations: 511"
"2021-02-03 21:53:58 UTC - IncidentManagement::OncallSchedules: 167"
"2021-02-03 21:53:58 UTC - Creating project: 58"
"2021-02-03 21:54:38 UTC"
"2021-02-03 21:54:38 UTC - IncidentManagement::OncallShifts: 91203"
"2021-02-03 21:54:38 UTC - IncidentManagement::OncallParticipants: 7187"
"2021-02-03 21:54:38 UTC - IncidentManagement::OncallRotations: 524"
"2021-02-03 21:54:38 UTC - IncidentManagement::OncallSchedules: 172"
"2021-02-03 21:54:38 UTC - Creating project: 59"
"2021-02-03 21:54:44 UTC"
"2021-02-03 21:54:44 UTC - IncidentManagement::OncallShifts: 91730"
"2021-02-03 21:54:44 UTC - IncidentManagement::OncallParticipants: 7236"
"2021-02-03 21:54:44 UTC - IncidentManagement::OncallRotations: 528"
"2021-02-03 21:54:44 UTC - IncidentManagement::OncallSchedules: 173"
"2021-02-03 21:54:44 UTC - Creating project: 60"
"2021-02-03 21:55:24 UTC"
"2021-02-03 21:55:24 UTC - IncidentManagement::OncallShifts: 95757"
"2021-02-03 21:55:24 UTC - IncidentManagement::OncallParticipants: 7514"
"2021-02-03 21:55:24 UTC - IncidentManagement::OncallRotations: 549"
"2021-02-03 21:55:24 UTC - IncidentManagement::OncallSchedules: 178"
"2021-02-03 21:55:24 UTC - Creating project: 61"
"2021-02-03 21:55:43 UTC"
"2021-02-03 21:55:43 UTC - IncidentManagement::OncallShifts: 97935"
"2021-02-03 21:55:43 UTC - IncidentManagement::OncallParticipants: 7636"
"2021-02-03 21:55:43 UTC - IncidentManagement::OncallRotations: 559"
"2021-02-03 21:55:43 UTC - IncidentManagement::OncallSchedules: 181"
"2021-02-03 21:55:43 UTC - Creating project: 62"
"2021-02-03 21:55:52 UTC"
"2021-02-03 21:55:52 UTC - IncidentManagement::OncallShifts: 98502"
"2021-02-03 21:55:52 UTC - IncidentManagement::OncallParticipants: 7692"
"2021-02-03 21:55:52 UTC - IncidentManagement::OncallRotations: 562"
"2021-02-03 21:55:52 UTC - IncidentManagement::OncallSchedules: 183"
"2021-02-03 21:55:52 UTC - Creating project: 63"
"2021-02-03 21:56:52 UTC"
"2021-02-03 21:56:52 UTC - IncidentManagement::OncallShifts: 106833"
"2021-02-03 21:56:52 UTC - IncidentManagement::OncallParticipants: 7989"
"2021-02-03 21:56:52 UTC - IncidentManagement::OncallRotations: 581"
"2021-02-03 21:56:52 UTC - IncidentManagement::OncallSchedules: 188"
"2021-02-03 21:56:52 UTC - Creating project: 64"
"2021-02-03 21:57:05 UTC"
"2021-02-03 21:57:05 UTC - IncidentManagement::OncallShifts: 109338"
"2021-02-03 21:57:05 UTC - IncidentManagement::OncallParticipants: 8045"
"2021-02-03 21:57:05 UTC - IncidentManagement::OncallRotations: 586"
"2021-02-03 21:57:05 UTC - IncidentManagement::OncallSchedules: 191"
"2021-02-03 21:57:05 UTC - Creating project: 65"
"2021-02-03 21:57:15 UTC"
"2021-02-03 21:57:15 UTC - IncidentManagement::OncallShifts: 109949"
"2021-02-03 21:57:15 UTC - IncidentManagement::OncallParticipants: 8120"
"2021-02-03 21:57:15 UTC - IncidentManagement::OncallRotations: 591"
"2021-02-03 21:57:15 UTC - IncidentManagement::OncallSchedules: 193"
"2021-02-03 21:57:15 UTC - Creating project: 66"
"2021-02-03 21:57:35 UTC"
"2021-02-03 21:57:35 UTC - IncidentManagement::OncallShifts: 112518"
"2021-02-03 21:57:35 UTC - IncidentManagement::OncallParticipants: 8254"
"2021-02-03 21:57:35 UTC - IncidentManagement::OncallRotations: 603"
"2021-02-03 21:57:35 UTC - IncidentManagement::OncallSchedules: 196"
"2021-02-03 21:57:35 UTC - Creating project: 67"
"2021-02-03 21:57:52 UTC"
"2021-02-03 21:57:52 UTC - IncidentManagement::OncallShifts: 112926"
"2021-02-03 21:57:52 UTC - IncidentManagement::OncallParticipants: 8409"
"2021-02-03 21:57:52 UTC - IncidentManagement::OncallRotations: 614"
"2021-02-03 21:57:52 UTC - IncidentManagement::OncallSchedules: 199"
"2021-02-03 21:57:52 UTC - Creating project: 68"
"2021-02-03 21:58:13 UTC"
"2021-02-03 21:58:13 UTC - IncidentManagement::OncallShifts: 113331"
"2021-02-03 21:58:13 UTC - IncidentManagement::OncallParticipants: 8592"
"2021-02-03 21:58:13 UTC - IncidentManagement::OncallRotations: 628"
"2021-02-03 21:58:13 UTC - IncidentManagement::OncallSchedules: 204"
"2021-02-03 21:58:13 UTC - Creating project: 69"
"2021-02-03 21:58:18 UTC"
"2021-02-03 21:58:18 UTC - IncidentManagement::OncallShifts: 113986"
"2021-02-03 21:58:18 UTC - IncidentManagement::OncallParticipants: 8619"
"2021-02-03 21:58:18 UTC - IncidentManagement::OncallRotations: 631"
"2021-02-03 21:58:18 UTC - IncidentManagement::OncallSchedules: 205"
"2021-02-03 21:58:18 UTC - Creating project: 70"
"2021-02-03 21:58:39 UTC"
"2021-02-03 21:58:39 UTC - IncidentManagement::OncallShifts: 115268"
"2021-02-03 21:58:39 UTC - IncidentManagement::OncallParticipants: 8775"
"2021-02-03 21:58:39 UTC - IncidentManagement::OncallRotations: 642"
"2021-02-03 21:58:39 UTC - IncidentManagement::OncallSchedules: 209"
"2021-02-03 21:58:39 UTC - Creating project: 71"
"2021-02-03 21:59:19 UTC"
"2021-02-03 21:59:19 UTC - IncidentManagement::OncallShifts: 116475"
"2021-02-03 21:59:19 UTC - IncidentManagement::OncallParticipants: 9102"
"2021-02-03 21:59:19 UTC - IncidentManagement::OncallRotations: 663"
"2021-02-03 21:59:19 UTC - IncidentManagement::OncallSchedules: 214"
"2021-02-03 21:59:20 UTC - Creating project: 72"
"2021-02-03 21:59:34 UTC"
"2021-02-03 21:59:34 UTC - IncidentManagement::OncallShifts: 116997"
"2021-02-03 21:59:34 UTC - IncidentManagement::OncallParticipants: 9218"
"2021-02-03 21:59:34 UTC - IncidentManagement::OncallRotations: 672"
"2021-02-03 21:59:34 UTC - IncidentManagement::OncallSchedules: 216"
"2021-02-03 21:59:34 UTC - Creating project: 73"
"2021-02-03 21:59:50 UTC"
"2021-02-03 21:59:50 UTC - IncidentManagement::OncallShifts: 118178"
"2021-02-03 21:59:50 UTC - IncidentManagement::OncallParticipants: 9308"
"2021-02-03 21:59:50 UTC - IncidentManagement::OncallRotations: 678"
"2021-02-03 21:59:50 UTC - IncidentManagement::OncallSchedules: 219"
"2021-02-03 21:59:50 UTC - Creating project: 74"
"2021-02-03 21:59:52 UTC"
"2021-02-03 21:59:52 UTC - IncidentManagement::OncallShifts: 118189"
"2021-02-03 21:59:52 UTC - IncidentManagement::OncallParticipants: 9323"
"2021-02-03 21:59:52 UTC - IncidentManagement::OncallRotations: 679"
"2021-02-03 21:59:52 UTC - IncidentManagement::OncallSchedules: 220"
"2021-02-03 21:59:52 UTC - Creating project: 75"
"2021-02-03 21:59:56 UTC"
"2021-02-03 21:59:56 UTC - IncidentManagement::OncallShifts: 118506"
"2021-02-03 21:59:56 UTC - IncidentManagement::OncallParticipants: 9352"
"2021-02-03 21:59:56 UTC - IncidentManagement::OncallRotations: 681"
"2021-02-03 21:59:56 UTC - IncidentManagement::OncallSchedules: 221"
"2021-02-03 21:59:56 UTC - Creating project: 76"
"2021-02-03 22:00:05 UTC"
"2021-02-03 22:00:05 UTC - IncidentManagement::OncallShifts: 118624"
"2021-02-03 22:00:05 UTC - IncidentManagement::OncallParticipants: 9414"
"2021-02-03 22:00:05 UTC - IncidentManagement::OncallRotations: 686"
"2021-02-03 22:00:05 UTC - IncidentManagement::OncallSchedules: 223"
"2021-02-03 22:00:05 UTC - Creating project: 77"
"2021-02-03 22:00:20 UTC"
"2021-02-03 22:00:20 UTC - IncidentManagement::OncallShifts: 120951"
"2021-02-03 22:00:20 UTC - IncidentManagement::OncallParticipants: 9454"
"2021-02-03 22:00:20 UTC - IncidentManagement::OncallRotations: 690"
"2021-02-03 22:00:20 UTC - IncidentManagement::OncallSchedules: 226"
"2021-02-03 22:00:20 UTC - Creating project: 78"
"2021-02-03 22:00:39 UTC"
"2021-02-03 22:00:39 UTC - IncidentManagement::OncallShifts: 122545"
"2021-02-03 22:00:39 UTC - IncidentManagement::OncallParticipants: 9609"
"2021-02-03 22:00:39 UTC - IncidentManagement::OncallRotations: 704"
"2021-02-03 22:00:39 UTC - IncidentManagement::OncallSchedules: 230"
"2021-02-03 22:00:40 UTC - Creating project: 79"
"2021-02-03 22:00:44 UTC"
"2021-02-03 22:00:44 UTC - IncidentManagement::OncallShifts: 123154"
"2021-02-03 22:00:44 UTC - IncidentManagement::OncallParticipants: 9647"
"2021-02-03 22:00:44 UTC - IncidentManagement::OncallRotations: 707"
"2021-02-03 22:00:44 UTC - IncidentManagement::OncallSchedules: 232"
"2021-02-03 22:00:44 UTC - Creating project: 80"
"2021-02-03 22:00:47 UTC"
"2021-02-03 22:00:47 UTC - IncidentManagement::OncallShifts: 123213"
"2021-02-03 22:00:47 UTC - IncidentManagement::OncallParticipants: 9672"
"2021-02-03 22:00:47 UTC - IncidentManagement::OncallRotations: 710"
"2021-02-03 22:00:47 UTC - IncidentManagement::OncallSchedules: 233"
"2021-02-03 22:00:47 UTC - Creating project: 81"
"2021-02-03 22:00:58 UTC"
"2021-02-03 22:00:58 UTC - IncidentManagement::OncallShifts: 123261"
"2021-02-03 22:00:58 UTC - IncidentManagement::OncallParticipants: 9770"
"2021-02-03 22:00:58 UTC - IncidentManagement::OncallRotations: 717"
"2021-02-03 22:00:58 UTC - IncidentManagement::OncallSchedules: 235"
"2021-02-03 22:00:58 UTC - Creating project: 82"
"2021-02-03 22:01:01 UTC"
"2021-02-03 22:01:01 UTC - IncidentManagement::OncallShifts: 123565"
"2021-02-03 22:01:01 UTC - IncidentManagement::OncallParticipants: 9794"
"2021-02-03 22:01:01 UTC - IncidentManagement::OncallRotations: 719"
"2021-02-03 22:01:01 UTC - IncidentManagement::OncallSchedules: 236"
"2021-02-03 22:01:01 UTC - Creating project: 83"
"2021-02-03 22:01:19 UTC"
"2021-02-03 22:01:19 UTC - IncidentManagement::OncallShifts: 124364"
"2021-02-03 22:01:19 UTC - IncidentManagement::OncallParticipants: 9950"
"2021-02-03 22:01:19 UTC - IncidentManagement::OncallRotations: 730"
"2021-02-03 22:01:19 UTC - IncidentManagement::OncallSchedules: 239"
"2021-02-03 22:01:20 UTC - Creating project: 84"
"2021-02-03 22:01:36 UTC"
"2021-02-03 22:01:36 UTC - IncidentManagement::OncallShifts: 124723"
"2021-02-03 22:01:36 UTC - IncidentManagement::OncallParticipants: 10097"
"2021-02-03 22:01:36 UTC - IncidentManagement::OncallRotations: 740"
"2021-02-03 22:01:36 UTC - IncidentManagement::OncallSchedules: 241"
"2021-02-03 22:01:36 UTC - Creating project: 85"
"2021-02-03 22:01:45 UTC"
"2021-02-03 22:01:45 UTC - IncidentManagement::OncallShifts: 125282"
"2021-02-03 22:01:45 UTC - IncidentManagement::OncallParticipants: 10182"
"2021-02-03 22:01:45 UTC - IncidentManagement::OncallRotations: 747"
"2021-02-03 22:01:45 UTC - IncidentManagement::OncallSchedules: 243"
"2021-02-03 22:01:45 UTC - Creating project: 86"
"2021-02-03 22:02:05 UTC"
"2021-02-03 22:02:05 UTC - IncidentManagement::OncallShifts: 126204"
"2021-02-03 22:02:05 UTC - IncidentManagement::OncallParticipants: 10354"
"2021-02-03 22:02:05 UTC - IncidentManagement::OncallRotations: 759"
"2021-02-03 22:02:05 UTC - IncidentManagement::OncallSchedules: 248"
"2021-02-03 22:02:05 UTC - Creating project: 87"
"2021-02-03 22:02:25 UTC"
"2021-02-03 22:02:25 UTC - IncidentManagement::OncallShifts: 127065"
"2021-02-03 22:02:25 UTC - IncidentManagement::OncallParticipants: 10535"
"2021-02-03 22:02:25 UTC - IncidentManagement::OncallRotations: 770"
"2021-02-03 22:02:25 UTC - IncidentManagement::OncallSchedules: 252"
"2021-02-03 22:02:25 UTC - Creating project: 88"
"2021-02-03 22:02:28 UTC"
"2021-02-03 22:02:28 UTC - IncidentManagement::OncallShifts: 127075"
"2021-02-03 22:02:28 UTC - IncidentManagement::OncallParticipants: 10565"
"2021-02-03 22:02:28 UTC - IncidentManagement::OncallRotations: 772"
"2021-02-03 22:02:28 UTC - IncidentManagement::OncallSchedules: 253"
"2021-02-03 22:02:28 UTC - Creating project: 89"
"2021-02-03 22:02:39 UTC"
"2021-02-03 22:02:39 UTC - IncidentManagement::OncallShifts: 128847"
"2021-02-03 22:02:39 UTC - IncidentManagement::OncallParticipants: 10615"
"2021-02-03 22:02:39 UTC - IncidentManagement::OncallRotations: 778"
"2021-02-03 22:02:39 UTC - IncidentManagement::OncallSchedules: 255"
"2021-02-03 22:02:39 UTC - Creating project: 90"
"2021-02-03 22:02:45 UTC"
"2021-02-03 22:02:45 UTC - IncidentManagement::OncallShifts: 128866"
"2021-02-03 22:02:45 UTC - IncidentManagement::OncallParticipants: 10684"
"2021-02-03 22:02:45 UTC - IncidentManagement::OncallRotations: 782"
"2021-02-03 22:02:45 UTC - IncidentManagement::OncallSchedules: 257"
"2021-02-03 22:02:46 UTC - Creating project: 91"
"2021-02-03 22:02:57 UTC"
"2021-02-03 22:02:57 UTC - IncidentManagement::OncallShifts: 128973"
"2021-02-03 22:02:57 UTC - IncidentManagement::OncallParticipants: 10787"
"2021-02-03 22:02:57 UTC - IncidentManagement::OncallRotations: 789"
"2021-02-03 22:02:57 UTC - IncidentManagement::OncallSchedules: 261"
"2021-02-03 22:02:57 UTC - Creating project: 92"
"2021-02-03 22:03:32 UTC"
"2021-02-03 22:03:32 UTC - IncidentManagement::OncallShifts: 134885"
"2021-02-03 22:03:32 UTC - IncidentManagement::OncallParticipants: 10958"
"2021-02-03 22:03:32 UTC - IncidentManagement::OncallRotations: 802"
"2021-02-03 22:03:32 UTC - IncidentManagement::OncallSchedules: 266"
"2021-02-03 22:03:32 UTC - Creating project: 93"
"2021-02-03 22:03:35 UTC"
"2021-02-03 22:03:35 UTC - IncidentManagement::OncallShifts: 134972"
"2021-02-03 22:03:35 UTC - IncidentManagement::OncallParticipants: 10983"
"2021-02-03 22:03:35 UTC - IncidentManagement::OncallRotations: 804"
"2021-02-03 22:03:35 UTC - IncidentManagement::OncallSchedules: 267"
"2021-02-03 22:03:35 UTC - Creating project: 94"
"2021-02-03 22:03:40 UTC"
"2021-02-03 22:03:40 UTC - IncidentManagement::OncallShifts: 135311"
"2021-02-03 22:03:40 UTC - IncidentManagement::OncallParticipants: 11032"
"2021-02-03 22:03:40 UTC - IncidentManagement::OncallRotations: 807"
"2021-02-03 22:03:40 UTC - IncidentManagement::OncallSchedules: 268"
"2021-02-03 22:03:40 UTC - Creating project: 95"
"2021-02-03 22:04:05 UTC"
"2021-02-03 22:04:05 UTC - IncidentManagement::OncallShifts: 136366"
"2021-02-03 22:04:05 UTC - IncidentManagement::OncallParticipants: 11247"
"2021-02-03 22:04:05 UTC - IncidentManagement::OncallRotations: 823"
"2021-02-03 22:04:05 UTC - IncidentManagement::OncallSchedules: 273"
"2021-02-03 22:04:05 UTC - Creating project: 96"
"2021-02-03 22:04:42 UTC"
"2021-02-03 22:04:42 UTC - IncidentManagement::OncallShifts: 139945"
"2021-02-03 22:04:42 UTC - IncidentManagement::OncallParticipants: 11475"
"2021-02-03 22:04:42 UTC - IncidentManagement::OncallRotations: 835"
"2021-02-03 22:04:42 UTC - IncidentManagement::OncallSchedules: 277"
"2021-02-03 22:04:42 UTC - Creating project: 97"
"2021-02-03 22:04:53 UTC"
"2021-02-03 22:04:53 UTC - IncidentManagement::OncallShifts: 140037"
"2021-02-03 22:04:53 UTC - IncidentManagement::OncallParticipants: 11579"
"2021-02-03 22:04:53 UTC - IncidentManagement::OncallRotations: 843"
"2021-02-03 22:04:53 UTC - IncidentManagement::OncallSchedules: 282"
"2021-02-03 22:04:53 UTC - Creating project: 98"
"2021-02-03 22:05:37 UTC"
"2021-02-03 22:05:37 UTC - IncidentManagement::OncallShifts: 143984"
"2021-02-03 22:05:37 UTC - IncidentManagement::OncallParticipants: 11896"
"2021-02-03 22:05:37 UTC - IncidentManagement::OncallRotations: 863"
"2021-02-03 22:05:37 UTC - IncidentManagement::OncallSchedules: 287"
"2021-02-03 22:05:37 UTC - Creating project: 99"
"2021-02-03 22:05:38 UTC"
"2021-02-03 22:05:38 UTC - IncidentManagement::OncallShifts: 143986"
"2021-02-03 22:05:38 UTC - IncidentManagement::OncallParticipants: 11908"
"2021-02-03 22:05:38 UTC - IncidentManagement::OncallRotations: 864"
"2021-02-03 22:05:38 UTC - IncidentManagement::OncallSchedules: 288"
"2021-02-03 22:05:38 UTC - Creating project: 100"
"2021-02-03 22:05:48 UTC"
"2021-02-03 22:05:48 UTC - IncidentManagement::OncallShifts: 144417"
"2021-02-03 22:05:48 UTC - IncidentManagement::OncallParticipants: 11989"
"2021-02-03 22:05:48 UTC - IncidentManagement::OncallRotations: 870"
"2021-02-03 22:05:48 UTC - IncidentManagement::OncallSchedules: 290"
"2021-02-03 22:05:48 UTC - Creating project: 101"
"2021-02-03 22:05:54 UTC"
"2021-02-03 22:05:54 UTC - IncidentManagement::OncallShifts: 144904"
"2021-02-03 22:05:54 UTC - IncidentManagement::OncallParticipants: 12045"
"2021-02-03 22:05:54 UTC - IncidentManagement::OncallRotations: 875"
"2021-02-03 22:05:54 UTC - IncidentManagement::OncallSchedules: 293"
"2021-02-03 22:05:54 UTC - Done generating projects."



SHIFT-FINDING QUERY EXPLAIN

EXPLAIN for: SELECT "incident_management_oncall_rotations".* FROM "incident_management_oncall_rotations" INNER JOIN "incident_management_oncall_schedules" ON "incident_management_oncall_rotations"."oncall_schedule_id" = "incident_management_oncall_schedules"."id" INNER JOIN "incident_management_oncall_shifts" ON "incident_management_oncall_shifts"."rotation_id" = "incident_management_oncall_rotations"."id" INNER JOIN "incident_management_oncall_participants" ON "incident_management_oncall_participants"."id" = "incident_management_oncall_shifts"."participant_id" INNER JOIN "users" ON "users"."id" = "incident_management_oncall_participants"."user_id" WHERE "incident_management_oncall_schedules"."project_id" = 76 AND (incident_management_oncall_shifts.starts_at <= '2020-07-03 22:05:55.015902' AND incident_management_oncall_shifts.ends_at > '2020-07-03 22:05:55.015902') /*application:test,correlation_id:9d03079343bc5a2e4c88dc45f4ca5022*/
Nested Loop  (cost=1.40..114.03 rows=95 width=78) (actual time=0.035..0.037 rows=0 loops=1)
  Output: incident_management_oncall_rotations.id, incident_management_oncall_rotations.created_at, incident_management_oncall_rotations.updated_at, incident_management_oncall_rotations.oncall_schedule_id, incident_management_oncall_rotations.length, incident_management_oncall_rotations.length_unit, incident_management_oncall_rotations.starts_at, incident_management_oncall_rotations.name
  Inner Unique: true
  Buffers: shared hit=23
  ->  Nested Loop  (cost=1.13..82.54 rows=95 width=86) (actual time=0.035..0.036 rows=0 loops=1)
        Output: incident_management_oncall_rotations.id, incident_management_oncall_rotations.created_at, incident_management_oncall_rotations.updated_at, incident_management_oncall_rotations.oncall_schedule_id, incident_management_oncall_rotations.length, incident_management_oncall_rotations.length_unit, incident_management_oncall_rotations.starts_at, incident_management_oncall_rotations.name, incident_management_oncall_participants.user_id
        Inner Unique: true
        Buffers: shared hit=23
        ->  Nested Loop  (cost=0.84..53.07 rows=95 width=86) (actual time=0.035..0.036 rows=0 loops=1)
              Output: incident_management_oncall_rotations.id, incident_management_oncall_rotations.created_at, incident_management_oncall_rotations.updated_at, incident_management_oncall_rotations.oncall_schedule_id, incident_management_oncall_rotations.length, incident_management_oncall_rotations.length_unit, incident_management_oncall_rotations.starts_at, incident_management_oncall_rotations.name, incident_management_oncall_shifts.participant_id
              Buffers: shared hit=23
              ->  Nested Loop  (cost=0.42..16.36 rows=5 width=78) (actual time=0.016..0.022 rows=5 loops=1)
                    Output: incident_management_oncall_rotations.id, incident_management_oncall_rotations.created_at, incident_management_oncall_rotations.updated_at, incident_management_oncall_rotations.oncall_schedule_id, incident_management_oncall_rotations.length, incident_management_oncall_rotations.length_unit, incident_management_oncall_rotations.starts_at, incident_management_oncall_rotations.name
                    Buffers: shared hit=8
                    ->  Index Scan using index_incident_management_oncall_schedules_on_project_id on public.incident_management_oncall_schedules  (cost=0.15..4.20 rows=3 width=8) (actual time=0.008..0.009 rows=2 loops=1)
                          Output: incident_management_oncall_schedules.id, incident_management_oncall_schedules.created_at, incident_management_oncall_schedules.updated_at, incident_management_oncall_schedules.project_id, incident_management_oncall_schedules.iid, incident_management_oncall_schedules.name, incident_management_oncall_schedules.description, incident_management_oncall_schedules.timezone
                          Index Cond: (incident_management_oncall_schedules.project_id = 76)
                          Buffers: shared hit=2
                    ->  Index Scan using index_inc_mgmnt_oncall_rotations_on_oncall_schedule_id_and_name on public.incident_management_oncall_rotations  (cost=0.28..4.01 rows=4 width=78) (actual time=0.003..0.004 rows=2 loops=2)
                          Output: incident_management_oncall_rotations.id, incident_management_oncall_rotations.created_at, incident_management_oncall_rotations.updated_at, incident_management_oncall_rotations.oncall_schedule_id, incident_management_oncall_rotations.length, incident_management_oncall_rotations.length_unit, incident_management_oncall_rotations.starts_at, incident_management_oncall_rotations.name
                          Index Cond: (incident_management_oncall_rotations.oncall_schedule_id = incident_management_oncall_schedules.id)
                          Buffers: shared hit=6
              ->  Index Scan using index_oncall_shifts_on_rotation_id_and_starts_at_and_ends_at on public.incident_management_oncall_shifts  (cost=0.42..6.53 rows=81 width=16) (actual time=0.002..0.002 rows=0 loops=5)
                    Output: incident_management_oncall_shifts.id, incident_management_oncall_shifts.rotation_id, incident_management_oncall_shifts.participant_id, incident_management_oncall_shifts.starts_at, incident_management_oncall_shifts.ends_at
                    Index Cond: ((incident_management_oncall_shifts.rotation_id = incident_management_oncall_rotations.id) AND (incident_management_oncall_shifts.starts_at <= '2020-07-03 22:05:55.015902+00'::timestamp with time zone) AND (incident_management_oncall_shifts.ends_at > '2020-07-03 22:05:55.015902+00'::timestamp with time zone))
                    Buffers: shared hit=15
        ->  Index Scan using incident_management_oncall_participants_pkey on public.incident_management_oncall_participants  (cost=0.29..0.31 rows=1 width=16) (never executed)
              Output: incident_management_oncall_participants.id, incident_management_oncall_participants.oncall_rotation_id, incident_management_oncall_participants.user_id, incident_management_oncall_participants.color_palette, incident_management_oncall_participants.color_weight
              Index Cond: (incident_management_oncall_participants.id = incident_management_oncall_shifts.participant_id)
  ->  Index Only Scan using users_pkey on public.users  (cost=0.28..0.33 rows=1 width=4) (never executed)
        Output: users.id
        Index Cond: (users.id = incident_management_oncall_participants.user_id)
        Heap Fetches: 0
Planning Time: 0.530 ms
Execution Time: 0.073 ms
.


SHIFT-FINDING QUERY EXPLAIN

EXPLAIN for: SELECT "incident_management_oncall_rotations".* FROM "incident_management_oncall_rotations" INNER JOIN "incident_management_oncall_schedules" ON "incident_management_oncall_rotations"."oncall_schedule_id" = "incident_management_oncall_schedules"."id" INNER JOIN "incident_management_oncall_shifts" ON "incident_management_oncall_shifts"."rotation_id" = "incident_management_oncall_rotations"."id" INNER JOIN "incident_management_oncall_participants" ON "incident_management_oncall_participants"."id" = "incident_management_oncall_shifts"."participant_id" INNER JOIN "users" ON "users"."id" = "incident_management_oncall_participants"."user_id" WHERE "incident_management_oncall_schedules"."project_id" = 76 AND (incident_management_oncall_shifts.starts_at <= '2021-02-01 22:05:55.100016' AND incident_management_oncall_shifts.ends_at > '2021-02-01 22:05:55.100016') /*application:test,correlation_id:7ac5e44c96ffb07260296b11b46c6816*/
Nested Loop  (cost=1.40..114.03 rows=95 width=78) (actual time=0.022..0.060 rows=5 loops=1)
  Output: incident_management_oncall_rotations.id, incident_management_oncall_rotations.created_at, incident_management_oncall_rotations.updated_at, incident_management_oncall_rotations.oncall_schedule_id, incident_management_oncall_rotations.length, incident_management_oncall_rotations.length_unit, incident_management_oncall_rotations.starts_at, incident_management_oncall_rotations.name
  Inner Unique: true
  Buffers: shared hit=59
  ->  Nested Loop  (cost=1.13..82.54 rows=95 width=86) (actual time=0.018..0.048 rows=5 loops=1)
        Output: incident_management_oncall_rotations.id, incident_management_oncall_rotations.created_at, incident_management_oncall_rotations.updated_at, incident_management_oncall_rotations.oncall_schedule_id, incident_management_oncall_rotations.length, incident_management_oncall_rotations.length_unit, incident_management_oncall_rotations.starts_at, incident_management_oncall_rotations.name, incident_management_oncall_participants.user_id
        Inner Unique: true
        Buffers: shared hit=44
        ->  Nested Loop  (cost=0.84..53.07 rows=95 width=86) (actual time=0.015..0.036 rows=5 loops=1)
              Output: incident_management_oncall_rotations.id, incident_management_oncall_rotations.created_at, incident_management_oncall_rotations.updated_at, incident_management_oncall_rotations.oncall_schedule_id, incident_management_oncall_rotations.length, incident_management_oncall_rotations.length_unit, incident_management_oncall_rotations.starts_at, incident_management_oncall_rotations.name, incident_management_oncall_shifts.participant_id
              Buffers: shared hit=29
              ->  Nested Loop  (cost=0.42..16.36 rows=5 width=78) (actual time=0.010..0.015 rows=5 loops=1)
                    Output: incident_management_oncall_rotations.id, incident_management_oncall_rotations.created_at, incident_management_oncall_rotations.updated_at, incident_management_oncall_rotations.oncall_schedule_id, incident_management_oncall_rotations.length, incident_management_oncall_rotations.length_unit, incident_management_oncall_rotations.starts_at, incident_management_oncall_rotations.name
                    Buffers: shared hit=8
                    ->  Index Scan using index_incident_management_oncall_schedules_on_project_id on public.incident_management_oncall_schedules  (cost=0.15..4.20 rows=3 width=8) (actual time=0.005..0.005 rows=2 loops=1)
                          Output: incident_management_oncall_schedules.id, incident_management_oncall_schedules.created_at, incident_management_oncall_schedules.updated_at, incident_management_oncall_schedules.project_id, incident_management_oncall_schedules.iid, incident_management_oncall_schedules.name, incident_management_oncall_schedules.description, incident_management_oncall_schedules.timezone
                          Index Cond: (incident_management_oncall_schedules.project_id = 76)
                          Buffers: shared hit=2
                    ->  Index Scan using index_inc_mgmnt_oncall_rotations_on_oncall_schedule_id_and_name on public.incident_management_oncall_rotations  (cost=0.28..4.01 rows=4 width=78) (actual time=0.002..0.003 rows=2 loops=2)
                          Output: incident_management_oncall_rotations.id, incident_management_oncall_rotations.created_at, incident_management_oncall_rotations.updated_at, incident_management_oncall_rotations.oncall_schedule_id, incident_management_oncall_rotations.length, incident_management_oncall_rotations.length_unit, incident_management_oncall_rotations.starts_at, incident_management_oncall_rotations.name
                          Index Cond: (incident_management_oncall_rotations.oncall_schedule_id = incident_management_oncall_schedules.id)
                          Buffers: shared hit=6
              ->  Index Scan using index_oncall_shifts_on_rotation_id_and_starts_at_and_ends_at on public.incident_management_oncall_shifts  (cost=0.42..6.53 rows=81 width=16) (actual time=0.003..0.003 rows=1 loops=5)
                    Output: incident_management_oncall_shifts.id, incident_management_oncall_shifts.rotation_id, incident_management_oncall_shifts.participant_id, incident_management_oncall_shifts.starts_at, incident_management_oncall_shifts.ends_at
                    Index Cond: ((incident_management_oncall_shifts.rotation_id = incident_management_oncall_rotations.id) AND (incident_management_oncall_shifts.starts_at <= '2021-02-01 22:05:55.100016+00'::timestamp with time zone) AND (incident_management_oncall_shifts.ends_at > '2021-02-01 22:05:55.100016+00'::timestamp with time zone))
                    Buffers: shared hit=21
        ->  Index Scan using incident_management_oncall_participants_pkey on public.incident_management_oncall_participants  (cost=0.29..0.31 rows=1 width=16) (actual time=0.002..0.002 rows=1 loops=5)
              Output: incident_management_oncall_participants.id, incident_management_oncall_participants.oncall_rotation_id, incident_management_oncall_participants.user_id, incident_management_oncall_participants.color_palette, incident_management_oncall_participants.color_weight
              Index Cond: (incident_management_oncall_participants.id = incident_management_oncall_shifts.participant_id)
              Buffers: shared hit=15
  ->  Index Only Scan using users_pkey on public.users  (cost=0.28..0.33 rows=1 width=4) (actual time=0.002..0.002 rows=1 loops=5)
        Output: users.id
        Index Cond: (users.id = incident_management_oncall_participants.user_id)
        Heap Fetches: 5
        Buffers: shared hit=15
Planning Time: 0.453 ms
Execution Time: 0.087 ms
.


SHIFT-FINDING QUERY EXPLAIN

EXPLAIN for: SELECT "incident_management_oncall_rotations".* FROM "incident_management_oncall_rotations" INNER JOIN "incident_management_oncall_schedules" ON "incident_management_oncall_rotations"."oncall_schedule_id" = "incident_management_oncall_schedules"."id" INNER JOIN "incident_management_oncall_shifts" ON "incident_management_oncall_shifts"."rotation_id" = "incident_management_oncall_rotations"."id" INNER JOIN "incident_management_oncall_participants" ON "incident_management_oncall_participants"."id" = "incident_management_oncall_shifts"."participant_id" INNER JOIN "users" ON "users"."id" = "incident_management_oncall_participants"."user_id" WHERE "incident_management_oncall_schedules"."project_id" = 76 AND (incident_management_oncall_shifts.starts_at <= '2021-05-03 22:05:55.146882' AND incident_management_oncall_shifts.ends_at > '2021-05-03 22:05:55.146882') /*application:test,correlation_id:79479a019049348f45ac2d8398f18469*/
Nested Loop  (cost=1.40..114.03 rows=95 width=78) (actual time=0.675..0.677 rows=0 loops=1)
  Output: incident_management_oncall_rotations.id, incident_management_oncall_rotations.created_at, incident_management_oncall_rotations.updated_at, incident_management_oncall_rotations.oncall_schedule_id, incident_management_oncall_rotations.length, incident_management_oncall_rotations.length_unit, incident_management_oncall_rotations.starts_at, incident_management_oncall_rotations.name
  Inner Unique: true
  Buffers: shared hit=24
  ->  Nested Loop  (cost=1.13..82.54 rows=95 width=86) (actual time=0.675..0.676 rows=0 loops=1)
        Output: incident_management_oncall_rotations.id, incident_management_oncall_rotations.created_at, incident_management_oncall_rotations.updated_at, incident_management_oncall_rotations.oncall_schedule_id, incident_management_oncall_rotations.length, incident_management_oncall_rotations.length_unit, incident_management_oncall_rotations.starts_at, incident_management_oncall_rotations.name, incident_management_oncall_participants.user_id
        Inner Unique: true
        Buffers: shared hit=24
        ->  Nested Loop  (cost=0.84..53.07 rows=95 width=86) (actual time=0.675..0.676 rows=0 loops=1)
              Output: incident_management_oncall_rotations.id, incident_management_oncall_rotations.created_at, incident_management_oncall_rotations.updated_at, incident_management_oncall_rotations.oncall_schedule_id, incident_management_oncall_rotations.length, incident_management_oncall_rotations.length_unit, incident_management_oncall_rotations.starts_at, incident_management_oncall_rotations.name, incident_management_oncall_shifts.participant_id
              Buffers: shared hit=24
              ->  Nested Loop  (cost=0.42..16.36 rows=5 width=78) (actual time=0.010..0.025 rows=5 loops=1)
                    Output: incident_management_oncall_rotations.id, incident_management_oncall_rotations.created_at, incident_management_oncall_rotations.updated_at, incident_management_oncall_rotations.oncall_schedule_id, incident_management_oncall_rotations.length, incident_management_oncall_rotations.length_unit, incident_management_oncall_rotations.starts_at, incident_management_oncall_rotations.name
                    Buffers: shared hit=8
                    ->  Index Scan using index_incident_management_oncall_schedules_on_project_id on public.incident_management_oncall_schedules  (cost=0.15..4.20 rows=3 width=8) (actual time=0.005..0.006 rows=2 loops=1)
                          Output: incident_management_oncall_schedules.id, incident_management_oncall_schedules.created_at, incident_management_oncall_schedules.updated_at, incident_management_oncall_schedules.project_id, incident_management_oncall_schedules.iid, incident_management_oncall_schedules.name, incident_management_oncall_schedules.description, incident_management_oncall_schedules.timezone
                          Index Cond: (incident_management_oncall_schedules.project_id = 76)
                          Buffers: shared hit=2
                    ->  Index Scan using index_inc_mgmnt_oncall_rotations_on_oncall_schedule_id_and_name on public.incident_management_oncall_rotations  (cost=0.28..4.01 rows=4 width=78) (actual time=0.004..0.006 rows=2 loops=2)
                          Output: incident_management_oncall_rotations.id, incident_management_oncall_rotations.created_at, incident_management_oncall_rotations.updated_at, incident_management_oncall_rotations.oncall_schedule_id, incident_management_oncall_rotations.length, incident_management_oncall_rotations.length_unit, incident_management_oncall_rotations.starts_at, incident_management_oncall_rotations.name
                          Index Cond: (incident_management_oncall_rotations.oncall_schedule_id = incident_management_oncall_schedules.id)
                          Buffers: shared hit=6
              ->  Index Scan using index_oncall_shifts_on_rotation_id_and_starts_at_and_ends_at on public.incident_management_oncall_shifts  (cost=0.42..6.53 rows=81 width=16) (actual time=0.129..0.129 rows=0 loops=5)
                    Output: incident_management_oncall_shifts.id, incident_management_oncall_shifts.rotation_id, incident_management_oncall_shifts.participant_id, incident_management_oncall_shifts.starts_at, incident_management_oncall_shifts.ends_at
                    Index Cond: ((incident_management_oncall_shifts.rotation_id = incident_management_oncall_rotations.id) AND (incident_management_oncall_shifts.starts_at <= '2021-05-03 22:05:55.146882+00'::timestamp with time zone) AND (incident_management_oncall_shifts.ends_at > '2021-05-03 22:05:55.146882+00'::timestamp with time zone))
                    Buffers: shared hit=16
        ->  Index Scan using incident_management_oncall_participants_pkey on public.incident_management_oncall_participants  (cost=0.29..0.31 rows=1 width=16) (never executed)
              Output: incident_management_oncall_participants.id, incident_management_oncall_participants.oncall_rotation_id, incident_management_oncall_participants.user_id, incident_management_oncall_participants.color_palette, incident_management_oncall_participants.color_weight
              Index Cond: (incident_management_oncall_participants.id = incident_management_oncall_shifts.participant_id)
  ->  Index Only Scan using users_pkey on public.users  (cost=0.28..0.33 rows=1 width=4) (never executed)
        Output: users.id
        Index Cond: (users.id = incident_management_oncall_participants.user_id)
        Heap Fetches: 0
Planning Time: 0.442 ms
Execution Time: 0.712 ms
.


SHIFT-FINDING QUERY EXPLAIN

EXPLAIN for: SELECT "incident_management_oncall_rotations".* FROM "incident_management_oncall_rotations" INNER JOIN "incident_management_oncall_schedules" ON "incident_management_oncall_rotations"."oncall_schedule_id" = "incident_management_oncall_schedules"."id" INNER JOIN "incident_management_oncall_shifts" ON "incident_management_oncall_shifts"."rotation_id" = "incident_management_oncall_rotations"."id" INNER JOIN "incident_management_oncall_participants" ON "incident_management_oncall_participants"."id" = "incident_management_oncall_shifts"."participant_id" INNER JOIN "users" ON "users"."id" = "incident_management_oncall_participants"."user_id" WHERE "incident_management_oncall_schedules"."project_id" = 76 AND (incident_management_oncall_shifts.starts_at <= '2021-02-03 22:05:55.185606' AND incident_management_oncall_shifts.ends_at > '2021-02-03 22:05:55.185606') /*application:test,correlation_id:fea20f09b9d108ba84a337bff60b79cf*/
Nested Loop  (cost=1.40..114.03 rows=95 width=78) (actual time=0.022..0.061 rows=5 loops=1)
  Output: incident_management_oncall_rotations.id, incident_management_oncall_rotations.created_at, incident_management_oncall_rotations.updated_at, incident_management_oncall_rotations.oncall_schedule_id, incident_management_oncall_rotations.length, incident_management_oncall_rotations.length_unit, incident_management_oncall_rotations.starts_at, incident_management_oncall_rotations.name
  Inner Unique: true
  Buffers: shared hit=59
  ->  Nested Loop  (cost=1.13..82.54 rows=95 width=86) (actual time=0.018..0.048 rows=5 loops=1)
        Output: incident_management_oncall_rotations.id, incident_management_oncall_rotations.created_at, incident_management_oncall_rotations.updated_at, incident_management_oncall_rotations.oncall_schedule_id, incident_management_oncall_rotations.length, incident_management_oncall_rotations.length_unit, incident_management_oncall_rotations.starts_at, incident_management_oncall_rotations.name, incident_management_oncall_participants.user_id
        Inner Unique: true
        Buffers: shared hit=44
        ->  Nested Loop  (cost=0.84..53.07 rows=95 width=86) (actual time=0.015..0.036 rows=5 loops=1)
              Output: incident_management_oncall_rotations.id, incident_management_oncall_rotations.created_at, incident_management_oncall_rotations.updated_at, incident_management_oncall_rotations.oncall_schedule_id, incident_management_oncall_rotations.length, incident_management_oncall_rotations.length_unit, incident_management_oncall_rotations.starts_at, incident_management_oncall_rotations.name, incident_management_oncall_shifts.participant_id
              Buffers: shared hit=29
              ->  Nested Loop  (cost=0.42..16.36 rows=5 width=78) (actual time=0.009..0.015 rows=5 loops=1)
                    Output: incident_management_oncall_rotations.id, incident_management_oncall_rotations.created_at, incident_management_oncall_rotations.updated_at, incident_management_oncall_rotations.oncall_schedule_id, incident_management_oncall_rotations.length, incident_management_oncall_rotations.length_unit, incident_management_oncall_rotations.starts_at, incident_management_oncall_rotations.name
                    Buffers: shared hit=8
                    ->  Index Scan using index_incident_management_oncall_schedules_on_project_id on public.incident_management_oncall_schedules  (cost=0.15..4.20 rows=3 width=8) (actual time=0.005..0.005 rows=2 loops=1)
                          Output: incident_management_oncall_schedules.id, incident_management_oncall_schedules.created_at, incident_management_oncall_schedules.updated_at, incident_management_oncall_schedules.project_id, incident_management_oncall_schedules.iid, incident_management_oncall_schedules.name, incident_management_oncall_schedules.description, incident_management_oncall_schedules.timezone
                          Index Cond: (incident_management_oncall_schedules.project_id = 76)
                          Buffers: shared hit=2
                    ->  Index Scan using index_inc_mgmnt_oncall_rotations_on_oncall_schedule_id_and_name on public.incident_management_oncall_rotations  (cost=0.28..4.01 rows=4 width=78) (actual time=0.002..0.003 rows=2 loops=2)
                          Output: incident_management_oncall_rotations.id, incident_management_oncall_rotations.created_at, incident_management_oncall_rotations.updated_at, incident_management_oncall_rotations.oncall_schedule_id, incident_management_oncall_rotations.length, incident_management_oncall_rotations.length_unit, incident_management_oncall_rotations.starts_at, incident_management_oncall_rotations.name
                          Index Cond: (incident_management_oncall_rotations.oncall_schedule_id = incident_management_oncall_schedules.id)
                          Buffers: shared hit=6
              ->  Index Scan using index_oncall_shifts_on_rotation_id_and_starts_at_and_ends_at on public.incident_management_oncall_shifts  (cost=0.42..6.53 rows=81 width=16) (actual time=0.003..0.003 rows=1 loops=5)
                    Output: incident_management_oncall_shifts.id, incident_management_oncall_shifts.rotation_id, incident_management_oncall_shifts.participant_id, incident_management_oncall_shifts.starts_at, incident_management_oncall_shifts.ends_at
                    Index Cond: ((incident_management_oncall_shifts.rotation_id = incident_management_oncall_rotations.id) AND (incident_management_oncall_shifts.starts_at <= '2021-02-03 22:05:55.185606+00'::timestamp with time zone) AND (incident_management_oncall_shifts.ends_at > '2021-02-03 22:05:55.185606+00'::timestamp with time zone))
                    Buffers: shared hit=21
        ->  Index Scan using incident_management_oncall_participants_pkey on public.incident_management_oncall_participants  (cost=0.29..0.31 rows=1 width=16) (actual time=0.002..0.002 rows=1 loops=5)
              Output: incident_management_oncall_participants.id, incident_management_oncall_participants.oncall_rotation_id, incident_management_oncall_participants.user_id, incident_management_oncall_participants.color_palette, incident_management_oncall_participants.color_weight
              Index Cond: (incident_management_oncall_participants.id = incident_management_oncall_shifts.participant_id)
              Buffers: shared hit=15
  ->  Index Only Scan using users_pkey on public.users  (cost=0.28..0.33 rows=1 width=4) (actual time=0.002..0.002 rows=1 loops=5)
        Output: users.id
        Index Cond: (users.id = incident_management_oncall_participants.user_id)
        Heap Fetches: 5
        Buffers: shared hit=15
Planning Time: 0.459 ms
Execution Time: 0.088 ms
.


SHIFT-GENERATING QUERY EXPLAIN

EXPLAIN for: SELECT DISTINCT "incident_management_oncall_rotations"."id" AS t0_r0, "incident_management_oncall_rotations"."created_at" AS t0_r1, "incident_management_oncall_rotations"."updated_at" AS t0_r2, "incident_management_oncall_rotations"."oncall_schedule_id" AS t0_r3, "incident_management_oncall_rotations"."length" AS t0_r4, "incident_management_oncall_rotations"."length_unit" AS t0_r5, "incident_management_oncall_rotations"."starts_at" AS t0_r6, "incident_management_oncall_rotations"."name" AS t0_r7, "incident_management_oncall_participants"."id" AS t1_r0, "incident_management_oncall_participants"."oncall_rotation_id" AS t1_r1, "incident_management_oncall_participants"."user_id" AS t1_r2, "incident_management_oncall_participants"."color_palette" AS t1_r3, "incident_management_oncall_participants"."color_weight" AS t1_r4, "schedules_incident_management_oncall_rotations"."id" AS t2_r0, "schedules_incident_management_oncall_rotations"."created_at" AS t2_r1, "schedules_incident_management_oncall_rotations"."updated_at" AS t2_r2, "schedules_incident_management_oncall_rotations"."project_id" AS t2_r3, "schedules_incident_management_oncall_rotations"."iid" AS t2_r4, "schedules_incident_management_oncall_rotations"."name" AS t2_r5, "schedules_incident_management_oncall_rotations"."description" AS t2_r6, "schedules_incident_management_oncall_rotations"."timezone" AS t2_r7 FROM "incident_management_oncall_rotations" INNER JOIN "incident_management_oncall_schedules" ON "incident_management_oncall_rotations"."oncall_schedule_id" = "incident_management_oncall_schedules"."id" INNER JOIN "incident_management_oncall_participants" ON "incident_management_oncall_participants"."oncall_rotation_id" = "incident_management_oncall_rotations"."id" INNER JOIN "incident_management_oncall_schedules" "schedules_incident_management_oncall_rotations" ON "schedules_incident_management_oncall_rotations"."id" = "incident_management_oncall_rotations"."oncall_schedule_id" WHERE "incident_management_oncall_schedules"."project_id" = 76 AND 1=1 ORDER BY "incident_management_oncall_rotations"."id" ASC, incident_management_oncall_participants.id ASC /*application:test,correlation_id:054ffa89f0c409b72c5b02c737666f47*/
Unique  (cost=24.46..28.26 rows=76 width=238) (actual time=0.686..0.732 rows=62 loops=1)
  Output: incident_management_oncall_rotations.id, incident_management_oncall_rotations.created_at, incident_management_oncall_rotations.updated_at, incident_management_oncall_rotations.oncall_schedule_id, incident_management_oncall_rotations.length, incident_management_oncall_rotations.length_unit, incident_management_oncall_rotations.starts_at, incident_management_oncall_rotations.name, incident_management_oncall_participants.id, incident_management_oncall_participants.oncall_rotation_id, incident_management_oncall_participants.user_id, incident_management_oncall_participants.color_palette, incident_management_oncall_participants.color_weight, schedules_incident_management_oncall_rotations.id, schedules_incident_management_oncall_rotations.created_at, schedules_incident_management_oncall_rotations.updated_at, schedules_incident_management_oncall_rotations.project_id, schedules_incident_management_oncall_rotations.iid, schedules_incident_management_oncall_rotations.name, schedules_incident_management_oncall_rotations.description, schedules_incident_management_oncall_rotations.timezone
  Buffers: shared hit=28
  ->  Sort  (cost=24.46..24.65 rows=76 width=238) (actual time=0.685..0.692 rows=62 loops=1)
        Output: incident_management_oncall_rotations.id, incident_management_oncall_rotations.created_at, incident_management_oncall_rotations.updated_at, incident_management_oncall_rotations.oncall_schedule_id, incident_management_oncall_rotations.length, incident_management_oncall_rotations.length_unit, incident_management_oncall_rotations.starts_at, incident_management_oncall_rotations.name, incident_management_oncall_participants.id, incident_management_oncall_participants.oncall_rotation_id, incident_management_oncall_participants.user_id, incident_management_oncall_participants.color_palette, incident_management_oncall_participants.color_weight, schedules_incident_management_oncall_rotations.id, schedules_incident_management_oncall_rotations.created_at, schedules_incident_management_oncall_rotations.updated_at, schedules_incident_management_oncall_rotations.project_id, schedules_incident_management_oncall_rotations.iid, schedules_incident_management_oncall_rotations.name, schedules_incident_management_oncall_rotations.description, schedules_incident_management_oncall_rotations.timezone
        Sort Key: incident_management_oncall_rotations.id, incident_management_oncall_participants.id, incident_management_oncall_rotations.created_at, incident_management_oncall_rotations.updated_at, incident_management_oncall_rotations.oncall_schedule_id, incident_management_oncall_rotations.length, incident_management_oncall_rotations.length_unit, incident_management_oncall_rotations.starts_at, incident_management_oncall_rotations.name, incident_management_oncall_participants.user_id, incident_management_oncall_participants.color_palette, incident_management_oncall_participants.color_weight, schedules_incident_management_oncall_rotations.created_at, schedules_incident_management_oncall_rotations.updated_at, schedules_incident_management_oncall_rotations.project_id, schedules_incident_management_oncall_rotations.iid, schedules_incident_management_oncall_rotations.name, schedules_incident_management_oncall_rotations.description, schedules_incident_management_oncall_rotations.timezone
        Sort Method: quicksort  Memory: 41kB
        Buffers: shared hit=28
        ->  Nested Loop  (cost=0.86..22.08 rows=76 width=238) (actual time=0.023..0.072 rows=62 loops=1)
              Output: incident_management_oncall_rotations.id, incident_management_oncall_rotations.created_at, incident_management_oncall_rotations.updated_at, incident_management_oncall_rotations.oncall_schedule_id, incident_management_oncall_rotations.length, incident_management_oncall_rotations.length_unit, incident_management_oncall_rotations.starts_at, incident_management_oncall_rotations.name, incident_management_oncall_participants.id, incident_management_oncall_participants.oncall_rotation_id, incident_management_oncall_participants.user_id, incident_management_oncall_participants.color_palette, incident_management_oncall_participants.color_weight, schedules_incident_management_oncall_rotations.id, schedules_incident_management_oncall_rotations.created_at, schedules_incident_management_oncall_rotations.updated_at, schedules_incident_management_oncall_rotations.project_id, schedules_incident_management_oncall_rotations.iid, schedules_incident_management_oncall_rotations.name, schedules_incident_management_oncall_rotations.description, schedules_incident_management_oncall_rotations.timezone
              Buffers: shared hit=28
              ->  Nested Loop  (cost=0.57..10.99 rows=5 width=210) (actual time=0.018..0.027 rows=5 loops=1)
                    Output: incident_management_oncall_rotations.id, incident_management_oncall_rotations.created_at, incident_management_oncall_rotations.updated_at, incident_management_oncall_rotations.oncall_schedule_id, incident_management_oncall_rotations.length, incident_management_oncall_rotations.length_unit, incident_management_oncall_rotations.starts_at, incident_management_oncall_rotations.name, schedules_incident_management_oncall_rotations.id, schedules_incident_management_oncall_rotations.created_at, schedules_incident_management_oncall_rotations.updated_at, schedules_incident_management_oncall_rotations.project_id, schedules_incident_management_oncall_rotations.iid, schedules_incident_management_oncall_rotations.name, schedules_incident_management_oncall_rotations.description, schedules_incident_management_oncall_rotations.timezone
                    Join Filter: (incident_management_oncall_schedules.id = incident_management_oncall_rotations.oncall_schedule_id)
                    Buffers: shared hit=12
                    ->  Nested Loop  (cost=0.29..9.70 rows=3 width=140) (actual time=0.012..0.016 rows=2 loops=1)
                          Output: incident_management_oncall_schedules.id, schedules_incident_management_oncall_rotations.id, schedules_incident_management_oncall_rotations.created_at, schedules_incident_management_oncall_rotations.updated_at, schedules_incident_management_oncall_rotations.project_id, schedules_incident_management_oncall_rotations.iid, schedules_incident_management_oncall_rotations.name, schedules_incident_management_oncall_rotations.description, schedules_incident_management_oncall_rotations.timezone
                          Inner Unique: true
                          Buffers: shared hit=6
                          ->  Index Scan using index_incident_management_oncall_schedules_on_project_id on public.incident_management_oncall_schedules  (cost=0.15..4.20 rows=3 width=8) (actual time=0.008..0.009 rows=2 loops=1)
                                Output: incident_management_oncall_schedules.id, incident_management_oncall_schedules.created_at, incident_management_oncall_schedules.updated_at, incident_management_oncall_schedules.project_id, incident_management_oncall_schedules.iid, incident_management_oncall_schedules.name, incident_management_oncall_schedules.description, incident_management_oncall_schedules.timezone
                                Index Cond: (incident_management_oncall_schedules.project_id = 76)
                                Buffers: shared hit=2
                          ->  Index Scan using incident_management_oncall_schedules_pkey on public.incident_management_oncall_schedules schedules_incident_management_oncall_rotations  (cost=0.15..1.83 rows=1 width=132) (actual time=0.002..0.002 rows=1 loops=2)
                                Output: schedules_incident_management_oncall_rotations.id, schedules_incident_management_oncall_rotations.created_at, schedules_incident_management_oncall_rotations.updated_at, schedules_incident_management_oncall_rotations.project_id, schedules_incident_management_oncall_rotations.iid, schedules_incident_management_oncall_rotations.name, schedules_incident_management_oncall_rotations.description, schedules_incident_management_oncall_rotations.timezone
                                Index Cond: (schedules_incident_management_oncall_rotations.id = incident_management_oncall_schedules.id)
                                Buffers: shared hit=4
                    ->  Index Scan using index_inc_mgmnt_oncall_rotations_on_oncall_schedule_id_and_id on public.incident_management_oncall_rotations  (cost=0.28..0.38 rows=4 width=78) (actual time=0.003..0.003 rows=2 loops=2)
                          Output: incident_management_oncall_rotations.id, incident_management_oncall_rotations.created_at, incident_management_oncall_rotations.updated_at, incident_management_oncall_rotations.oncall_schedule_id, incident_management_oncall_rotations.length, incident_management_oncall_rotations.length_unit, incident_management_oncall_rotations.starts_at, incident_management_oncall_rotations.name
                          Index Cond: (incident_management_oncall_rotations.oncall_schedule_id = schedules_incident_management_oncall_rotations.id)
                          Buffers: shared hit=6
              ->  Index Scan using index_inc_mgmnt_oncall_participants_on_oncall_rotation_id on public.incident_management_oncall_participants  (cost=0.29..1.57 rows=65 width=28) (actual time=0.002..0.005 rows=12 loops=5)
                    Output: incident_management_oncall_participants.id, incident_management_oncall_participants.oncall_rotation_id, incident_management_oncall_participants.user_id, incident_management_oncall_participants.color_palette, incident_management_oncall_participants.color_weight
                    Index Cond: (incident_management_oncall_participants.oncall_rotation_id = incident_management_oncall_rotations.id)
                    Buffers: shared hit=16
Planning Time: 0.427 ms
Execution Time: 0.774 ms
.


SHIFT-GENERATING QUERY EXPLAIN

EXPLAIN for: SELECT DISTINCT "incident_management_oncall_rotations"."id" AS t0_r0, "incident_management_oncall_rotations"."created_at" AS t0_r1, "incident_management_oncall_rotations"."updated_at" AS t0_r2, "incident_management_oncall_rotations"."oncall_schedule_id" AS t0_r3, "incident_management_oncall_rotations"."length" AS t0_r4, "incident_management_oncall_rotations"."length_unit" AS t0_r5, "incident_management_oncall_rotations"."starts_at" AS t0_r6, "incident_management_oncall_rotations"."name" AS t0_r7, "incident_management_oncall_participants"."id" AS t1_r0, "incident_management_oncall_participants"."oncall_rotation_id" AS t1_r1, "incident_management_oncall_participants"."user_id" AS t1_r2, "incident_management_oncall_participants"."color_palette" AS t1_r3, "incident_management_oncall_participants"."color_weight" AS t1_r4, "schedules_incident_management_oncall_rotations"."id" AS t2_r0, "schedules_incident_management_oncall_rotations"."created_at" AS t2_r1, "schedules_incident_management_oncall_rotations"."updated_at" AS t2_r2, "schedules_incident_management_oncall_rotations"."project_id" AS t2_r3, "schedules_incident_management_oncall_rotations"."iid" AS t2_r4, "schedules_incident_management_oncall_rotations"."name" AS t2_r5, "schedules_incident_management_oncall_rotations"."description" AS t2_r6, "schedules_incident_management_oncall_rotations"."timezone" AS t2_r7 FROM "incident_management_oncall_rotations" INNER JOIN "incident_management_oncall_schedules" ON "incident_management_oncall_rotations"."oncall_schedule_id" = "incident_management_oncall_schedules"."id" INNER JOIN "incident_management_oncall_participants" ON "incident_management_oncall_participants"."oncall_rotation_id" = "incident_management_oncall_rotations"."id" INNER JOIN "incident_management_oncall_schedules" "schedules_incident_management_oncall_rotations" ON "schedules_incident_management_oncall_rotations"."id" = "incident_management_oncall_rotations"."oncall_schedule_id" WHERE "incident_management_oncall_schedules"."project_id" = 76 AND "incident_management_oncall_rotations"."id" NOT IN (684, 685, 686, 682, 683) ORDER BY "incident_management_oncall_rotations"."id" ASC, incident_management_oncall_participants.id ASC /*application:test,correlation_id:aba4b108c40313076c0c7ea813bd0b36*/
Unique  (cost=24.53..28.33 rows=76 width=238) (actual time=0.029..0.030 rows=0 loops=1)
  Output: incident_management_oncall_rotations.id, incident_management_oncall_rotations.created_at, incident_management_oncall_rotations.updated_at, incident_management_oncall_rotations.oncall_schedule_id, incident_management_oncall_rotations.length, incident_management_oncall_rotations.length_unit, incident_management_oncall_rotations.starts_at, incident_management_oncall_rotations.name, incident_management_oncall_participants.id, incident_management_oncall_participants.oncall_rotation_id, incident_management_oncall_participants.user_id, incident_management_oncall_participants.color_palette, incident_management_oncall_participants.color_weight, schedules_incident_management_oncall_rotations.id, schedules_incident_management_oncall_rotations.created_at, schedules_incident_management_oncall_rotations.updated_at, schedules_incident_management_oncall_rotations.project_id, schedules_incident_management_oncall_rotations.iid, schedules_incident_management_oncall_rotations.name, schedules_incident_management_oncall_rotations.description, schedules_incident_management_oncall_rotations.timezone
  Buffers: shared hit=12
  ->  Sort  (cost=24.53..24.72 rows=76 width=238) (actual time=0.028..0.029 rows=0 loops=1)
        Output: incident_management_oncall_rotations.id, incident_management_oncall_rotations.created_at, incident_management_oncall_rotations.updated_at, incident_management_oncall_rotations.oncall_schedule_id, incident_management_oncall_rotations.length, incident_management_oncall_rotations.length_unit, incident_management_oncall_rotations.starts_at, incident_management_oncall_rotations.name, incident_management_oncall_participants.id, incident_management_oncall_participants.oncall_rotation_id, incident_management_oncall_participants.user_id, incident_management_oncall_participants.color_palette, incident_management_oncall_participants.color_weight, schedules_incident_management_oncall_rotations.id, schedules_incident_management_oncall_rotations.created_at, schedules_incident_management_oncall_rotations.updated_at, schedules_incident_management_oncall_rotations.project_id, schedules_incident_management_oncall_rotations.iid, schedules_incident_management_oncall_rotations.name, schedules_incident_management_oncall_rotations.description, schedules_incident_management_oncall_rotations.timezone
        Sort Key: incident_management_oncall_rotations.id, incident_management_oncall_participants.id, incident_management_oncall_rotations.created_at, incident_management_oncall_rotations.updated_at, incident_management_oncall_rotations.oncall_schedule_id, incident_management_oncall_rotations.length, incident_management_oncall_rotations.length_unit, incident_management_oncall_rotations.starts_at, incident_management_oncall_rotations.name, incident_management_oncall_participants.user_id, incident_management_oncall_participants.color_palette, incident_management_oncall_participants.color_weight, schedules_incident_management_oncall_rotations.created_at, schedules_incident_management_oncall_rotations.updated_at, schedules_incident_management_oncall_rotations.project_id, schedules_incident_management_oncall_rotations.iid, schedules_incident_management_oncall_rotations.name, schedules_incident_management_oncall_rotations.description, schedules_incident_management_oncall_rotations.timezone
        Sort Method: quicksort  Memory: 25kB
        Buffers: shared hit=12
        ->  Nested Loop  (cost=0.86..22.16 rows=76 width=238) (actual time=0.023..0.024 rows=0 loops=1)
              Output: incident_management_oncall_rotations.id, incident_management_oncall_rotations.created_at, incident_management_oncall_rotations.updated_at, incident_management_oncall_rotations.oncall_schedule_id, incident_management_oncall_rotations.length, incident_management_oncall_rotations.length_unit, incident_management_oncall_rotations.starts_at, incident_management_oncall_rotations.name, incident_management_oncall_participants.id, incident_management_oncall_participants.oncall_rotation_id, incident_management_oncall_participants.user_id, incident_management_oncall_participants.color_palette, incident_management_oncall_participants.color_weight, schedules_incident_management_oncall_rotations.id, schedules_incident_management_oncall_rotations.created_at, schedules_incident_management_oncall_rotations.updated_at, schedules_incident_management_oncall_rotations.project_id, schedules_incident_management_oncall_rotations.iid, schedules_incident_management_oncall_rotations.name, schedules_incident_management_oncall_rotations.description, schedules_incident_management_oncall_rotations.timezone
              Buffers: shared hit=12
              ->  Nested Loop  (cost=0.57..11.06 rows=5 width=210) (actual time=0.023..0.024 rows=0 loops=1)
                    Output: incident_management_oncall_rotations.id, incident_management_oncall_rotations.created_at, incident_management_oncall_rotations.updated_at, incident_management_oncall_rotations.oncall_schedule_id, incident_management_oncall_rotations.length, incident_management_oncall_rotations.length_unit, incident_management_oncall_rotations.starts_at, incident_management_oncall_rotations.name, schedules_incident_management_oncall_rotations.id, schedules_incident_management_oncall_rotations.created_at, schedules_incident_management_oncall_rotations.updated_at, schedules_incident_management_oncall_rotations.project_id, schedules_incident_management_oncall_rotations.iid, schedules_incident_management_oncall_rotations.name, schedules_incident_management_oncall_rotations.description, schedules_incident_management_oncall_rotations.timezone
                    Join Filter: (incident_management_oncall_schedules.id = incident_management_oncall_rotations.oncall_schedule_id)
                    Buffers: shared hit=12
                    ->  Nested Loop  (cost=0.29..9.70 rows=3 width=140) (actual time=0.010..0.015 rows=2 loops=1)
                          Output: incident_management_oncall_schedules.id, schedules_incident_management_oncall_rotations.id, schedules_incident_management_oncall_rotations.created_at, schedules_incident_management_oncall_rotations.updated_at, schedules_incident_management_oncall_rotations.project_id, schedules_incident_management_oncall_rotations.iid, schedules_incident_management_oncall_rotations.name, schedules_incident_management_oncall_rotations.description, schedules_incident_management_oncall_rotations.timezone
                          Inner Unique: true
                          Buffers: shared hit=6
                          ->  Index Scan using index_incident_management_oncall_schedules_on_project_id on public.incident_management_oncall_schedules  (cost=0.15..4.20 rows=3 width=8) (actual time=0.006..0.008 rows=2 loops=1)
                                Output: incident_management_oncall_schedules.id, incident_management_oncall_schedules.created_at, incident_management_oncall_schedules.updated_at, incident_management_oncall_schedules.project_id, incident_management_oncall_schedules.iid, incident_management_oncall_schedules.name, incident_management_oncall_schedules.description, incident_management_oncall_schedules.timezone
                                Index Cond: (incident_management_oncall_schedules.project_id = 76)
                                Buffers: shared hit=2
                          ->  Index Scan using incident_management_oncall_schedules_pkey on public.incident_management_oncall_schedules schedules_incident_management_oncall_rotations  (cost=0.15..1.83 rows=1 width=132) (actual time=0.002..0.002 rows=1 loops=2)
                                Output: schedules_incident_management_oncall_rotations.id, schedules_incident_management_oncall_rotations.created_at, schedules_incident_management_oncall_rotations.updated_at, schedules_incident_management_oncall_rotations.project_id, schedules_incident_management_oncall_rotations.iid, schedules_incident_management_oncall_rotations.name, schedules_incident_management_oncall_rotations.description, schedules_incident_management_oncall_rotations.timezone
                                Index Cond: (schedules_incident_management_oncall_rotations.id = incident_management_oncall_schedules.id)
                                Buffers: shared hit=4
                    ->  Index Scan using index_inc_mgmnt_oncall_rotations_on_oncall_schedule_id_and_id on public.incident_management_oncall_rotations  (cost=0.28..0.40 rows=4 width=78) (actual time=0.004..0.004 rows=0 loops=2)
                          Output: incident_management_oncall_rotations.id, incident_management_oncall_rotations.created_at, incident_management_oncall_rotations.updated_at, incident_management_oncall_rotations.oncall_schedule_id, incident_management_oncall_rotations.length, incident_management_oncall_rotations.length_unit, incident_management_oncall_rotations.starts_at, incident_management_oncall_rotations.name
                          Index Cond: (incident_management_oncall_rotations.oncall_schedule_id = schedules_incident_management_oncall_rotations.id)
                          Filter: (incident_management_oncall_rotations.id <> ALL ('{684,685,686,682,683}'::bigint[]))
                          Rows Removed by Filter: 2
                          Buffers: shared hit=6
              ->  Index Scan using index_inc_mgmnt_oncall_participants_on_oncall_rotation_id on public.incident_management_oncall_participants  (cost=0.29..1.57 rows=65 width=28) (never executed)
                    Output: incident_management_oncall_participants.id, incident_management_oncall_participants.oncall_rotation_id, incident_management_oncall_participants.user_id, incident_management_oncall_participants.color_palette, incident_management_oncall_participants.color_weight
                    Index Cond: (incident_management_oncall_participants.oncall_rotation_id = incident_management_oncall_rotations.id)
Planning Time: 0.407 ms
Execution Time: 0.064 ms
.


SHIFT-GENERATING QUERY EXPLAIN

EXPLAIN for: SELECT DISTINCT "incident_management_oncall_rotations"."id" AS t0_r0, "incident_management_oncall_rotations"."created_at" AS t0_r1, "incident_management_oncall_rotations"."updated_at" AS t0_r2, "incident_management_oncall_rotations"."oncall_schedule_id" AS t0_r3, "incident_management_oncall_rotations"."length" AS t0_r4, "incident_management_oncall_rotations"."length_unit" AS t0_r5, "incident_management_oncall_rotations"."starts_at" AS t0_r6, "incident_management_oncall_rotations"."name" AS t0_r7, "incident_management_oncall_participants"."id" AS t1_r0, "incident_management_oncall_participants"."oncall_rotation_id" AS t1_r1, "incident_management_oncall_participants"."user_id" AS t1_r2, "incident_management_oncall_participants"."color_palette" AS t1_r3, "incident_management_oncall_participants"."color_weight" AS t1_r4, "schedules_incident_management_oncall_rotations"."id" AS t2_r0, "schedules_incident_management_oncall_rotations"."created_at" AS t2_r1, "schedules_incident_management_oncall_rotations"."updated_at" AS t2_r2, "schedules_incident_management_oncall_rotations"."project_id" AS t2_r3, "schedules_incident_management_oncall_rotations"."iid" AS t2_r4, "schedules_incident_management_oncall_rotations"."name" AS t2_r5, "schedules_incident_management_oncall_rotations"."description" AS t2_r6, "schedules_incident_management_oncall_rotations"."timezone" AS t2_r7 FROM "incident_management_oncall_rotations" INNER JOIN "incident_management_oncall_schedules" ON "incident_management_oncall_rotations"."oncall_schedule_id" = "incident_management_oncall_schedules"."id" INNER JOIN "incident_management_oncall_participants" ON "incident_management_oncall_participants"."oncall_rotation_id" = "incident_management_oncall_rotations"."id" INNER JOIN "incident_management_oncall_schedules" "schedules_incident_management_oncall_rotations" ON "schedules_incident_management_oncall_rotations"."id" = "incident_management_oncall_rotations"."oncall_schedule_id" WHERE "incident_management_oncall_schedules"."project_id" = 76 AND 1=1 ORDER BY "incident_management_oncall_rotations"."id" ASC, incident_management_oncall_participants.id ASC /*application:test,correlation_id:babc184644bdc2951d217a428edf4d48*/
Unique  (cost=24.46..28.26 rows=76 width=238) (actual time=0.165..0.208 rows=62 loops=1)
  Output: incident_management_oncall_rotations.id, incident_management_oncall_rotations.created_at, incident_management_oncall_rotations.updated_at, incident_management_oncall_rotations.oncall_schedule_id, incident_management_oncall_rotations.length, incident_management_oncall_rotations.length_unit, incident_management_oncall_rotations.starts_at, incident_management_oncall_rotations.name, incident_management_oncall_participants.id, incident_management_oncall_participants.oncall_rotation_id, incident_management_oncall_participants.user_id, incident_management_oncall_participants.color_palette, incident_management_oncall_participants.color_weight, schedules_incident_management_oncall_rotations.id, schedules_incident_management_oncall_rotations.created_at, schedules_incident_management_oncall_rotations.updated_at, schedules_incident_management_oncall_rotations.project_id, schedules_incident_management_oncall_rotations.iid, schedules_incident_management_oncall_rotations.name, schedules_incident_management_oncall_rotations.description, schedules_incident_management_oncall_rotations.timezone
  Buffers: shared hit=28
  ->  Sort  (cost=24.46..24.65 rows=76 width=238) (actual time=0.164..0.170 rows=62 loops=1)
        Output: incident_management_oncall_rotations.id, incident_management_oncall_rotations.created_at, incident_management_oncall_rotations.updated_at, incident_management_oncall_rotations.oncall_schedule_id, incident_management_oncall_rotations.length, incident_management_oncall_rotations.length_unit, incident_management_oncall_rotations.starts_at, incident_management_oncall_rotations.name, incident_management_oncall_participants.id, incident_management_oncall_participants.oncall_rotation_id, incident_management_oncall_participants.user_id, incident_management_oncall_participants.color_palette, incident_management_oncall_participants.color_weight, schedules_incident_management_oncall_rotations.id, schedules_incident_management_oncall_rotations.created_at, schedules_incident_management_oncall_rotations.updated_at, schedules_incident_management_oncall_rotations.project_id, schedules_incident_management_oncall_rotations.iid, schedules_incident_management_oncall_rotations.name, schedules_incident_management_oncall_rotations.description, schedules_incident_management_oncall_rotations.timezone
        Sort Key: incident_management_oncall_rotations.id, incident_management_oncall_participants.id, incident_management_oncall_rotations.created_at, incident_management_oncall_rotations.updated_at, incident_management_oncall_rotations.oncall_schedule_id, incident_management_oncall_rotations.length, incident_management_oncall_rotations.length_unit, incident_management_oncall_rotations.starts_at, incident_management_oncall_rotations.name, incident_management_oncall_participants.user_id, incident_management_oncall_participants.color_palette, incident_management_oncall_participants.color_weight, schedules_incident_management_oncall_rotations.created_at, schedules_incident_management_oncall_rotations.updated_at, schedules_incident_management_oncall_rotations.project_id, schedules_incident_management_oncall_rotations.iid, schedules_incident_management_oncall_rotations.name, schedules_incident_management_oncall_rotations.description, schedules_incident_management_oncall_rotations.timezone
        Sort Method: quicksort  Memory: 41kB
        Buffers: shared hit=28
        ->  Nested Loop  (cost=0.86..22.08 rows=76 width=238) (actual time=0.031..0.093 rows=62 loops=1)
              Output: incident_management_oncall_rotations.id, incident_management_oncall_rotations.created_at, incident_management_oncall_rotations.updated_at, incident_management_oncall_rotations.oncall_schedule_id, incident_management_oncall_rotations.length, incident_management_oncall_rotations.length_unit, incident_management_oncall_rotations.starts_at, incident_management_oncall_rotations.name, incident_management_oncall_participants.id, incident_management_oncall_participants.oncall_rotation_id, incident_management_oncall_participants.user_id, incident_management_oncall_participants.color_palette, incident_management_oncall_participants.color_weight, schedules_incident_management_oncall_rotations.id, schedules_incident_management_oncall_rotations.created_at, schedules_incident_management_oncall_rotations.updated_at, schedules_incident_management_oncall_rotations.project_id, schedules_incident_management_oncall_rotations.iid, schedules_incident_management_oncall_rotations.name, schedules_incident_management_oncall_rotations.description, schedules_incident_management_oncall_rotations.timezone
              Buffers: shared hit=28
              ->  Nested Loop  (cost=0.57..10.99 rows=5 width=210) (actual time=0.025..0.038 rows=5 loops=1)
                    Output: incident_management_oncall_rotations.id, incident_management_oncall_rotations.created_at, incident_management_oncall_rotations.updated_at, incident_management_oncall_rotations.oncall_schedule_id, incident_management_oncall_rotations.length, incident_management_oncall_rotations.length_unit, incident_management_oncall_rotations.starts_at, incident_management_oncall_rotations.name, schedules_incident_management_oncall_rotations.id, schedules_incident_management_oncall_rotations.created_at, schedules_incident_management_oncall_rotations.updated_at, schedules_incident_management_oncall_rotations.project_id, schedules_incident_management_oncall_rotations.iid, schedules_incident_management_oncall_rotations.name, schedules_incident_management_oncall_rotations.description, schedules_incident_management_oncall_rotations.timezone
                    Join Filter: (incident_management_oncall_schedules.id = incident_management_oncall_rotations.oncall_schedule_id)
                    Buffers: shared hit=12
                    ->  Nested Loop  (cost=0.29..9.70 rows=3 width=140) (actual time=0.018..0.024 rows=2 loops=1)
                          Output: incident_management_oncall_schedules.id, schedules_incident_management_oncall_rotations.id, schedules_incident_management_oncall_rotations.created_at, schedules_incident_management_oncall_rotations.updated_at, schedules_incident_management_oncall_rotations.project_id, schedules_incident_management_oncall_rotations.iid, schedules_incident_management_oncall_rotations.name, schedules_incident_management_oncall_rotations.description, schedules_incident_management_oncall_rotations.timezone
                          Inner Unique: true
                          Buffers: shared hit=6
                          ->  Index Scan using index_incident_management_oncall_schedules_on_project_id on public.incident_management_oncall_schedules  (cost=0.15..4.20 rows=3 width=8) (actual time=0.011..0.012 rows=2 loops=1)
                                Output: incident_management_oncall_schedules.id, incident_management_oncall_schedules.created_at, incident_management_oncall_schedules.updated_at, incident_management_oncall_schedules.project_id, incident_management_oncall_schedules.iid, incident_management_oncall_schedules.name, incident_management_oncall_schedules.description, incident_management_oncall_schedules.timezone
                                Index Cond: (incident_management_oncall_schedules.project_id = 76)
                                Buffers: shared hit=2
                          ->  Index Scan using incident_management_oncall_schedules_pkey on public.incident_management_oncall_schedules schedules_incident_management_oncall_rotations  (cost=0.15..1.83 rows=1 width=132) (actual time=0.003..0.004 rows=1 loops=2)
                                Output: schedules_incident_management_oncall_rotations.id, schedules_incident_management_oncall_rotations.created_at, schedules_incident_management_oncall_rotations.updated_at, schedules_incident_management_oncall_rotations.project_id, schedules_incident_management_oncall_rotations.iid, schedules_incident_management_oncall_rotations.name, schedules_incident_management_oncall_rotations.description, schedules_incident_management_oncall_rotations.timezone
                                Index Cond: (schedules_incident_management_oncall_rotations.id = incident_management_oncall_schedules.id)
                                Buffers: shared hit=4
                    ->  Index Scan using index_inc_mgmnt_oncall_rotations_on_oncall_schedule_id_and_id on public.incident_management_oncall_rotations  (cost=0.28..0.38 rows=4 width=78) (actual time=0.004..0.004 rows=2 loops=2)
                          Output: incident_management_oncall_rotations.id, incident_management_oncall_rotations.created_at, incident_management_oncall_rotations.updated_at, incident_management_oncall_rotations.oncall_schedule_id, incident_management_oncall_rotations.length, incident_management_oncall_rotations.length_unit, incident_management_oncall_rotations.starts_at, incident_management_oncall_rotations.name
                          Index Cond: (incident_management_oncall_rotations.oncall_schedule_id = schedules_incident_management_oncall_rotations.id)
                          Buffers: shared hit=6
              ->  Index Scan using index_inc_mgmnt_oncall_participants_on_oncall_rotation_id on public.incident_management_oncall_participants  (cost=0.29..1.57 rows=65 width=28) (actual time=0.003..0.007 rows=12 loops=5)
                    Output: incident_management_oncall_participants.id, incident_management_oncall_participants.oncall_rotation_id, incident_management_oncall_participants.user_id, incident_management_oncall_participants.color_palette, incident_management_oncall_participants.color_weight
                    Index Cond: (incident_management_oncall_participants.oncall_rotation_id = incident_management_oncall_rotations.id)
                    Buffers: shared hit=16
Planning Time: 0.425 ms
Execution Time: 0.255 ms
.


SHIFT-GENERATING QUERY EXPLAIN

EXPLAIN for: SELECT DISTINCT "incident_management_oncall_rotations"."id" AS t0_r0, "incident_management_oncall_rotations"."created_at" AS t0_r1, "incident_management_oncall_rotations"."updated_at" AS t0_r2, "incident_management_oncall_rotations"."oncall_schedule_id" AS t0_r3, "incident_management_oncall_rotations"."length" AS t0_r4, "incident_management_oncall_rotations"."length_unit" AS t0_r5, "incident_management_oncall_rotations"."starts_at" AS t0_r6, "incident_management_oncall_rotations"."name" AS t0_r7, "incident_management_oncall_participants"."id" AS t1_r0, "incident_management_oncall_participants"."oncall_rotation_id" AS t1_r1, "incident_management_oncall_participants"."user_id" AS t1_r2, "incident_management_oncall_participants"."color_palette" AS t1_r3, "incident_management_oncall_participants"."color_weight" AS t1_r4, "schedules_incident_management_oncall_rotations"."id" AS t2_r0, "schedules_incident_management_oncall_rotations"."created_at" AS t2_r1, "schedules_incident_management_oncall_rotations"."updated_at" AS t2_r2, "schedules_incident_management_oncall_rotations"."project_id" AS t2_r3, "schedules_incident_management_oncall_rotations"."iid" AS t2_r4, "schedules_incident_management_oncall_rotations"."name" AS t2_r5, "schedules_incident_management_oncall_rotations"."description" AS t2_r6, "schedules_incident_management_oncall_rotations"."timezone" AS t2_r7 FROM "incident_management_oncall_rotations" INNER JOIN "incident_management_oncall_schedules" ON "incident_management_oncall_rotations"."oncall_schedule_id" = "incident_management_oncall_schedules"."id" INNER JOIN "incident_management_oncall_participants" ON "incident_management_oncall_participants"."oncall_rotation_id" = "incident_management_oncall_rotations"."id" INNER JOIN "incident_management_oncall_schedules" "schedules_incident_management_oncall_rotations" ON "schedules_incident_management_oncall_rotations"."id" = "incident_management_oncall_rotations"."oncall_schedule_id" WHERE "incident_management_oncall_schedules"."project_id" = 76 AND "incident_management_oncall_rotations"."id" NOT IN (684, 685, 686, 682, 683) ORDER BY "incident_management_oncall_rotations"."id" ASC, incident_management_oncall_participants.id ASC /*application:test,correlation_id:6042d0f95403d9474e1eecd21bf62477*/
Unique  (cost=24.53..28.33 rows=76 width=238) (actual time=0.030..0.045 rows=0 loops=1)
  Output: incident_management_oncall_rotations.id, incident_management_oncall_rotations.created_at, incident_management_oncall_rotations.updated_at, incident_management_oncall_rotations.oncall_schedule_id, incident_management_oncall_rotations.length, incident_management_oncall_rotations.length_unit, incident_management_oncall_rotations.starts_at, incident_management_oncall_rotations.name, incident_management_oncall_participants.id, incident_management_oncall_participants.oncall_rotation_id, incident_management_oncall_participants.user_id, incident_management_oncall_participants.color_palette, incident_management_oncall_participants.color_weight, schedules_incident_management_oncall_rotations.id, schedules_incident_management_oncall_rotations.created_at, schedules_incident_management_oncall_rotations.updated_at, schedules_incident_management_oncall_rotations.project_id, schedules_incident_management_oncall_rotations.iid, schedules_incident_management_oncall_rotations.name, schedules_incident_management_oncall_rotations.description, schedules_incident_management_oncall_rotations.timezone
  Buffers: shared hit=12
  ->  Sort  (cost=24.53..24.72 rows=76 width=238) (actual time=0.029..0.030 rows=0 loops=1)
        Output: incident_management_oncall_rotations.id, incident_management_oncall_rotations.created_at, incident_management_oncall_rotations.updated_at, incident_management_oncall_rotations.oncall_schedule_id, incident_management_oncall_rotations.length, incident_management_oncall_rotations.length_unit, incident_management_oncall_rotations.starts_at, incident_management_oncall_rotations.name, incident_management_oncall_participants.id, incident_management_oncall_participants.oncall_rotation_id, incident_management_oncall_participants.user_id, incident_management_oncall_participants.color_palette, incident_management_oncall_participants.color_weight, schedules_incident_management_oncall_rotations.id, schedules_incident_management_oncall_rotations.created_at, schedules_incident_management_oncall_rotations.updated_at, schedules_incident_management_oncall_rotations.project_id, schedules_incident_management_oncall_rotations.iid, schedules_incident_management_oncall_rotations.name, schedules_incident_management_oncall_rotations.description, schedules_incident_management_oncall_rotations.timezone
        Sort Key: incident_management_oncall_rotations.id, incident_management_oncall_participants.id, incident_management_oncall_rotations.created_at, incident_management_oncall_rotations.updated_at, incident_management_oncall_rotations.oncall_schedule_id, incident_management_oncall_rotations.length, incident_management_oncall_rotations.length_unit, incident_management_oncall_rotations.starts_at, incident_management_oncall_rotations.name, incident_management_oncall_participants.user_id, incident_management_oncall_participants.color_palette, incident_management_oncall_participants.color_weight, schedules_incident_management_oncall_rotations.created_at, schedules_incident_management_oncall_rotations.updated_at, schedules_incident_management_oncall_rotations.project_id, schedules_incident_management_oncall_rotations.iid, schedules_incident_management_oncall_rotations.name, schedules_incident_management_oncall_rotations.description, schedules_incident_management_oncall_rotations.timezone
        Sort Method: quicksort  Memory: 25kB
        Buffers: shared hit=12
        ->  Nested Loop  (cost=0.86..22.16 rows=76 width=238) (actual time=0.024..0.025 rows=0 loops=1)
              Output: incident_management_oncall_rotations.id, incident_management_oncall_rotations.created_at, incident_management_oncall_rotations.updated_at, incident_management_oncall_rotations.oncall_schedule_id, incident_management_oncall_rotations.length, incident_management_oncall_rotations.length_unit, incident_management_oncall_rotations.starts_at, incident_management_oncall_rotations.name, incident_management_oncall_participants.id, incident_management_oncall_participants.oncall_rotation_id, incident_management_oncall_participants.user_id, incident_management_oncall_participants.color_palette, incident_management_oncall_participants.color_weight, schedules_incident_management_oncall_rotations.id, schedules_incident_management_oncall_rotations.created_at, schedules_incident_management_oncall_rotations.updated_at, schedules_incident_management_oncall_rotations.project_id, schedules_incident_management_oncall_rotations.iid, schedules_incident_management_oncall_rotations.name, schedules_incident_management_oncall_rotations.description, schedules_incident_management_oncall_rotations.timezone
              Buffers: shared hit=12
              ->  Nested Loop  (cost=0.57..11.06 rows=5 width=210) (actual time=0.023..0.024 rows=0 loops=1)
                    Output: incident_management_oncall_rotations.id, incident_management_oncall_rotations.created_at, incident_management_oncall_rotations.updated_at, incident_management_oncall_rotations.oncall_schedule_id, incident_management_oncall_rotations.length, incident_management_oncall_rotations.length_unit, incident_management_oncall_rotations.starts_at, incident_management_oncall_rotations.name, schedules_incident_management_oncall_rotations.id, schedules_incident_management_oncall_rotations.created_at, schedules_incident_management_oncall_rotations.updated_at, schedules_incident_management_oncall_rotations.project_id, schedules_incident_management_oncall_rotations.iid, schedules_incident_management_oncall_rotations.name, schedules_incident_management_oncall_rotations.description, schedules_incident_management_oncall_rotations.timezone
                    Join Filter: (incident_management_oncall_schedules.id = incident_management_oncall_rotations.oncall_schedule_id)
                    Buffers: shared hit=12
                    ->  Nested Loop  (cost=0.29..9.70 rows=3 width=140) (actual time=0.012..0.015 rows=2 loops=1)
                          Output: incident_management_oncall_schedules.id, schedules_incident_management_oncall_rotations.id, schedules_incident_management_oncall_rotations.created_at, schedules_incident_management_oncall_rotations.updated_at, schedules_incident_management_oncall_rotations.project_id, schedules_incident_management_oncall_rotations.iid, schedules_incident_management_oncall_rotations.name, schedules_incident_management_oncall_rotations.description, schedules_incident_management_oncall_rotations.timezone
                          Inner Unique: true
                          Buffers: shared hit=6
                          ->  Index Scan using index_incident_management_oncall_schedules_on_project_id on public.incident_management_oncall_schedules  (cost=0.15..4.20 rows=3 width=8) (actual time=0.008..0.008 rows=2 loops=1)
                                Output: incident_management_oncall_schedules.id, incident_management_oncall_schedules.created_at, incident_management_oncall_schedules.updated_at, incident_management_oncall_schedules.project_id, incident_management_oncall_schedules.iid, incident_management_oncall_schedules.name, incident_management_oncall_schedules.description, incident_management_oncall_schedules.timezone
                                Index Cond: (incident_management_oncall_schedules.project_id = 76)
                                Buffers: shared hit=2
                          ->  Index Scan using incident_management_oncall_schedules_pkey on public.incident_management_oncall_schedules schedules_incident_management_oncall_rotations  (cost=0.15..1.83 rows=1 width=132) (actual time=0.002..0.002 rows=1 loops=2)
                                Output: schedules_incident_management_oncall_rotations.id, schedules_incident_management_oncall_rotations.created_at, schedules_incident_management_oncall_rotations.updated_at, schedules_incident_management_oncall_rotations.project_id, schedules_incident_management_oncall_rotations.iid, schedules_incident_management_oncall_rotations.name, schedules_incident_management_oncall_rotations.description, schedules_incident_management_oncall_rotations.timezone
                                Index Cond: (schedules_incident_management_oncall_rotations.id = incident_management_oncall_schedules.id)
                                Buffers: shared hit=4
                    ->  Index Scan using index_inc_mgmnt_oncall_rotations_on_oncall_schedule_id_and_id on public.incident_management_oncall_rotations  (cost=0.28..0.40 rows=4 width=78) (actual time=0.004..0.004 rows=0 loops=2)
                          Output: incident_management_oncall_rotations.id, incident_management_oncall_rotations.created_at, incident_management_oncall_rotations.updated_at, incident_management_oncall_rotations.oncall_schedule_id, incident_management_oncall_rotations.length, incident_management_oncall_rotations.length_unit, incident_management_oncall_rotations.starts_at, incident_management_oncall_rotations.name
                          Index Cond: (incident_management_oncall_rotations.oncall_schedule_id = schedules_incident_management_oncall_rotations.id)
                          Filter: (incident_management_oncall_rotations.id <> ALL ('{684,685,686,682,683}'::bigint[]))
                          Rows Removed by Filter: 2
                          Buffers: shared hit=6
              ->  Index Scan using index_inc_mgmnt_oncall_participants_on_oncall_rotation_id on public.incident_management_oncall_participants  (cost=0.29..1.57 rows=65 width=28) (never executed)
                    Output: incident_management_oncall_participants.id, incident_management_oncall_participants.oncall_rotation_id, incident_management_oncall_participants.user_id, incident_management_oncall_participants.color_palette, incident_management_oncall_participants.color_weight
                    Index Cond: (incident_management_oncall_participants.oncall_rotation_id = incident_management_oncall_rotations.id)
Planning Time: 0.425 ms
Execution Time: 0.085 ms
.


USERS QUERY EXPLAIN

EXPLAIN for: SELECT "users".* FROM "users" WHERE "users"."id" IN (9458, 9464, 9474, 9437, 9444) /*application:test,correlation_id:7e75c79f2241c96d4b5005b87a7fb8f1*/
Index Scan using users_pkey on public.users  (cost=0.28..11.46 rows=5 width=2707) (actual time=0.006..0.012 rows=5 loops=1)
  Output: id, email, encrypted_password, reset_password_token, reset_password_sent_at, remember_created_at, sign_in_count, current_sign_in_at, last_sign_in_at, current_sign_in_ip, last_sign_in_ip, created_at, updated_at, name, admin, projects_limit, skype, linkedin, twitter, failed_attempts, locked_at, username, can_create_group, can_create_team, state, color_scheme_id, password_expires_at, created_by_id, last_credential_check_at, avatar, confirmation_token, confirmed_at, confirmation_sent_at, unconfirmed_email, hide_no_ssh_key, website_url, admin_email_unsubscribed_at, notification_email, hide_no_password, password_automatically_set, location, encrypted_otp_secret, encrypted_otp_secret_iv, encrypted_otp_secret_salt, otp_required_for_login, otp_backup_codes, public_email, dashboard, project_view, consumed_timestep, layout, hide_project_limit, note, unlock_token, otp_grace_period_started_at, external, incoming_email_token, organization, auditor, require_two_factor_authentication_from_group, two_factor_grace_period, last_activity_on, notified_of_own_activity, preferred_language, email_opted_in, email_opted_in_ip, email_opted_in_source_id, email_opted_in_at, theme_id, accepted_term_id, feed_token, private_profile, roadmap_layout, include_private_contributions, commit_email, group_view, managing_group_id, first_name, last_name, static_object_token, role, user_type
  Index Cond: (users.id = ANY ('{9458,9464,9474,9437,9444}'::integer[]))
  Buffers: shared hit=13
Planning Time: 0.137 ms
Execution Time: 0.028 ms
.

Finished in 27 minutes 30 seconds (files took 9.64 seconds to load)
9 examples, 0 failures

Query 1: Finding existing shifts

Source: IncidentManagement::OncallUsersFinder#ids_for_persisted_shifts || project.incident_management_oncall_rotations.merge(IncidentManagement::OncallShift.for_timestamp(query_time)).joins(shifts: { participant: :user })

SELECT 
  "incident_management_oncall_rotations"."id", 
  users.id 
FROM "incident_management_oncall_rotations" 
INNER JOIN "incident_management_oncall_schedules" 
  ON "incident_management_oncall_rotations"."oncall_schedule_id" = "incident_management_oncall_schedules"."id" 
INNER JOIN "incident_management_oncall_shifts" 
  ON "incident_management_oncall_shifts"."rotation_id" = "incident_management_oncall_rotations"."id" 
INNER JOIN "incident_management_oncall_participants" 
  ON "incident_management_oncall_participants"."id" = "incident_management_oncall_shifts"."participant_id" 
INNER JOIN "users" 
  ON "users"."id" = "incident_management_oncall_participants"."user_id" 
WHERE "incident_management_oncall_schedules"."project_id" = 21 
AND (
  incident_management_oncall_shifts.starts_at <= '2021-01-24 21:15:40.955676' 
  AND incident_management_oncall_shifts.ends_at > '2021-01-24 21:15:40.955676'
)

Query plans:

Query 2: Generating shifts for rotations which do not have them

Source: IncidentManagement::OncallUsersFinder#rotations_without_persisted_shifts

SELECT DISTINCT 
  "incident_management_oncall_rotations"."id" AS t0_r0, 
  "incident_management_oncall_rotations"."created_at" AS t0_r1, 
  "incident_management_oncall_rotations"."updated_at" AS t0_r2, 
  "incident_management_oncall_rotations"."oncall_schedule_id" AS t0_r3, 
  "incident_management_oncall_rotations"."length" AS t0_r4, 
  "incident_management_oncall_rotations"."length_unit" AS t0_r5, 
  "incident_management_oncall_rotations"."starts_at" AS t0_r6, 
  "incident_management_oncall_rotations"."name" AS t0_r7, 
  "incident_management_oncall_participants"."id" AS t1_r0, 
  "incident_management_oncall_participants"."oncall_rotation_id" AS t1_r1, 
  "incident_management_oncall_participants"."user_id" AS t1_r2, 
  "incident_management_oncall_participants"."color_palette" AS t1_r3, 
  "incident_management_oncall_participants"."color_weight" AS t1_r4, 
  "schedules_incident_management_oncall_rotations"."id" AS t2_r0, 
  "schedules_incident_management_oncall_rotations"."created_at" AS t2_r1, 
  "schedules_incident_management_oncall_rotations"."updated_at" AS t2_r2, 
  "schedules_incident_management_oncall_rotations"."project_id" AS t2_r3, 
  "schedules_incident_management_oncall_rotations"."iid" AS t2_r4, 
  "schedules_incident_management_oncall_rotations"."name" AS t2_r5, 
  "schedules_incident_management_oncall_rotations"."description" AS t2_r6, 
  "schedules_incident_management_oncall_rotations"."timezone" AS t2_r7 FROM "incident_management_oncall_rotations" 
INNER JOIN "incident_management_oncall_schedules" 
  ON "incident_management_oncall_rotations"."oncall_schedule_id" = "incident_management_oncall_schedules"."id" 
INNER JOIN "incident_management_oncall_participants" 
  ON "incident_management_oncall_participants"."oncall_rotation_id" = "incident_management_oncall_rotations"."id" 
INNER JOIN "incident_management_oncall_schedules" "schedules_incident_management_oncall_rotations" 
  ON "schedules_incident_management_oncall_rotations"."id" = "incident_management_oncall_rotations"."oncall_schedule_id" 
WHERE "incident_management_oncall_schedules"."project_id" = 21 
AND "incident_management_oncall_rotations"."id" NOT IN (67, 68) 
ORDER BY "incident_management_oncall_rotations"."id" ASC, incident_management_oncall_participants.id ASC

Query plans:

Takeaway - The sort here sucks a bit, but the alternative is N+1 queries during shift generation, so I'm inclined to keep it.

Query 3: Users

Source: IncidentManagement::OncallUsersFinder#execute

SELECT 
  "users".* 
FROM "users" 
WHERE "users"."id" IN (2, 1)

Query plans:

Takeaway - not much to be done here.

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team
Edited by Sarah Yasonik

Merge request reports