explain.depesz.com

PostgreSQL's explain analyze made readable

Result: hUeG

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 0.000 ↓ 0.0

Unique (cost=739,412.05..759,509.20 rows=803,886 width=1,581) (actual rows= loops=)

2. 0.000 0.000 ↓ 0.0

Sort (cost=739,412.05..741,421.76 rows=803,886 width=1,581) (actual rows= loops=)

  • Sort Key: loaded_data.id, loaded_data.f_external_id, loaded_data.deleted, loaded_data.declaration_id, loaded_data.organization_id, stored_data.id, declaration.id, declaration.f_child, _organization.id
3. 0.000 0.000 ↓ 0.0

Hash Join (cost=1,662.27..108,281.87 rows=803,886 width=1,581) (actual rows= loops=)

  • Hash Cond: (stored_data.f_org = organization.id)
  • Join Filter: (((_organization.f_external_id)::text IS DISTINCT FROM (organization.f_external_id)::text) OR ((_person.f_external_id)::text IS DISTINCT FROM (person.f_external_id)::text) OR (loaded_data.deleted IS DISTINCT FROM stored_data.deleted))
4. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1,012.26..103,497.62 rows=803,886 width=1,608) (actual rows= loops=)

5. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1,012.26..9,876.90 rows=1 width=1,601) (actual rows= loops=)

  • Join Filter: (stored_data.f_child = person.id)
6. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1,011.83..9,873.64 rows=1 width=1,602) (actual rows= loops=)

7. 0.000 0.000 ↓ 0.0

Gather (cost=1,011.55..9,858.01 rows=1 width=1,590) (actual rows= loops=)

  • Workers Planned: 2
8. 0.000 0.000 ↓ 0.0

Nested Loop (cost=11.55..8,857.91 rows=1 width=1,590) (actual rows= loops=)

  • Join Filter: ((loaded_data.f_external_id)::text = (stored_data.f_external_id)::text)
9. 0.000 0.000 ↓ 0.0

Hash Join (cost=11.12..8,791.00 rows=27 width=1,569) (actual rows= loops=)

  • Hash Cond: ((declaration.f_external_id)::text = (loaded_data.declaration_id)::text)
10. 0.000 0.000 ↓ 0.0

Parallel Seq Scan on declaration (cost=0.00..8,661.91 rows=31,429 width=18) (actual rows= loops=)

  • Filter: (f_uptodate AND (f_data_source = 2))
11. 0.000 0.000 ↓ 0.0

Hash (cost=10.50..10.50 rows=50 width=1,557) (actual rows= loops=)

12. 0.000 0.000 ↓ 0.0

Seq Scan on declarations_organizations loaded_data (cost=0.00..10.50 rows=50 width=1,557) (actual rows= loops=)

13. 0.000 0.000 ↓ 0.0

Index Scan using f_child_idx on declaration2child stored_data (cost=0.43..2.47 rows=1 width=27) (actual rows= loops=)

  • Index Cond: (f_child = declaration.f_child)
  • Filter: (f_uptodate AND (f_data_source = 2))
14. 0.000 0.000 ↓ 0.0

Index Scan using organization_f_external_id_idx on organization _organization (cost=0.28..15.62 rows=1 width=12) (actual rows= loops=)

  • Index Cond: ((f_external_id)::text = (loaded_data.organization_id)::text)
  • Filter: (f_uptodate AND (f_data_source = 2))
15. 0.000 0.000 ↓ 0.0

Index Scan using person_pkey on person (cost=0.42..3.25 rows=1 width=15) (actual rows= loops=)

  • Index Cond: (id = declaration.f_child)
16. 0.000 0.000 ↓ 0.0

Seq Scan on person _person (cost=0.00..85,581.86 rows=803,886 width=7) (actual rows= loops=)

17. 0.000 0.000 ↓ 0.0

Hash (cost=646.13..646.13 rows=310 width=12) (actual rows= loops=)

18. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on organization (cost=49.45..646.13 rows=310 width=12) (actual rows= loops=)

  • Recheck Cond: (f_data_source = 2)
  • Filter: f_uptodate
19. 0.000 0.000 ↓ 0.0

BitmapAnd (cost=49.45..49.45 rows=310 width=0) (actual rows= loops=)

20. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on organization_f_data_source_idx (cost=0.00..24.34 rows=1,074 width=0) (actual rows= loops=)

  • Index Cond: (f_data_source = 2)
21. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on organization_f_uptodate_idx (cost=0.00..24.71 rows=1,124 width=0) (actual rows= loops=)

  • Index Cond: (f_uptodate = true)