explain.depesz.com

PostgreSQL's explain analyze made readable

Result: xMfu

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

Update on forensics (cost=428,577,941.30..440,766,649.30 rows=304,717,700 width=409) (actual rows= loops=)

2.          

CTE new_recipients

3. 0.000 0.000 ↓ 0.0

Hash Join (cost=20,651.78..428,559,272.98 rows=304,717,700 width=39) (actual rows= loops=)

  • Hash Cond: (message.msg_id = forensics_1.hdr_message_id)
4. 0.000 0.000 ↓ 0.0

Append (cost=0.00..292,359,657.04 rows=1,298,846,704 width=72) (actual rows= loops=)

5. 0.000 0.000 ↓ 0.0

Seq Scan on message (cost=0.00..3,582.65 rows=32,065 width=86) (actual rows= loops=)

6. 0.000 0.000 ↓ 0.0

Seq Scan on message_20181126 (cost=0.00..6,336,010.06 rows=27,153,806 width=64) (actual rows= loops=)

7. 0.000 0.000 ↓ 0.0

Seq Scan on message_20181127 (cost=0.00..6,789,231.44 rows=27,947,844 width=64) (actual rows= loops=)

8. 0.000 0.000 ↓ 0.0

Seq Scan on message_20181128 (cost=0.00..7,133,713.64 rows=29,725,164 width=64) (actual rows= loops=)

9. 0.000 0.000 ↓ 0.0

Seq Scan on message_20181129 (cost=0.00..7,195,865.12 rows=30,303,012 width=64) (actual rows= loops=)

10. 0.000 0.000 ↓ 0.0

Seq Scan on message_20181130 (cost=0.00..6,919,372.88 rows=29,301,688 width=64) (actual rows= loops=)

11. 0.000 0.000 ↓ 0.0

Seq Scan on message_20181201 (cost=0.00..3,096,665.44 rows=13,045,244 width=64) (actual rows= loops=)

12. 0.000 0.000 ↓ 0.0

Seq Scan on message_20181202 (cost=0.00..3,048,233.70 rows=13,081,970 width=64) (actual rows= loops=)

13. 0.000 0.000 ↓ 0.0

Seq Scan on message_20181203 (cost=0.00..6,866,583.72 rows=29,421,472 width=64) (actual rows= loops=)

14. 0.000 0.000 ↓ 0.0

Seq Scan on message_20181204 (cost=0.00..7,115,463.96 rows=30,441,896 width=64) (actual rows= loops=)

15. 0.000 0.000 ↓ 0.0

Seq Scan on message_20181205 (cost=0.00..6,883,831.64 rows=29,507,664 width=64) (actual rows= loops=)

16. 0.000 0.000 ↓ 0.0

Seq Scan on message_20181206 (cost=0.00..7,535,229.40 rows=32,756,540 width=64) (actual rows= loops=)

17. 0.000 0.000 ↓ 0.0

Seq Scan on message_20181207 (cost=0.00..6,665,776.32 rows=29,500,332 width=64) (actual rows= loops=)

18. 0.000 0.000 ↓ 0.0

Seq Scan on message_20181208 (cost=0.00..3,111,912.83 rows=13,828,883 width=64) (actual rows= loops=)

19. 0.000 0.000 ↓ 0.0

Seq Scan on message_20181209 (cost=0.00..2,226,211.77 rows=9,818,777 width=64) (actual rows= loops=)

20. 0.000 0.000 ↓ 0.0

Seq Scan on message_20181210 (cost=0.00..6,263,208.52 rows=27,991,052 width=64) (actual rows= loops=)

21. 0.000 0.000 ↓ 0.0

Seq Scan on message_20181211 (cost=0.00..6,719,272.62 rows=29,869,462 width=64) (actual rows= loops=)

22. 0.000 0.000 ↓ 0.0

Seq Scan on message_20181212 (cost=0.00..6,621,834.18 rows=29,157,218 width=64) (actual rows= loops=)

23. 0.000 0.000 ↓ 0.0

Seq Scan on message_20181213 (cost=0.00..6,575,336.64 rows=29,465,664 width=64) (actual rows= loops=)

24. 0.000 0.000 ↓ 0.0

Seq Scan on message_20181214 (cost=0.00..6,114,276.92 rows=27,431,192 width=64) (actual rows= loops=)

25. 0.000 0.000 ↓ 0.0

Seq Scan on message_20181215 (cost=0.00..2,678,240.53 rows=11,936,853 width=64) (actual rows= loops=)

26. 0.000 0.000 ↓ 0.0

Seq Scan on message_20181216 (cost=0.00..2,142,971.06 rows=9,568,206 width=64) (actual rows= loops=)

27. 0.000 0.000 ↓ 0.0

Seq Scan on message_20181217 (cost=0.00..6,179,547.80 rows=27,833,680 width=64) (actual rows= loops=)

28. 0.000 0.000 ↓ 0.0

Seq Scan on message_20181218 (cost=0.00..6,602,239.32 rows=29,225,732 width=90) (actual rows= loops=)

29. 0.000 0.000 ↓ 0.0

Seq Scan on message_20181219 (cost=0.00..6,288,332.40 rows=29,944,440 width=64) (actual rows= loops=)

30. 0.000 0.000 ↓ 0.0

Seq Scan on message_20181220 (cost=0.00..6,167,394.45 rows=29,368,545 width=64) (actual rows= loops=)

31. 0.000 0.000 ↓ 0.0

Seq Scan on message_20181221 (cost=0.00..5,894,221.20 rows=28,067,720 width=64) (actual rows= loops=)

32. 0.000 0.000 ↓ 0.0

Seq Scan on message_20181222 (cost=0.00..2,451,924.30 rows=11,675,830 width=64) (actual rows= loops=)

33. 0.000 0.000 ↓ 0.0

Seq Scan on message_20181223 (cost=0.00..1,842,901.20 rows=8,775,720 width=64) (actual rows= loops=)

34. 0.000 0.000 ↓ 0.0

Seq Scan on message_20181224 (cost=0.00..3,085,603.50 rows=14,693,350 width=64) (actual rows= loops=)

35. 0.000 0.000 ↓ 0.0

Seq Scan on message_20181225 (cost=0.00..1,843,351.65 rows=8,777,865 width=64) (actual rows= loops=)

36. 0.000 0.000 ↓ 0.0

Seq Scan on message_20181226 (cost=0.00..3,988,807.20 rows=18,994,320 width=64) (actual rows= loops=)

37. 0.000 0.000 ↓ 0.0

Seq Scan on message_20181227 (cost=0.00..4,907,382.90 rows=23,368,490 width=64) (actual rows= loops=)

38. 0.000 0.000 ↓ 0.0

Seq Scan on message_20181228 (cost=0.00..4,473,582.75 rows=21,302,775 width=64) (actual rows= loops=)

39. 0.000 0.000 ↓ 0.0

Seq Scan on message_20181229 (cost=0.00..2,264,588.55 rows=10,783,755 width=64) (actual rows= loops=)

40. 0.000 0.000 ↓ 0.0

Seq Scan on message_20181230 (cost=0.00..1,926,047.55 rows=9,171,655 width=64) (actual rows= loops=)

41. 0.000 0.000 ↓ 0.0

Seq Scan on message_20181231 (cost=0.00..3,430,425.60 rows=16,335,360 width=64) (actual rows= loops=)

42. 0.000 0.000 ↓ 0.0

Seq Scan on message_20190101 (cost=0.00..2,178,621.90 rows=10,374,390 width=64) (actual rows= loops=)

43. 0.000 0.000 ↓ 0.0

Seq Scan on message_20190102 (cost=0.00..5,219,348.40 rows=24,854,040 width=64) (actual rows= loops=)

44. 0.000 0.000 ↓ 0.0

Seq Scan on message_20190103 (cost=0.00..5,698,193.55 rows=27,134,255 width=64) (actual rows= loops=)

45. 0.000 0.000 ↓ 0.0

Seq Scan on message_20190104 (cost=0.00..5,387,748.45 rows=25,655,945 width=64) (actual rows= loops=)

46. 0.000 0.000 ↓ 0.0

Seq Scan on message_20190105 (cost=0.00..2,396,020.20 rows=11,409,620 width=64) (actual rows= loops=)

47. 0.000 0.000 ↓ 0.0

Seq Scan on message_20190106 (cost=0.00..1,961,595.30 rows=9,340,930 width=64) (actual rows= loops=)

48. 0.000 0.000 ↓ 0.0

Seq Scan on message_20190107 (cost=0.00..5,713,249.50 rows=27,205,950 width=64) (actual rows= loops=)

49. 0.000 0.000 ↓ 0.0

Seq Scan on message_20190108 (cost=0.00..5,755,883.70 rows=27,408,970 width=64) (actual rows= loops=)

50. 0.000 0.000 ↓ 0.0

Seq Scan on message_20190109 (cost=0.00..10.50 rows=50 width=64) (actual rows= loops=)

51. 0.000 0.000 ↓ 0.0

Seq Scan on message_20190110 (cost=0.00..10.50 rows=50 width=64) (actual rows= loops=)

52. 0.000 0.000 ↓ 0.0

Seq Scan on message_20190111 (cost=0.00..10.50 rows=50 width=64) (actual rows= loops=)

53. 0.000 0.000 ↓ 0.0

Seq Scan on message_20190112 (cost=0.00..10.50 rows=50 width=64) (actual rows= loops=)

54. 0.000 0.000 ↓ 0.0

Seq Scan on message_20190113 (cost=0.00..10.50 rows=50 width=64) (actual rows= loops=)

55. 0.000 0.000 ↓ 0.0

Seq Scan on message_20181109 (cost=0.00..5,330,798.52 rows=22,904,952 width=91) (actual rows= loops=)

56. 0.000 0.000 ↓ 0.0

Seq Scan on message_20181110 (cost=0.00..3,066,915.18 rows=13,215,518 width=90) (actual rows= loops=)

57. 0.000 0.000 ↓ 0.0

Seq Scan on message_20181111 (cost=0.00..2,996,878.00 rows=12,994,600 width=92) (actual rows= loops=)

58. 0.000 0.000 ↓ 0.0

Seq Scan on message_20181112 (cost=0.00..6,092,470.08 rows=25,910,808 width=93) (actual rows= loops=)

59. 0.000 0.000 ↓ 0.0

Seq Scan on message_20181113 (cost=0.00..6,386,788.36 rows=27,381,636 width=92) (actual rows= loops=)

60. 0.000 0.000 ↓ 0.0

Seq Scan on message_20181114 (cost=0.00..6,089,659.20 rows=26,042,120 width=92) (actual rows= loops=)

61. 0.000 0.000 ↓ 0.0

Seq Scan on message_20181115 (cost=0.00..6,060,857.66 rows=25,602,466 width=91) (actual rows= loops=)

62. 0.000 0.000 ↓ 0.0

Seq Scan on message_20181116 (cost=0.00..5,735,724.14 rows=23,445,214 width=91) (actual rows= loops=)

63. 0.000 0.000 ↓ 0.0

Seq Scan on message_20181117 (cost=0.00..3,202,855.18 rows=13,783,018 width=91) (actual rows= loops=)

64. 0.000 0.000 ↓ 0.0

Seq Scan on message_20181118 (cost=0.00..2,858,794.32 rows=12,389,332 width=92) (actual rows= loops=)

65. 0.000 0.000 ↓ 0.0

Seq Scan on message_20181119 (cost=0.00..5,692,882.80 rows=24,423,580 width=92) (actual rows= loops=)

66. 0.000 0.000 ↓ 0.0

Seq Scan on message_20181120 (cost=0.00..5,900,374.32 rows=25,085,532 width=91) (actual rows= loops=)

67. 0.000 0.000 ↓ 0.0

Seq Scan on message_20181121 (cost=0.00..5,458,568.20 rows=23,399,320 width=91) (actual rows= loops=)

68. 0.000 0.000 ↓ 0.0

Seq Scan on message_20181122 (cost=0.00..4,072,866.38 rows=17,394,938 width=92) (actual rows= loops=)

69. 0.000 0.000 ↓ 0.0

Seq Scan on message_20181123 (cost=0.00..4,169,313.68 rows=17,841,668 width=93) (actual rows= loops=)

70. 0.000 0.000 ↓ 0.0

Seq Scan on message_20181124 (cost=0.00..3,102,083.01 rows=13,522,101 width=93) (actual rows= loops=)

71. 0.000 0.000 ↓ 0.0

Seq Scan on message_20181125 (cost=0.00..2,441,939.10 rows=10,520,310 width=92) (actual rows= loops=)

72. 0.000 0.000 ↓ 0.0

Hash (cost=18,172.40..18,172.40 rows=198,350 width=52) (actual rows= loops=)

73. 0.000 0.000 ↓ 0.0

Seq Scan on forensics forensics_1 (cost=0.00..18,172.40 rows=198,350 width=52) (actual rows= loops=)

  • Filter: ((recipient IS NULL) AND (created_at > (('now'::cstring)::date - '6 mons'::interval)))
74. 0.000 0.000 ↓ 0.0

Hash Join (cost=18,668.33..12,207,376.32 rows=304,717,700 width=409) (actual rows= loops=)

  • Hash Cond: (new_recipients.id = forensics.id)
75. 0.000 0.000 ↓ 0.0

CTE Scan on new_recipients (cost=0.00..6,094,354.00 rows=304,717,700 width=104) (actual rows= loops=)

76. 0.000 0.000 ↓ 0.0

Hash (cost=16,188.70..16,188.70 rows=198,370 width=313) (actual rows= loops=)

77. 0.000 0.000 ↓ 0.0

Seq Scan on forensics (cost=0.00..16,188.70 rows=198,370 width=313) (actual rows= loops=)