explain.depesz.com

PostgreSQL's explain analyze made readable

Result: CvK6

Settings
# exclusive inclusive rows x rows loops node
1. 0.279 343,703.814 ↓ 8.0 8 1

GroupAggregate (cost=16,211.50..16,211.52 rows=1 width=24) (actual time=343,703.457..343,703.814 rows=8 loops=1)

  • Group Key: sourcing_strategies.id, applications.source_id
2. 0.553 343,703.535 ↓ 307.0 307 1

Sort (cost=16,211.50..16,211.50 rows=1 width=24) (actual time=343,703.433..343,703.535 rows=307 loops=1)

  • Sort Key: sourcing_strategies.id, applications.source_id
  • Sort Method: quicksort Memory: 48kB
3. 0.645 343,702.982 ↓ 307.0 307 1

Nested Loop Left Join (cost=15,816.61..16,211.49 rows=1 width=24) (actual time=206,317.831..343,702.982 rows=307 loops=1)

  • Filter: ((source_overrides.hide IS NULL) OR (source_overrides.hide IS FALSE))
  • Rows Removed by Filter: 32
4. 1.023 343,700.642 ↓ 339.0 339 1

Nested Loop Left Join (cost=15,816.19..16,209.04 rows=1 width=32) (actual time=206,317.814..343,700.642 rows=339 loops=1)

  • Filter: ((prospective_hiring_plans.hiring_plan_id = '4460836002'::bigint) OR (prospective_hiring_plans.hiring_plan_id IS NULL))
  • Rows Removed by Filter: 56
5. 1.230 343,692.904 ↓ 395.0 395 1

Nested Loop (cost=15,815.77..16,206.69 rows=1 width=32) (actual time=206,317.770..343,692.904 rows=395 loops=1)

6. 1.706 343,690.489 ↓ 395.0 395 1

Nested Loop (cost=15,815.63..16,206.23 rows=1 width=40) (actual time=206,317.726..343,690.489 rows=395 loops=1)

  • Join Filter: (sources.sourcing_strategy_id = sourcing_strategies.id)
  • Rows Removed by Join Filter: 1172
7. 67.578 343,687.203 ↓ 395.0 395 1

Nested Loop (cost=15,815.63..16,205.05 rows=1 width=32) (actual time=206,317.708..343,687.203 rows=395 loops=1)

8. 0.125 0.125 ↓ 10.0 10 1

Index Scan using sources_pkey on sources (cost=0.29..22.50 rows=1 width=16) (actual time=0.020..0.125 rows=10 loops=1)

  • Index Cond: (id = ANY ('{4000011002,4000017002,4000031002,4000056002,4000096002,4000098002,4000100002,4000110002,4000151002,4000173002}'::bigint[]))
  • Filter: (display AND ((organization_id IS NULL) OR (organization_id = '4002074002'::bigint)))
9. 44,593.660 343,619.500 ↓ 40.0 40 10

Bitmap Heap Scan on applications (cost=15,815.34..16,182.54 rows=1 width=16) (actual time=31,735.865..34,361.950 rows=40 loops=10)

  • Recheck Cond: ((source_id = sources.id) AND (created_at >= '2020-01-27 00:00:00'::timestamp without time zone) AND (created_at <= '2020-02-02 23:59:59.999999'::timestamp without time zone))
  • Rows Removed by Index Recheck: 998860
  • Filter: (prospect AND (organization_id = '4002074002'::bigint))
  • Rows Removed by Filter: 14989
  • Heap Blocks: exact=54658 lossy=278143
10. 285.210 299,025.840 ↓ 0.0 0 10

BitmapAnd (cost=15,815.34..15,815.34 rows=360 width=0) (actual time=29,902.583..29,902.584 rows=0 loops=10)

11. 295,073.510 295,073.510 ↓ 48.4 1,159,437 10

Bitmap Index Scan on index_applications_on_source_id (cost=0.00..980.17 rows=23,947 width=0) (actual time=29,507.351..29,507.351 rows=1,159,437 loops=10)

  • Index Cond: (source_id = sources.id)
12. 3,667.120 3,667.120 ↑ 1.0 549,564 10

Bitmap Index Scan on index_applications_on_created_at (cost=0.00..14,834.74 rows=559,417 width=0) (actual time=366.712..366.712 rows=549,564 loops=10)

  • Index Cond: ((created_at >= '2020-01-27 00:00:00'::timestamp without time zone) AND (created_at <= '2020-02-02 23:59:59.999999'::timestamp without time zone))
13. 1.580 1.580 ↑ 2.0 4 395

Seq Scan on sourcing_strategies (cost=0.00..1.08 rows=8 width=8) (actual time=0.002..0.004 rows=4 loops=395)

  • Filter: (display AND reportable)
14. 1.185 1.185 ↑ 1.0 1 395

Index Only Scan using sourcing_strategies_pkey on sourcing_strategies sourcing_strategies_sources (cost=0.13..0.40 rows=1 width=8) (actual time=0.003..0.003 rows=1 loops=395)

  • Index Cond: (id = sourcing_strategies.id)
  • Heap Fetches: 0
15. 6.715 6.715 ↓ 0.0 0 395

Index Scan using index_prospective_hiring_plans_on_application_id on prospective_hiring_plans (cost=0.43..2.33 rows=1 width=16) (actual time=0.017..0.017 rows=0 loops=395)

  • Index Cond: (application_id = applications.id)
16. 1.695 1.695 ↓ 0.0 0 339

Index Scan using index_source_overrides_on_source_id_and_organization_id on source_overrides (cost=0.42..2.44 rows=1 width=9) (actual time=0.005..0.005 rows=0 loops=339)

  • Index Cond: ((sources.id = source_id) AND (organization_id = '4002074002'::bigint))
Planning time : 2.791 ms
Execution time : 343,717.212 ms