explain.depesz.com

PostgreSQL's explain analyze made readable

Result: uWMf

Settings
# exclusive inclusive rows x rows loops node
1. 0.001 0.040 ↓ 0.0 0 1

Result (cost=41.53..128.10 rows=1 width=32) (actual time=0.040..0.040 rows=0 loops=1)

  • One-Time Filter: (NOT $0)
2.          

Initplan (for Result)

3. 0.015 0.039 ↑ 1.0 1 1

Hash Join (cost=13.64..20.79 rows=1 width=0) (actual time=0.039..0.039 rows=1 loops=1)

  • Hash Cond: (person_to_person_type.person_type_id = person_type.id)
4. 0.019 0.019 ↓ 1.0 157 1

Seq Scan on person_to_person_type (cost=0.00..6.56 rows=156 width=16) (actual time=0.004..0.019 rows=157 loops=1)

5. 0.000 0.005 ↑ 1.0 1 1

Hash (cost=13.62..13.62 rows=1 width=16) (actual time=0.005..0.005 rows=1 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
6. 0.005 0.005 ↑ 1.0 1 1

Seq Scan on person_type (cost=0.00..13.62 rows=1 width=16) (actual time=0.003..0.005 rows=1 loops=1)

  • Filter: (base_type = 'INTERNAL'::text)
  • Rows Removed by Filter: 9
7. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=20.73..107.30 rows=1 width=32) (never executed)

8. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=20.46..99.01 rows=1 width=48) (never executed)

9. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.29..17.79 rows=1 width=64) (never executed)

10. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.15..9.61 rows=1 width=80) (never executed)

  • Join Filter: (organizational_unit.id = person_assignment.organizational_unit_id)
11. 0.000 0.000 ↓ 0.0 0

Index Scan using idx_organizational_unit_state on organizational_unit (cost=0.15..8.17 rows=1 width=64) (never executed)

  • Index Cond: (state = 'ACTIVE'::text)
12. 0.000 0.000 ↓ 0.0 0

Seq Scan on person_assignment (cost=0.00..1.44 rows=1 width=32) (never executed)

  • Filter: ((state = 'ACTIVE'::text) AND (person_id = '8e459ecd-2208-44b9-836a-b9bbf182ec03'::uuid))
13. 0.000 0.000 ↓ 0.0 0

Index Scan using pk_organizational_hierarchy on organizational_hierarchy (cost=0.15..8.17 rows=1 width=16) (never executed)

  • Index Cond: (id = organizational_unit.organizational_hierarchy_id)
  • Filter: (state = 'ACTIVE'::text)
14. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=20.17..81.16 rows=3 width=20) (never executed)

15. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=19.90..78.12 rows=8 width=16) (never executed)

16. 0.000 0.000 ↓ 0.0 0

Index Scan using idx_organizational_unit_state on organizational_unit ou2 (cost=0.15..8.17 rows=1 width=16) (never executed)

  • Index Cond: (state = 'ACTIVE'::text)
  • Filter: (materialized_path @> organizational_unit.materialized_path)
17. 0.000 0.000 ↓ 0.0 0

Bitmap Heap Scan on organization_assignment (cost=19.75..65.47 rows=448 width=32) (never executed)

  • Recheck Cond: ((organizational_unit_id = ou2.id) AND (state = 'ACTIVE'::text))
18. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on organizational_assignment_org_unit_id_org_id_idx (cost=0.00..19.64 rows=448 width=0) (never executed)

  • Index Cond: (organizational_unit_id = ou2.id)
19. 0.000 0.000 ↓ 0.0 0

Index Scan using employee_organization_id_state_idx on employee (cost=0.27..0.35 rows=3 width=36) (never executed)

  • Index Cond: ((organization_id = organization_assignment.organization_id) AND (state = 'ACTIVE'::text))
20. 0.000 0.000 ↓ 0.0 0

Index Only Scan using pk_person on person (cost=0.27..8.29 rows=1 width=16) (never executed)

  • Index Cond: (id = employee.person_id)
  • Heap Fetches: 0
Planning time : 1.025 ms
Execution time : 0.097 ms