explain.depesz.com

PostgreSQL's explain analyze made readable

Result: JUuk

Settings
# exclusive inclusive rows x rows loops node
1. 69.814 69.814 ↑ 57.7 11,378 1

CTE Scan on bottom_network (cost=3,295,636.85..3,308,774.01 rows=656,858 width=32) (actual time=6.263..69.814 rows=11,378 loops=1)

2.          

CTE bottom_network

3. 7.429 66.048 ↑ 57.7 11,378 1

Recursive Union (cost=2,048.83..3,295,636.85 rows=656,858 width=32) (actual time=6.262..66.048 rows=11,378 loops=1)

4. 2.343 29.954 ↓ 1.9 10,001 1

Hash Join (cost=2,048.83..29,573.69 rows=5,368 width=32) (actual time=6.261..29.954 rows=10,001 loops=1)

  • Hash Cond: (a1.customer_id = ca.customer_internal_id)
5. 6.286 23.558 ↑ 981.8 7,001 1

Nested Loop (cost=17.95..1,712.02 rows=6,873,900 width=36) (actual time=2.142..23.558 rows=7,001 loops=1)

6. 2.795 3.270 ↓ 35.0 7,001 1

HashAggregate (cost=17.52..19.52 rows=200 width=4) (actual time=2.126..3.270 rows=7,001 loops=1)

  • Group Key: generate_series(5001, 12001)
7. 0.474 0.475 ↓ 7.0 7,001 1

ProjectSet (cost=0.00..5.02 rows=1,000 width=4) (actual time=0.003..0.475 rows=7,001 loops=1)

8. 0.001 0.001 ↑ 1.0 1 1

Result (cost=0.00..0.01 rows=1 width=0) (actual time=0.001..0.001 rows=1 loops=1)

9. 14.002 14.002 ↑ 1.0 1 7,001

Index Scan using customer_network_normalized_customer_id on customer_network_normalized a1 (cost=0.43..8.45 rows=1 width=32) (actual time=0.002..0.002 rows=1 loops=7,001)

  • Index Cond: (customer_id = (generate_series(5001, 12001)))
10. 1.406 4.053 ↓ 1.2 10,200 1

Hash (cost=1,920.32..1,920.32 rows=8,845 width=8) (actual time=4.053..4.053 rows=10,200 loops=1)

  • Buckets: 16,384 Batches: 1 Memory Usage: 527kB
11. 2.647 2.647 ↓ 1.2 10,200 1

Index Scan using customer_alignment_team_id on customer_alignment ca (cost=0.43..1,920.32 rows=8,845 width=8) (actual time=0.027..2.647 rows=10,200 loops=1)

  • Index Cond: (team_internal_id = 101)
12. 5.081 28.665 ↑ 18.6 3,501 3

Nested Loop (cost=0.43..325,292.60 rows=65,149 width=32) (actual time=0.180..9.555 rows=3,501 loops=3)

13. 0.828 0.828 ↑ 14.2 3,793 3

WorkTable Scan on bottom_network a1_1 (cost=0.00..1,073.60 rows=53,680 width=8) (actual time=0.000..0.276 rows=3,793 loops=3)

14. 22.756 22.756 ↑ 1.0 1 11,378

Index Scan using customer_network_normalized_customer_id on customer_network_normalized a2 (cost=0.43..6.03 rows=1 width=32) (actual time=0.002..0.002 rows=1 loops=11,378)

  • Index Cond: (customer_id = a1_1.parent_customer_id)