explain.depesz.com

PostgreSQL's explain analyze made readable

Result: xyAv

Settings
# exclusive inclusive rows x rows loops node
1. 0.723 0.723 ↑ 18.6 236 1

CTE Scan on bottom_network (cost=1,070.53..1,158.55 rows=4,401 width=32) (actual time=0.039..0.723 rows=236 loops=1)

2.          

CTE bottom_network

3. 0.083 0.663 ↑ 18.6 236 1

Recursive Union (cost=0.71..1,070.53 rows=4,401 width=32) (actual time=0.037..0.663 rows=236 loops=1)

4. 0.002 0.037 ↑ 1.0 1 1

Nested Loop (cost=0.71..16.76 rows=1 width=32) (actual time=0.035..0.037 rows=1 loops=1)

5. 0.022 0.022 ↑ 1.0 1 1

Index Scan using customer_alignment_customer_internal_id on customer_alignment ca (cost=0.29..8.30 rows=1 width=8) (actual time=0.022..0.022 rows=1 loops=1)

  • Index Cond: (customer_internal_id = 5,001)
  • Filter: (team_internal_id = 101)
6. 0.013 0.013 ↑ 1.0 1 1

Index Scan using customer_hierarchy_normalized_customer_id on customer_hierarchy_normalized a1 (cost=0.43..8.45 rows=1 width=32) (actual time=0.012..0.013 rows=1 loops=1)

  • Index Cond: (customer_id = 5,001)
7. 0.056 0.543 ↑ 5.6 78 3

Nested Loop (cost=0.43..96.57 rows=440 width=32) (actual time=0.143..0.181 rows=78 loops=3)

8. 0.015 0.015 ↓ 7.9 79 3

WorkTable Scan on bottom_network a1_1 (cost=0.00..0.20 rows=10 width=8) (actual time=0.000..0.005 rows=79 loops=3)

9. 0.472 0.472 ↑ 44.0 1 236

Index Scan using customer_hierarchy_normalized_parent_customer_id on customer_hierarchy_normalized a2 (cost=0.43..9.20 rows=44 width=32) (actual time=0.001..0.002 rows=1 loops=236)

  • Index Cond: (parent_customer_id = a1_1.customer_id)