explain.depesz.com

PostgreSQL's explain analyze made readable

Result: XwaC

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

XN Subquery Scan unique_period_table (cost=107.07..160,137.25 rows=73 width=108) (actual rows= loops=)

2. 0.000 0.000 ↓ 0.0

XN Unique (cost=107.07..160,136.52 rows=73 width=33) (actual rows= loops=)

3. 0.000 0.000 ↓ 0.0

XN Hash Left Join DS_DIST_ALL_NONE (cost=107.07..160,135.42 rows=73 width=33) (actual rows= loops=)

  • Hash Cond: ("outer".last_year_week_end_date = "inner".week_end_date)
4. 0.000 0.000 ↓ 0.0

XN Hash Left Join DS_DIST_ALL_NONE (cost=97.95..160,123.74 rows=73 width=37) (actual rows= loops=)

  • Hash Cond: ("outer".week_end_date = "inner".week_end_date)
5. 0.000 0.000 ↓ 0.0

XN Hash Left Join DS_DIST_ALL_NONE (cost=89.47..160,113.62 rows=73 width=37) (actual rows= loops=)

  • Hash Cond: ((("outer".calendar_year_id - 1) = ("inner".calendar_year_id)::integer) AND ("outer".calendar_week_id = "inner".calendar_week_id))
6. 0.000 0.000 ↓ 0.0

XN Nested Loop DS_BCAST_INNER (cost=78.52..160,100.54 rows=5 width=41) (actual rows= loops=)

7. 0.000 0.000 ↓ 0.0

XN Hash Left Join DS_DIST_ALL_NONE (cost=69.40..80,091.19 rows=5 width=41) (actual rows= loops=)

  • Hash Cond: ("outer".accounting_period_id = "inner".accounting_period_id)
8. 0.000 0.000 ↓ 0.0

XN Hash Join DS_DIST_ALL_NONE (cost=55.93..80,077.60 rows=5 width=37) (actual rows= loops=)

  • Hash Cond: ("outer".week_end_date = "inner".week_end_date)
9. 0.000 0.000 ↓ 0.0

XN Subquery Scan a (cost=46.80..80,068.37 rows=5 width=4) (actual rows= loops=)

10. 0.000 0.000 ↓ 0.0

XN Unique (cost=46.80..80,068.32 rows=5 width=4) (actual rows= loops=)

11. 0.000 0.000 ↓ 0.0

XN Nested Loop DS_BCAST_INNER (cost=46.80..80,068.13 rows=73 width=4) (actual rows= loops=)

12. 0.000 0.000 ↓ 0.0

XN Hash Left Join DS_DIST_ALL_NONE (cost=37.68..55.73 rows=73 width=4) (actual rows= loops=)

  • Hash Cond: ("outer".last_year_week_end_date = "inner".week_end_date)
13. 0.000 0.000 ↓ 0.0

XN Hash Left Join DS_DIST_ALL_NONE (cost=28.55..44.96 rows=73 width=8) (actual rows= loops=)

  • Hash Cond: ("outer".week_end_date = "inner".week_end_date)
14. 0.000 0.000 ↓ 0.0

XN Hash Left Join DS_DIST_ALL_NONE (cost=20.07..34.89 rows=73 width=4) (actual rows= loops=)

  • Hash Cond: ((("outer".calendar_year_id - 1) = ("inner".calendar_year_id)::integer) AND ("outer".calendar_week_id = "inner".calendar_week_id))
15. 0.000 0.000 ↓ 0.0

XN Hash Left Join DS_DIST_ALL_NONE (cost=9.12..10.31 rows=32 width=8) (actual rows= loops=)

  • Hash Cond: ("outer".week_end_date = "inner".week_end_date)
16. 0.000 0.000 ↓ 0.0

XN Seq Scan on "day" (cost=0.00..0.47 rows=32 width=4) (actual rows= loops=)

  • Filter: ((day_date >= '2019-05-08'::date) AND (day_date <= '2019-06-08'::date))
17. 0.000 0.000 ↓ 0.0

XN Hash (cost=7.30..7.30 rows=730 width=8) (actual rows= loops=)

18. 0.000 0.000 ↓ 0.0

XN Seq Scan on week (cost=0.00..7.30 rows=730 width=8) (actual rows= loops=)

19. 0.000 0.000 ↓ 0.0

XN Hash (cost=7.30..7.30 rows=730 width=4) (actual rows= loops=)

20. 0.000 0.000 ↓ 0.0

XN Seq Scan on week ly_week (cost=0.00..7.30 rows=730 width=4) (actual rows= loops=)

21. 0.000 0.000 ↓ 0.0

XN Hash (cost=6.78..6.78 rows=678 width=8) (actual rows= loops=)

22. 0.000 0.000 ↓ 0.0

XN Seq Scan on weekly_date_compare (cost=0.00..6.78 rows=678 width=8) (actual rows= loops=)

23. 0.000 0.000 ↓ 0.0

XN Hash (cost=7.30..7.30 rows=730 width=4) (actual rows= loops=)

24. 0.000 0.000 ↓ 0.0

XN Seq Scan on week lfy_week (cost=0.00..7.30 rows=730 width=4) (actual rows= loops=)

25. 0.000 0.000 ↓ 0.0

XN Hash Left Join DS_DIST_ALL_NONE (cost=9.12..9.16 rows=1 width=0) (actual rows= loops=)

  • Hash Cond: ("outer".week_end_date = "inner".week_end_date)
26. 0.000 0.000 ↓ 0.0

XN Seq Scan on "day" (cost=0.00..0.01 rows=1 width=4) (actual rows= loops=)

  • Filter: (day_date = '2019-05-09'::date)
27. 0.000 0.000 ↓ 0.0

XN Hash (cost=7.30..7.30 rows=730 width=4) (actual rows= loops=)

28. 0.000 0.000 ↓ 0.0

XN Seq Scan on week (cost=0.00..7.30 rows=730 width=4) (actual rows= loops=)

29. 0.000 0.000 ↓ 0.0

XN Hash (cost=7.30..7.30 rows=730 width=37) (actual rows= loops=)

30. 0.000 0.000 ↓ 0.0

XN Seq Scan on week (cost=0.00..7.30 rows=730 width=37) (actual rows= loops=)

31. 0.000 0.000 ↓ 0.0

XN Hash (cost=13.05..13.05 rows=168 width=8) (actual rows= loops=)

32. 0.000 0.000 ↓ 0.0

XN Subquery Scan tb_period_end_date_tb (cost=10.95..13.05 rows=168 width=8) (actual rows= loops=)

33. 0.000 0.000 ↓ 0.0

XN HashAggregate (cost=10.95..11.37 rows=168 width=8) (actual rows= loops=)

34. 0.000 0.000 ↓ 0.0

XN Seq Scan on week (cost=0.00..7.30 rows=730 width=8) (actual rows= loops=)

35. 0.000 0.000 ↓ 0.0

XN Hash Left Join DS_DIST_ALL_NONE (cost=9.12..9.16 rows=1 width=0) (actual rows= loops=)

  • Hash Cond: ("outer".week_end_date = "inner".week_end_date)
36. 0.000 0.000 ↓ 0.0

XN Seq Scan on "day" (cost=0.00..0.01 rows=1 width=4) (actual rows= loops=)

  • Filter: (day_date = '2019-05-09'::date)
37. 0.000 0.000 ↓ 0.0

XN Hash (cost=7.30..7.30 rows=730 width=4) (actual rows= loops=)

38. 0.000 0.000 ↓ 0.0

XN Seq Scan on week (cost=0.00..7.30 rows=730 width=4) (actual rows= loops=)

39. 0.000 0.000 ↓ 0.0

XN Hash (cost=7.30..7.30 rows=730 width=4) (actual rows= loops=)

40. 0.000 0.000 ↓ 0.0

XN Seq Scan on week ly_week (cost=0.00..7.30 rows=730 width=4) (actual rows= loops=)

41. 0.000 0.000 ↓ 0.0

XN Hash (cost=6.78..6.78 rows=678 width=8) (actual rows= loops=)

42. 0.000 0.000 ↓ 0.0

XN Seq Scan on weekly_date_compare (cost=0.00..6.78 rows=678 width=8) (actual rows= loops=)

43. 0.000 0.000 ↓ 0.0

XN Hash (cost=7.30..7.30 rows=730 width=4) (actual rows= loops=)

44. 0.000 0.000 ↓ 0.0

XN Seq Scan on week lfy_week (cost=0.00..7.30 rows=730 width=4) (actual rows= loops=)