explain.depesz.com

PostgreSQL's explain analyze made readable

Result: vBoU

Settings
# exclusive inclusive rows x rows loops node
1. 19.572 86.779 ↓ 47.1 2,734 1

Unique (cost=3,218.41..3,251.04 rows=58 width=1,314) (actual time=65.781..86.779 rows=2,734 loops=1)

2. 17.217 67.207 ↓ 47.1 2,734 1

Sort (cost=3,218.41..3,218.56 rows=58 width=1,314) (actual time=65.780..67.207 rows=2,734 loops=1)

  • Sort Key: slr_employee.id, slr_employee.info_date_prev, slr_employee.info_date_next, slr_employee.created, slr_employee.modified, slr_employee.external_id, slr_employee.uuid, slr_employee.tab_num, slr_employee.tab_num_value, slr_employee.number, sl (...)
  • Sort Method: quicksort Memory: 6220kB
3. 3.358 49.990 ↓ 47.1 2,734 1

Nested Loop (cost=636.12..3,216.72 rows=58 width=1,314) (actual time=2.432..49.990 rows=2,734 loops=1)

4. 2.690 41.164 ↓ 47.1 2,734 1

Nested Loop Left Join (cost=635.70..2,738.76 rows=58 width=1,158) (actual time=2.418..41.164 rows=2,734 loops=1)

5. 3.171 30.272 ↓ 47.1 2,734 1

Nested Loop (cost=635.28..2,260.81 rows=58 width=1,088) (actual time=2.404..30.272 rows=2,734 loops=1)

6. 3.554 18.899 ↓ 47.1 2,734 1

Nested Loop (cost=634.87..1,787.00 rows=58 width=609) (actual time=2.391..18.899 rows=2,734 loops=1)

7. 7.845 9.877 ↓ 47.1 2,734 1

Bitmap Heap Scan on slr_employee (cost=634.58..1,416.87 rows=58 width=186) (actual time=2.372..9.877 rows=2,734 loops=1)

  • Recheck Cond: ((deleted_by_employee_id IS NULL) AND (ent_id = 1505) AND (department_id = ANY ('{19001,11999,17348,12000,14966,14957,14959,14961,11996,12096,12097,12098,12100,12101,12102,12004,14948,12005,12085,12088,12 (...)
  • Filter: ((admission_date <= '2019-09-30'::date) AND ((lay_off_date IS NULL) OR (lay_off_date >= '2019-09-01'::date)))
  • Rows Removed by Filter: 6089
  • Heap Blocks: exact=1936
8. 0.183 2.032 ↓ 0.0 0 1

BitmapAnd (cost=634.58..634.58 rows=225 width=0) (actual time=2.032..2.032 rows=0 loops=1)

9. 0.857 0.857 ↓ 1.0 8,849 1

Bitmap Index Scan on slr_employe_deleted_e88592_idx (cost=0.00..224.00 rows=8,758 width=0) (actual time=0.857..0.857 rows=8,849 loops=1)

  • Index Cond: ((deleted_by_employee_id IS NULL) AND (ent_id = 1505))
10. 0.992 0.992 ↓ 1.2 8,880 1

Bitmap Index Scan on slr_employee_department_id (cost=0.00..410.30 rows=7,313 width=0) (actual time=0.992..0.992 rows=8,880 loops=1)

  • Index Cond: (department_id = ANY ('{19001,11999,17348,12000,14966,14957,14959,14961,11996,12096,12097,12098,12100,12101,12102,12004,14948,12005,12085,12088,12089,12090,12091,12006,12082,15551,15549,12083,15 (...)
11. 5.468 5.468 ↑ 1.0 1 2,734

Index Scan using slr_departmen_pkey on slr_departmen (cost=0.29..6.37 rows=1 width=423) (actual time=0.002..0.002 rows=1 loops=2,734)

  • Index Cond: (id = slr_employee.department_id)
12. 8.202 8.202 ↑ 1.0 1 2,734

Index Scan using slr_candidate_pkey on slr_candidate (cost=0.42..8.16 rows=1 width=479) (actual time=0.003..0.003 rows=1 loops=2,734)

  • Index Cond: (id = slr_employee.candidate_id)
13. 8.202 8.202 ↑ 1.0 1 2,734

Index Scan using slr_worker_pkey on slr_worker (cost=0.42..8.23 rows=1 width=70) (actual time=0.003..0.003 rows=1 loops=2,734)

  • Index Cond: (slr_employee.worker_id = id)
14. 5.468 5.468 ↑ 1.0 1 2,734

Index Scan using slr_local_position_pkey on slr_local_position (cost=0.42..8.23 rows=1 width=156) (actual time=0.002..0.002 rows=1 loops=2,734)

  • Index Cond: (id = slr_employee.position_id)
Planning time : 77.903 ms
Execution time : 87.455 ms