explain.depesz.com

PostgreSQL's explain analyze made readable

Result: gq7k

Settings
# exclusive inclusive rows x rows loops node
1. 0.032 12,126.700 ↓ 4.0 4 1

GroupAggregate (cost=3,861.09..3,861.11 rows=1 width=24) (actual time=12,126.682..12,126.700 rows=4 loops=1)

  • Group Key: sourcing_strategies.id, applications.source_id
  • Buffers: shared hit=9287002 read=832245
2. 0.050 12,126.668 ↓ 56.0 56 1

Sort (cost=3,861.09..3,861.10 rows=1 width=24) (actual time=12,126.664..12,126.668 rows=56 loops=1)

  • Sort Key: sourcing_strategies.id, applications.source_id
  • Sort Method: quicksort Memory: 29kB
  • Buffers: shared hit=9287002 read=832245
3. 0.078 12,126.618 ↓ 56.0 56 1

Nested Loop Left Join (cost=27.39..3,861.08 rows=1 width=24) (actual time=19.285..12,126.618 rows=56 loops=1)

  • Filter: ((prospective_hiring_plans.hiring_plan_id = '4460836002'::bigint) OR (prospective_hiring_plans.hiring_plan_id IS NULL))
  • Rows Removed by Filter: 33
  • Buffers: shared hit=9287002 read=832245
4. 0.085 12,126.006 ↓ 89.0 89 1

Nested Loop (cost=26.96..3,858.62 rows=1 width=24) (actual time=0.572..12,126.006 rows=89 loops=1)

  • Buffers: shared hit=9286763 read=832184
5. 0.046 12,125.832 ↓ 89.0 89 1

Nested Loop (cost=26.83..3,858.47 rows=1 width=24) (actual time=0.568..12,125.832 rows=89 loops=1)

  • Buffers: shared hit=9286673 read=832184
6. 0.033 0.258 ↓ 8.0 8 1

Nested Loop (cost=26.26..28.29 rows=1 width=24) (actual time=0.131..0.258 rows=8 loops=1)

  • Buffers: shared hit=73 read=18
7. 0.021 0.145 ↓ 8.0 8 1

HashAggregate (cost=25.97..25.98 rows=1 width=8) (actual time=0.128..0.145 rows=8 loops=1)

  • Group Key: sources_1.id
  • Buffers: shared hit=53 read=14
8. 0.008 0.124 ↓ 8.0 8 1

Nested Loop Left Join (cost=0.71..25.97 rows=1 width=8) (actual time=0.021..0.124 rows=8 loops=1)

  • Filter: ((source_overrides.hide IS NULL) OR (source_overrides.hide IS FALSE))
  • Rows Removed by Filter: 2
  • Buffers: shared hit=53 read=14
9. 0.008 0.046 ↓ 10.0 10 1

Nested Loop (cost=0.29..23.52 rows=1 width=8) (actual time=0.012..0.046 rows=10 loops=1)

  • Join Filter: (sources_1.sourcing_strategy_id = sourcing_strategies_1.id)
  • Rows Removed by Join Filter: 27
  • Buffers: shared hit=34 read=1
10. 0.028 0.028 ↓ 10.0 10 1

Index Scan using sources_pkey on sources sources_1 (cost=0.29..22.34 rows=1 width=16) (actual time=0.008..0.028 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)))
  • Buffers: shared hit=24 read=1
11. 0.010 0.010 ↑ 2.0 4 10

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

  • Filter: (display AND reportable)
  • Buffers: shared hit=10
12. 0.070 0.070 ↓ 0.0 0 10

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.007..0.007 rows=0 loops=10)

  • Index Cond: ((sources_1.id = source_id) AND (organization_id = '4002074002'::bigint))
  • Buffers: shared hit=19 read=13
13. 0.080 0.080 ↑ 1.0 1 8

Index Scan using sources_pkey on sources (cost=0.29..2.31 rows=1 width=16) (actual time=0.010..0.010 rows=1 loops=8)

  • Index Cond: (id = sources_1.id)
  • Buffers: shared hit=20 read=4
14. 12,125.528 12,125.528 ↓ 11.0 11 8

Index Scan using index_applications_on_source_id on applications (cost=0.56..3,830.17 rows=1 width=16) (actual time=230.596..1,515.691 rows=11 loops=8)

  • Index Cond: (source_id = sources.id)
  • Filter: (prospect 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) AND (organization_id = '4002074002'::bigint) AND (stage_status_id = '4000005002'::bigint))
  • Rows Removed by Filter: 1388672
  • Buffers: shared hit=9286600 read=832166
15. 0.089 0.089 ↑ 1.0 1 89

Index Only Scan using sourcing_strategies_pkey on sourcing_strategies (cost=0.13..0.15 rows=1 width=8) (actual time=0.001..0.001 rows=1 loops=89)

  • Index Cond: (id = sources.sourcing_strategy_id)
  • Heap Fetches: 0
  • Buffers: shared hit=90
16. 0.534 0.534 ↓ 0.0 0 89

Index Scan using index_prospective_hiring_plans_on_application_id on prospective_hiring_plans (cost=0.43..2.45 rows=1 width=16) (actual time=0.006..0.006 rows=0 loops=89)

  • Index Cond: (application_id = applications.id)
  • Buffers: shared hit=239 read=61
Planning time : 1.381 ms
Execution time : 12,126.790 ms