explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Vctp

Settings
# exclusive inclusive rows x rows loops node
1. 18.966 1,074.909 ↓ 5,093.0 5,093 1

Unique (cost=150,601.75..150,601.89 rows=1 width=1,608) (actual time=1,055.133..1,074.909 rows=5,093 loops=1)

2. 72.870 1,055.943 ↓ 8,109.0 8,109 1

Sort (cost=150,601.75..150,601.76 rows=1 width=1,608) (actual time=1,055.132..1,055.943 rows=8,109 loops=1)

  • Sort Key: employee0_.id, employee0_.min_hours_per_day, employee0_.max_hours_per_day, employee0_.min_hours_per_month, employee0_.max_hours_per_month, employee0_.min_hours, employee0_.max_hours, employee0_.min_pay, employee0_.max_pay, employee0_.max_shifts, employee0_.min_shifts, employee0_.datecreated, employee0_.user_id, employee0_.overtime, employee0_.notice_timeframe, employee0_.hire_date, employee0_.termination_date, employee0_.active_attendance_block, employee0_.internal_number, employee0_.internal_password, employee0_.max_shifts_per_week, employee0_.min_shifts_per_week, employee0_.max_shifts_per_month, employee0_.min_shifts_per_month, employee0_.birth_date, employee0_.ssn, employee0_.ssn_suffix, employee0_.payroll_id, employee0_.home_location_id, employee0_.home_department_id, employee0_.default_position_code_id, employee0_.small_pic_id, employee0_.medium_pic_id, employee0_.large_pic_id, employee0_.finger1, employee0_.finger2, employee0_.finger3, employee0_.finger4, employee0_.zkpin, employee0_.corporate_user, employee0_.replicate_locations, employee0_.admin_user, employee0_.copy_schedule, employee0_.holidaycalendar_id, employee0_.pto_track_id, employee0_.minor_id, employee0_.applicant_id, employee0_.designation, employee0_.parent_id, employee0_.starttimestamp, employee0_.endtimestamp, employee0_.af_employeeid, employee0_.integrate_agile
  • Sort Method: quicksort Memory: 2794kB
3. 15.904 983.073 ↓ 8,109.0 8,109 1

Nested Loop (cost=3,754.79..150,601.74 rows=1 width=1,608) (actual time=118.455..983.073 rows=8,109 loops=1)

4. 0.000 399.272 ↓ 17,209.0 17,209 1

Gather (cost=3,754.37..150,578.76 rows=1 width=1,616) (actual time=118.400..399.272 rows=17,209 loops=1)

  • Workers Planned: 1
  • Workers Launched: 1
5. 161.892 550.113 ↓ 8,604.0 8,604 2

Nested Loop (cost=2,754.37..149,578.66 rows=1 width=1,616) (actual time=113.446..550.113 rows=8,604 loops=2)

6. 257.425 388.204 ↓ 4,305.5 8,611 2

Nested Loop (cost=2,753.94..149,544.57 rows=2 width=8) (actual time=113.397..388.204 rows=8,611 loops=2)

7. 3.352 130.127 ↑ 1.5 393 2

Hash Join (cost=2,753.52..5,344.51 rows=605 width=8) (actual time=113.143..130.127 rows=393 loops=2)

  • Hash Cond: (corporatio4_.price_id = price5_.id)
8. 13.742 13.742 ↑ 1.2 12,082 2

Parallel Seq Scan on corporation corporatio4_ (cost=0.00..2,412.08 rows=14,172 width=16) (actual time=0.017..13.742 rows=12,082 loops=2)

  • Filter: (deleted = 'N'::bpchar)
  • Rows Removed by Filter: 12644
9. 0.419 113.033 ↑ 1.4 800 2

Hash (cost=2,739.10..2,739.10 rows=1,154 width=8) (actual time=113.033..113.033 rows=800 loops=2)

  • Buckets: 2048 Batches: 1 Memory Usage: 48kB
10. 112.614 112.614 ↑ 1.4 800 2

Seq Scan on price_object price5_ (cost=0.00..2,739.10 rows=1,154 width=8) (actual time=0.303..112.614 rows=800 loops=2)

  • Filter: ((deleted = 'N'::bpchar) AND (cancelled = 'N'::bpchar) AND (scheduling = 'Y'::bpchar) AND ((price_type <> 0) OR ((price_type = 0) AND (free_trial_end_date > CURRENT_DATE))))
  • Rows Removed by Filter: 26170
11. 0.652 0.652 ↓ 22.0 22 786

Index Scan using i_au_corp on app_user user1_ (cost=0.42..238.34 rows=1 width=16) (actual time=0.119..0.652 rows=22 loops=786)

  • Index Cond: (corporation_id = corporatio4_.id)
  • Filter: ((emailenabled IS NOT NULL) AND (nomoreemail IS NULL) AND ((emailenabled)::text <> ''::text) AND ((email)::text !~~ '%*%'::text) AND (notify_email = 'Y'::bpchar))
  • Rows Removed by Filter: 295
12. 0.017 0.017 ↑ 16.0 1 17,222

Index Scan using i_emp_user_id on employee employee0_ (cost=0.42..16.88 rows=16 width=1,608) (actual time=0.017..0.017 rows=1 loops=17,222)

  • Index Cond: (user_id = user1_.id)
  • Filter: ((notice_timeframe IS NOT NULL) AND (notice_timeframe > 0))
  • Rows Removed by Filter: 0
13. 567.897 567.897 ↓ 0.0 0 17,209

Index Scan using user_loc_user_id on user_location userlocati2_ (cost=0.42..22.79 rows=19 width=8) (actual time=0.032..0.033 rows=0 loops=17,209)

  • Index Cond: (user_id = employee0_.user_id)
  • Filter: ((termination_date IS NULL) OR (termination_date >= CURRENT_DATE))
  • Rows Removed by Filter: 1