explain.depesz.com

PostgreSQL's explain analyze made readable

Result: gz37

Settings
# exclusive inclusive rows x rows loops node
1. 0.068 491,486.717 ↓ 4.0 4 1

GroupAggregate (cost=759.89..759.91 rows=1 width=24) (actual time=491,486.648..491,486.717 rows=4 loops=1)

  • Group Key: sourcing_strategies.id, applications.source_id
2. 0.150 491,486.649 ↓ 63.0 63 1

Sort (cost=759.89..759.89 rows=1 width=24) (actual time=491,486.627..491,486.649 rows=63 loops=1)

  • Sort Key: sourcing_strategies.id, applications.source_id
  • Sort Method: quicksort Memory: 29kB
3. 0.272 491,486.499 ↓ 63.0 63 1

Nested Loop Left Join (cost=27.51..759.88 rows=1 width=24) (actual time=3,416.947..491,486.499 rows=63 loops=1)

  • Filter: ((prospective_hiring_plans.hiring_plan_id = '4460836002'::bigint) OR (prospective_hiring_plans.hiring_plan_id IS NULL))
  • Rows Removed by Filter: 35
4. 0.427 491,485.443 ↓ 98.0 98 1

Nested Loop (cost=27.09..757.42 rows=1 width=24) (actual time=25.994..491,485.443 rows=98 loops=1)

5. 0.148 491,484.722 ↓ 98.0 98 1

Nested Loop (cost=26.95..757.27 rows=1 width=24) (actual time=25.966..491,484.722 rows=98 loops=1)

6. 0.038 0.318 ↓ 8.0 8 1

Nested Loop (cost=26.39..28.42 rows=1 width=24) (actual time=0.199..0.318 rows=8 loops=1)

7. 0.027 0.216 ↓ 8.0 8 1

HashAggregate (cost=26.10..26.11 rows=1 width=8) (actual time=0.195..0.216 rows=8 loops=1)

  • Group Key: sources_1.id
8. 0.024 0.189 ↓ 8.0 8 1

Sort (cost=26.08..26.09 rows=1 width=40) (actual time=0.187..0.189 rows=8 loops=1)

  • Sort Key: (lower((sources_1.public_name)::text))
  • Sort Method: quicksort Memory: 25kB
9. 0.055 0.165 ↓ 8.0 8 1

Nested Loop Left Join (cost=0.71..26.07 rows=1 width=40) (actual time=0.067..0.165 rows=8 loops=1)

  • Filter: ((source_overrides.hide IS NULL) OR (source_overrides.hide IS FALSE))
  • Rows Removed by Filter: 2
10. 0.015 0.070 ↓ 10.0 10 1

Nested Loop (cost=0.29..23.62 rows=1 width=23) (actual time=0.015..0.070 rows=10 loops=1)

  • Join Filter: (sources_1.sourcing_strategy_id = sourcing_strategies_1.id)
  • Rows Removed by Join Filter: 27
11. 0.035 0.035 ↓ 10.0 10 1

Index Scan using sources_pkey on sources sources_1 (cost=0.29..22.44 rows=1 width=31) (actual time=0.011..0.035 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)))
12. 0.020 0.020 ↑ 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.002 rows=4 loops=10)

  • Filter: (display AND reportable)
13. 0.040 0.040 ↓ 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.004..0.004 rows=0 loops=10)

  • Index Cond: ((sources_1.id = source_id) AND (organization_id = '4002074002'::bigint))
14. 0.064 0.064 ↑ 1.0 1 8

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

  • Index Cond: (id = sources_1.id)
15. 491,484.256 491,484.256 ↓ 12.0 12 8

Index Scan using index_applications_on_source_id on applications (cost=0.56..728.84 rows=1 width=16) (actual time=8,995.742..61,435.532 rows=12 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: 1397827
16. 0.294 0.294 ↑ 1.0 1 98

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

  • Index Cond: (id = sources.sourcing_strategy_id)
  • Heap Fetches: 0
17. 0.784 0.784 ↓ 0.0 0 98

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.007..0.008 rows=0 loops=98)

  • Index Cond: (application_id = applications.id)