explain.depesz.com

PostgreSQL's explain analyze made readable

Result: ZDg5

Settings
# exclusive inclusive rows x rows loops node
1. 0.341 11,581.650 ↓ 10.0 10 1

GroupAggregate (cost=33,861.29..33,861.31 rows=1 width=24) (actual time=11,581.175..11,581.650 rows=10 loops=1)

  • Group Key: sourcing_strategies.id, applications.source_id
  • Buffers: shared hit=8698 read=21781 dirtied=689
2. 0.732 11,581.309 ↓ 339.0 339 1

Sort (cost=33,861.29..33,861.30 rows=1 width=24) (actual time=11,581.159..11,581.309 rows=339 loops=1)

  • Sort Key: sourcing_strategies.id, applications.source_id
  • Sort Method: quicksort Memory: 51kB
  • Buffers: shared hit=8698 read=21781 dirtied=689
3. 1.557 11,580.577 ↓ 339.0 339 1

Nested Loop (cost=1.28..33,861.28 rows=1 width=24) (actual time=41.466..11,580.577 rows=339 loops=1)

  • Join Filter: (sources.sourcing_strategy_id = sourcing_strategies.id)
  • Rows Removed by Join Filter: 1014
  • Buffers: shared hit=8698 read=21781 dirtied=689
4. 1.074 11,578.003 ↓ 339.0 339 1

Nested Loop (cost=1.28..33,860.10 rows=1 width=24) (actual time=41.457..11,578.003 rows=339 loops=1)

  • Buffers: shared hit=8359 read=21781 dirtied=689
5. 1.986 11,575.234 ↓ 339.0 339 1

Nested Loop Left Join (cost=0.99..33,858.18 rows=1 width=16) (actual time=41.444..11,575.234 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
  • Buffers: shared hit=7342 read=21781 dirtied=689
6. 11,568.508 11,568.508 ↓ 1.7 395 1

Index Scan using index_applications_on_created_at_and_id_and_organization_id on applications (cost=0.56..33,303.41 rows=229 width=16) (actual time=41.418..11,568.508 rows=395 loops=1)

  • 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) AND (organization_id = '4002074002'::bigint))
  • Filter: (prospect AND (source_id = ANY ('{4000011002,4000017002,4000031002,4000056002,4000096002,4000098002,4000100002,4000110002,4000151002,4000173002}'::bigint[])))
  • Rows Removed by Filter: 8987
  • Buffers: shared hit=6126 read=21756 dirtied=689
7. 4.740 4.740 ↓ 0.0 0 395

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

  • Index Cond: (application_id = applications.id)
  • Buffers: shared hit=1216 read=25
8. 1.695 1.695 ↑ 1.0 1 339

Index Scan using sources_pkey on sources (cost=0.29..1.92 rows=1 width=16) (actual time=0.005..0.005 rows=1 loops=339)

  • Index Cond: (id = applications.source_id)
  • Buffers: shared hit=1017
9. 1.017 1.017 ↑ 2.0 4 339

Seq Scan on sourcing_strategies (cost=0.00..1.08 rows=8 width=8) (actual time=0.001..0.003 rows=4 loops=339)

  • Buffers: shared hit=339
Planning time : 0.945 ms
Execution time : 11,581.745 ms