explain.depesz.com

PostgreSQL's explain analyze made readable

Result: ZUd

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

Finalize GroupAggregate (cost=4,614,102.20..5,098,343.41 rows=1,076,100 width=104) (actual rows= loops=)

  • Group Key: p2.country, p1.to_id
2. 0.000 0.000 ↓ 0.0

Gather Merge (cost=4,614,102.20..5,036,467.66 rows=2,152,200 width=104) (actual rows= loops=)

  • Workers Planned: 2
3. 0.000 0.000 ↓ 0.0

Partial GroupAggregate (cost=4,613,102.18..4,787,050.35 rows=1,076,100 width=104) (actual rows= loops=)

  • Group Key: p2.country, p1.to_id
4. 0.000 0.000 ↓ 0.0

Sort (cost=4,613,102.18..4,638,954.91 rows=10,341,095 width=27) (actual rows= loops=)

  • Sort Key: p2.country, p1.to_id
5. 0.000 0.000 ↓ 0.0

Hash Join (cost=1,592,194.27..3,231,537.11 rows=10,341,095 width=27) (actual rows= loops=)

  • Hash Cond: (p1.from_id = p2.id)
6. 0.000 0.000 ↓ 0.0

Append (cost=0.00..870,654.23 rows=10,342,818 width=27) (actual rows= loops=)

7. 0.000 0.000 ↓ 0.0

Parallel Seq Scan on pages_23 p1 (cost=0.00..870,654.23 rows=10,342,818 width=27) (actual rows= loops=)

  • Filter: (page_type_id = 23)
8. 0.000 0.000 ↓ 0.0

Hash (cost=1,107,979.23..1,107,979.23 rows=27,855,923 width=12) (actual rows= loops=)

9. 0.000 0.000 ↓ 0.0

Append (cost=0.00..1,107,979.23 rows=27,855,923 width=12) (actual rows= loops=)

10. 0.000 0.000 ↓ 0.0

Seq Scan on pages_1 p2 (cost=0.00..1.09 rows=9 width=12) (actual rows= loops=)

11. 0.000 0.000 ↓ 0.0

Seq Scan on pages_2 p2_1 (cost=0.00..11.20 rows=120 width=12) (actual rows= loops=)

12. 0.000 0.000 ↓ 0.0

Seq Scan on pages_3 p2_2 (cost=0.00..2.56 rows=56 width=12) (actual rows= loops=)

13. 0.000 0.000 ↓ 0.0

Seq Scan on pages_4 p2_3 (cost=0.00..63.96 rows=1,696 width=12) (actual rows= loops=)

14. 0.000 0.000 ↓ 0.0

Seq Scan on pages_5 p2_4 (cost=0.00..23.00 rows=600 width=12) (actual rows= loops=)

15. 0.000 0.000 ↓ 0.0

Seq Scan on pages_6 p2_5 (cost=0.00..1,502.64 rows=39,864 width=12) (actual rows= loops=)

16. 0.000 0.000 ↓ 0.0

Seq Scan on pages_7 p2_6 (cost=0.00..8.12 rows=212 width=12) (actual rows= loops=)

17. 0.000 0.000 ↓ 0.0

Seq Scan on pages_8 p2_7 (cost=0.00..11.20 rows=120 width=12) (actual rows= loops=)

18. 0.000 0.000 ↓ 0.0

Seq Scan on pages_9 p2_8 (cost=0.00..64.96 rows=1,696 width=12) (actual rows= loops=)

19. 0.000 0.000 ↓ 0.0

Seq Scan on pages_10 p2_9 (cost=0.00..1,699.32 rows=44,732 width=12) (actual rows= loops=)

20. 0.000 0.000 ↓ 0.0

Seq Scan on pages_11 p2_10 (cost=0.00..607.00 rows=15,900 width=12) (actual rows= loops=)

21. 0.000 0.000 ↓ 0.0

Seq Scan on pages_12 p2_11 (cost=0.00..40,513.96 rows=1,056,396 width=12) (actual rows= loops=)

22. 0.000 0.000 ↓ 0.0

Seq Scan on pages_13 p2_12 (cost=0.00..2.75 rows=75 width=12) (actual rows= loops=)

23. 0.000 0.000 ↓ 0.0

Seq Scan on pages_14 p2_13 (cost=0.00..24.00 rows=600 width=12) (actual rows= loops=)

24. 0.000 0.000 ↓ 0.0

Seq Scan on pages_15 p2_14 (cost=0.00..616.00 rows=15,900 width=12) (actual rows= loops=)

25. 0.000 0.000 ↓ 0.0

Seq Scan on pages_16 p2_15 (cost=0.00..216.50 rows=5,550 width=12) (actual rows= loops=)

26. 0.000 0.000 ↓ 0.0

Seq Scan on pages_17 p2_16 (cost=0.00..14,587.25 rows=373,725 width=12) (actual rows= loops=)

27. 0.000 0.000 ↓ 0.0

Seq Scan on pages_18 p2_17 (cost=0.00..177.83 rows=4,983 width=12) (actual rows= loops=)

28. 0.000 0.000 ↓ 0.0

Seq Scan on pages_19 p2_18 (cost=0.00..11.20 rows=120 width=12) (actual rows= loops=)

29. 0.000 0.000 ↓ 0.0

Seq Scan on pages_20 p2_19 (cost=0.00..1,576.64 rows=39,864 width=12) (actual rows= loops=)

30. 0.000 0.000 ↓ 0.0

Seq Scan on pages_21 p2_20 (cost=0.00..41,786.93 rows=1,056,393 width=12) (actual rows= loops=)

31. 0.000 0.000 ↓ 0.0

Seq Scan on pages_22 p2_21 (cost=0.00..14,840.25 rows=373,725 width=12) (actual rows= loops=)

32. 0.000 0.000 ↓ 0.0

Seq Scan on pages_23 p2_22 (cost=0.00..989,596.64 rows=24,822,764 width=12) (actual rows= loops=)

33. 0.000 0.000 ↓ 0.0

Seq Scan on pages_24 p2_23 (cost=0.00..1.01 rows=1 width=12) (actual rows= loops=)

34. 0.000 0.000 ↓ 0.0

Seq Scan on pages_25 p2_24 (cost=0.00..11.20 rows=120 width=12) (actual rows= loops=)

35. 0.000 0.000 ↓ 0.0

Seq Scan on pages_26 p2_25 (cost=0.00..22.02 rows=702 width=12) (actual rows= loops=)