explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 751W : Optimization for: plan #3WRi

Settings

Optimization path:

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

Gather Motion 25:1 (slice24; segments: 25) (cost=2,208,299.55..2,208,300.68 rows=30 width=336) (actual rows= loops=)

2. 0.000 0.000 ↓ 0.0

HashAggregate (cost=2,208,299.55..2,208,300.68 rows=2 width=336) (actual rows= loops=)

  • Group By: paragone.org_id
3. 0.000 0.000 ↓ 0.0

Redistribute Motion 25:25 (slice23; segments: 25) (cost=2,208,297.75..2,208,298.35 rows=2 width=336) (actual rows= loops=)

  • Hash Key: paragone.org_id
4. 0.000 0.000 ↓ 0.0

HashAggregate (cost=2,208,297.75..2,208,297.75 rows=2 width=336) (actual rows= loops=)

  • Group By: "?column1?
5. 0.000 0.000 ↓ 0.0

Append (cost=31,962.27..2,208,296.55 rows=2 width=60) (actual rows= loops=)

6. 0.000 0.000 ↓ 0.0

Subquery Scan "*SELECT* 1" (cost=31,962.27..31,962.30 rows=1 width=56) (actual rows= loops=)

7. 0.000 0.000 ↓ 0.0

HashAggregate (cost=31,962.27..31,962.29 rows=1 width=56) (actual rows= loops=)

  • Group By: rsccallplan.org_id
8. 0.000 0.000 ↓ 0.0

Redistribute Motion 25:25 (slice3; segments: 25) (cost=31,962.24..31,962.26 rows=1 width=16) (actual rows= loops=)

  • Hash Key: rsccallplan.org_id
9. 0.000 0.000 ↓ 0.0

HashAggregate (cost=31,962.24..31,962.24 rows=1 width=16) (actual rows= loops=)

  • Group By: rsccallplan.org_id
10. 0.000 0.000 ↓ 0.0

Nested Loop (cost=9,412.09..31,962.20 rows=1 width=16) (actual rows= loops=)

  • Join Filter: employee.position_id = "position".id
11. 0.000 0.000 ↓ 0.0

Broadcast Motion 25:25 (slice2; segments: 25) (cost=9,165.44..25,597.99 rows=59 width=20) (actual rows= loops=)

12. 0.000 0.000 ↓ 0.0

Hash Join (cost=9,165.44..25,582.88 rows=3 width=20) (actual rows= loops=)

  • Hash Cond: rsccallplan.creator_id = employee.id
13. 0.000 0.000 ↓ 0.0

Redistribute Motion 25:25 (slice1; segments: 25) (cost=0.00..16,416.57 rows=3 width=24) (actual rows= loops=)

  • Hash Key: rsccallplan.creator_id
14. 0.000 0.000 ↓ 0.0

Seq Scan on rsc_callplan rsccallplan (cost=0.00..16,415.41 rows=3 width=24) (actual rows= loops=)

  • Filter: deleteflag = 0 AND substr(calltime::text, 1, 8) = '20190813'::text AND status = 0
15. 0.000 0.000 ↓ 0.0

Hash (cost=8,843.53..8,843.53 rows=1,031 width=12) (actual rows= loops=)

16. 0.000 0.000 ↓ 0.0

Seq Scan on portal_employee employee (cost=0.00..8,843.53 rows=1,031 width=12) (actual rows= loops=)

17. 0.000 0.000 ↓ 0.0

Materialize (cost=246.65..248.52 rows=8 width=8) (actual rows= loops=)

18. 0.000 0.000 ↓ 0.0

Seq Scan on portal_position "position" (cost=0.00..246.46 rows=8 width=8) (actual rows= loops=)

  • Filter: position_channel::text = 'A0000603'::text
19. 0.000 0.000 ↓ 0.0

Subquery Scan "*SELECT* 2" (cost=399,215.85..399,215.87 rows=1 width=60) (actual rows= loops=)

20. 0.000 0.000 ↓ 0.0

HashAggregate (cost=399,215.85..399,215.86 rows=1 width=60) (actual rows= loops=)

  • Group By: rscintention.org_id
21. 0.000 0.000 ↓ 0.0

Redistribute Motion 25:25 (slice6; segments: 25) (cost=399,215.81..399,215.83 rows=1 width=24) (actual rows= loops=)

  • Hash Key: rscintention.org_id
22. 0.000 0.000 ↓ 0.0

HashAggregate (cost=399,215.81..399,215.81 rows=1 width=24) (actual rows= loops=)

  • Group By: rscintention.org_id
23. 0.000 0.000 ↓ 0.0

Nested Loop (cost=9,465.27..399,215.35 rows=3 width=20) (actual rows= loops=)

  • Join Filter: employee.position_id = "position".id
24. 0.000 0.000 ↓ 0.0

Hash Join (cost=9,165.44..68,020.56 rows=126 width=24) (actual rows= loops=)

  • Hash Cond: rscintention.creator_id = employee.id
25. 0.000 0.000 ↓ 0.0

Redistribute Motion 25:25 (slice4; segments: 25) (cost=0.00..58,807.99 rows=126 width=28) (actual rows= loops=)

  • Hash Key: rscintention.creator_id
26. 0.000 0.000 ↓ 0.0

Seq Scan on rsc_intention rscintention (cost=0.00..58,745.15 rows=126 width=28) (actual rows= loops=)

  • Filter: deleteflag = 0 AND track_status = 0
27. 0.000 0.000 ↓ 0.0

Hash (cost=8,843.53..8,843.53 rows=1,031 width=12) (actual rows= loops=)

28. 0.000 0.000 ↓ 0.0

Seq Scan on portal_employee employee (cost=0.00..8,843.53 rows=1,031 width=12) (actual rows= loops=)

29. 0.000 0.000 ↓ 0.0

Materialize (cost=299.82..346.63 rows=188 width=8) (actual rows= loops=)

30. 0.000 0.000 ↓ 0.0

Broadcast Motion 25:25 (slice5; segments: 25) (cost=0.00..295.14 rows=188 width=8) (actual rows= loops=)

31. 0.000 0.000 ↓ 0.0

Seq Scan on portal_position "position" (cost=0.00..246.46 rows=8 width=8) (actual rows= loops=)

  • Filter: position_channel::text = 'A0000603'::text
32. 0.000 0.000 ↓ 0.0

Subquery Scan "*SELECT* 3" (cost=219,470.33..219,470.35 rows=1 width=52) (actual rows= loops=)

33. 0.000 0.000 ↓ 0.0

HashAggregate (cost=219,470.33..219,470.34 rows=1 width=52) (actual rows= loops=)

  • Group By: rscsatisfy.org_id
34. 0.000 0.000 ↓ 0.0

Redistribute Motion 25:25 (slice9; segments: 25) (cost=219,470.29..219,470.31 rows=1 width=12) (actual rows= loops=)

  • Hash Key: rscsatisfy.org_id
35. 0.000 0.000 ↓ 0.0

HashAggregate (cost=219,470.29..219,470.29 rows=1 width=12) (actual rows= loops=)

  • Group By: rscsatisfy.org_id
36. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.00..219,470.25 rows=1 width=8) (actual rows= loops=)

37. 0.000 0.000 ↓ 0.0

Broadcast Motion 25:25 (slice8; segments: 25) (cost=0.00..218,499.87 rows=39 width=12) (actual rows= loops=)

38. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.00..218,489.98 rows=2 width=12) (actual rows= loops=)

39. 0.000 0.000 ↓ 0.0

Broadcast Motion 25:25 (slice7; segments: 25) (cost=0.00..30,122.17 rows=39 width=12) (actual rows= loops=)

40. 0.000 0.000 ↓ 0.0

Seq Scan on rsc_satisfy_survey rscsatisfy (cost=0.00..30,112.28 rows=2 width=12) (actual rows= loops=)

  • Filter: deleteflag = 0 AND input_time::text >= '20190801000000'::text AND input_time::text <= '20190813235959'::text AND visit_status = 1
41. 0.000 0.000 ↓ 0.0

Index Scan using portal_employee_pkey on portal_employee employee (cost=0.00..197.95 rows=1 width=12) (actual rows= loops=)

  • Index Cond: rscsatisfy.creator_id = employee.id
42. 0.000 0.000 ↓ 0.0

Index Scan using portal_position_pkey on portal_position "position" (cost=0.00..1.01 rows=1 width=8) (actual rows= loops=)

  • Index Cond: employee.position_id = "position".id
  • Filter: position_channel::text = 'A0000603'::text
43. 0.000 0.000 ↓ 0.0

Subquery Scan "*SELECT* 4" (cost=309,963.25..309,963.52 rows=1 width=68) (actual rows= loops=)

44. 0.000 0.000 ↓ 0.0

HashAggregate (cost=309,963.25..309,963.43 rows=1 width=68) (actual rows= loops=)

  • Group By: rsccustomer.org_id
45. 0.000 0.000 ↓ 0.0

Redistribute Motion 25:25 (slice13; segments: 25) (cost=309,962.78..309,963.05 rows=1 width=40) (actual rows= loops=)

  • Hash Key: rsccustomer.org_id
46. 0.000 0.000 ↓ 0.0

HashAggregate (cost=309,962.78..309,962.87 rows=1 width=40) (actual rows= loops=)

  • Group By: rsccustomer.org_id
47. 0.000 0.000 ↓ 0.0

Nested Loop (cost=13,282.14..309,962.66 rows=1 width=20) (actual rows= loops=)

  • Join Filter: employee.position_id = "position".id
48. 0.000 0.000 ↓ 0.0

Hash Join (cost=12,982.31..259,008.96 rows=20 width=24) (actual rows= loops=)

  • Hash Cond: rsccustomer.creator_id = employee.id
49. 0.000 0.000 ↓ 0.0

Redistribute Motion 25:25 (slice11; segments: 25) (cost=3,816.87..249,836.30 rows=20 width=28) (actual rows= loops=)

  • Hash Key: rsccustomer.creator_id
50. 0.000 0.000 ↓ 0.0

Hash Join (cost=3,816.87..249,826.68 rows=20 width=28) (actual rows= loops=)

  • Hash Cond: rscejob.customer_id = rsccustomer.customer_id
51. 0.000 0.000 ↓ 0.0

Broadcast Motion 25:25 (slice10; segments: 25) (cost=0.00..245,893.83 rows=1,298 width=20) (actual rows= loops=)

52. 0.000 0.000 ↓ 0.0

Seq Scan on rsc_ejob rscejob (cost=0.00..245,556.40 rows=52 width=20) (actual rows= loops=)

  • Filter: deleteflag = 0 AND status = 0
53. 0.000 0.000 ↓ 0.0

Hash (cost=3,263.80..3,263.80 rows=1,770 width=24) (actual rows= loops=)

54. 0.000 0.000 ↓ 0.0

Seq Scan on rsc_customer rsccustomer (cost=0.00..3,263.80 rows=1,770 width=24) (actual rows= loops=)

  • Filter: valid_status = 1 AND service_version = 1
55. 0.000 0.000 ↓ 0.0

Hash (cost=8,843.53..8,843.53 rows=1,031 width=12) (actual rows= loops=)

56. 0.000 0.000 ↓ 0.0

Seq Scan on portal_employee employee (cost=0.00..8,843.53 rows=1,031 width=12) (actual rows= loops=)

57. 0.000 0.000 ↓ 0.0

Materialize (cost=299.82..346.63 rows=188 width=8) (actual rows= loops=)

58. 0.000 0.000 ↓ 0.0

Broadcast Motion 25:25 (slice12; segments: 25) (cost=0.00..295.14 rows=188 width=8) (actual rows= loops=)

59. 0.000 0.000 ↓ 0.0

Seq Scan on portal_position "position" (cost=0.00..246.46 rows=8 width=8) (actual rows= loops=)

  • Filter: position_channel::text = 'A0000603'::text
60. 0.000 0.000 ↓ 0.0

Subquery Scan "*SELECT* 5" (cost=398,327.07..398,327.46 rows=1 width=56) (actual rows= loops=)

61. 0.000 0.000 ↓ 0.0

HashAggregate (cost=398,327.07..398,327.29 rows=1 width=56) (actual rows= loops=)

  • Group By: rsccustomer.org_id
62. 0.000 0.000 ↓ 0.0

Redistribute Motion 25:25 (slice18; segments: 25) (cost=398,326.48..398,326.82 rows=1 width=16) (actual rows= loops=)

  • Hash Key: rsccustomer.org_id
63. 0.000 0.000 ↓ 0.0

HashAggregate (cost=398,326.48..398,326.48 rows=1 width=16) (actual rows= loops=)

  • Group By: rsccustomer.org_id
64. 0.000 0.000 ↓ 0.0

Hash Left Anti Semi Join (Not-In) (cost=101,645.67..398,326.39 rows=1 width=16) (actual rows= loops=)

  • Hash Cond: rscejob.id = "NotIn_SUBQUERY".rsc_ejob_id
65. 0.000 0.000 ↓ 0.0

Nested Loop (cost=13,282.14..309,962.66 rows=1 width=16) (actual rows= loops=)

  • Join Filter: employee.position_id = "position".id
66. 0.000 0.000 ↓ 0.0

Hash Join (cost=12,982.31..259,008.96 rows=20 width=20) (actual rows= loops=)

  • Hash Cond: rsccustomer.creator_id = employee.id
67. 0.000 0.000 ↓ 0.0

Redistribute Motion 25:25 (slice15; segments: 25) (cost=3,816.87..249,836.30 rows=20 width=24) (actual rows= loops=)

  • Hash Key: rsccustomer.creator_id
68. 0.000 0.000 ↓ 0.0

Hash Join (cost=3,816.87..249,826.68 rows=20 width=24) (actual rows= loops=)

  • Hash Cond: rscejob.customer_id = rsccustomer.customer_id
69. 0.000 0.000 ↓ 0.0

Broadcast Motion 25:25 (slice14; segments: 25) (cost=0.00..245,893.83 rows=1,298 width=16) (actual rows= loops=)

70. 0.000 0.000 ↓ 0.0

Seq Scan on rsc_ejob rscejob (cost=0.00..245,556.40 rows=52 width=16) (actual rows= loops=)

  • Filter: deleteflag = 0 AND id IS NOT NULL AND status = 0
71. 0.000 0.000 ↓ 0.0

Hash (cost=3,263.80..3,263.80 rows=1,770 width=24) (actual rows= loops=)

72. 0.000 0.000 ↓ 0.0

Seq Scan on rsc_customer rsccustomer (cost=0.00..3,263.80 rows=1,770 width=24) (actual rows= loops=)

  • Filter: valid_status = 1 AND service_version = 1
73. 0.000 0.000 ↓ 0.0

Hash (cost=8,843.53..8,843.53 rows=1,031 width=12) (actual rows= loops=)

74. 0.000 0.000 ↓ 0.0

Seq Scan on portal_employee employee (cost=0.00..8,843.53 rows=1,031 width=12) (actual rows= loops=)

75. 0.000 0.000 ↓ 0.0

Materialize (cost=299.82..346.63 rows=188 width=8) (actual rows= loops=)

76. 0.000 0.000 ↓ 0.0

Broadcast Motion 25:25 (slice16; segments: 25) (cost=0.00..295.14 rows=188 width=8) (actual rows= loops=)

77. 0.000 0.000 ↓ 0.0

Seq Scan on portal_position "position" (cost=0.00..246.46 rows=8 width=8) (actual rows= loops=)

  • Filter: position_channel::text = 'A0000603'::text
78. 0.000 0.000 ↓ 0.0

Hash (cost=42,285.72..42,285.72 rows=147,449 width=8) (actual rows= loops=)

79. 0.000 0.000 ↓ 0.0

Broadcast Motion 25:25 (slice17; segments: 25) (cost=0.00..42,285.72 rows=147,449 width=8) (actual rows= loops=)

80. 0.000 0.000 ↓ 0.0

Subquery Scan "NotIn_SUBQUERY" (cost=0.00..3,948.98 rows=5,898 width=8) (actual rows= loops=)

81. 0.000 0.000 ↓ 0.0

Seq Scan on rsc_ejob_label ejoblabel (cost=0.00..2,474.49 rows=5,898 width=8) (actual rows= loops=)

82. 0.000 0.000 ↓ 0.0

Subquery Scan "*SELECT* 6" (cost=849,357.04..849,357.06 rows=1 width=56) (actual rows= loops=)

83. 0.000 0.000 ↓ 0.0

HashAggregate (cost=849,357.04..849,357.05 rows=1 width=56) (actual rows= loops=)

  • Group By: ejobcandidate.org_id
84. 0.000 0.000 ↓ 0.0

Redistribute Motion 25:25 (slice22; segments: 25) (cost=849,357.00..849,357.02 rows=1 width=16) (actual rows= loops=)

  • Hash Key: ejobcandidate.org_id
85. 0.000 0.000 ↓ 0.0

HashAggregate (cost=849,357.00..849,357.00 rows=1 width=16) (actual rows= loops=)

  • Group By: ejobcandidate.org_id
86. 0.000 0.000 ↓ 0.0

Nested Loop (cost=109,664.24..849,356.53 rows=4 width=16) (actual rows= loops=)

  • Join Filter: employee.position_id = "position".id
87. 0.000 0.000 ↓ 0.0

Hash Join (cost=109,364.41..344,723.67 rows=192 width=20) (actual rows= loops=)

  • Hash Cond: ejobcandidate.creator_id = employee.id
88. 0.000 0.000 ↓ 0.0

Redistribute Motion 25:25 (slice20; segments: 25) (cost=100,198.97..335,486.40 rows=192 width=24) (actual rows= loops=)

  • Hash Key: ejobcandidate.creator_id
89. 0.000 0.000 ↓ 0.0

Hash Join (cost=100,198.97..335,390.62 rows=192 width=24) (actual rows= loops=)

  • Hash Cond: rscejob.id = ejobcandidate.rsc_ejob_id
90. 0.000 0.000 ↓ 0.0

Seq Scan on rsc_ejob rscejob (cost=0.00..231,272.37 rows=61,751 width=8) (actual rows= loops=)

  • Filter: kind = ANY ('{1,8,9}'::integer[])
91. 0.000 0.000 ↓ 0.0

Hash (cost=99,755.89..99,755.89 rows=1,418 width=32) (actual rows= loops=)

92. 0.000 0.000 ↓ 0.0

Redistribute Motion 25:25 (slice19; segments: 25) (cost=0.00..99,755.89 rows=1,418 width=32) (actual rows= loops=)

  • Hash Key: ejobcandidate.rsc_ejob_id
93. 0.000 0.000 ↓ 0.0

Seq Scan on rsc_ejob_candidate ejobcandidate (cost=0.00..99,046.95 rows=1,418 width=32) (actual rows= loops=)

  • Filter: deleteflag = 0 AND createtime::text >= '20190715000000'::text AND createtime::text <= '20190813235959'::text
94. 0.000 0.000 ↓ 0.0

Hash (cost=8,843.53..8,843.53 rows=1,031 width=12) (actual rows= loops=)

95. 0.000 0.000 ↓ 0.0

Seq Scan on portal_employee employee (cost=0.00..8,843.53 rows=1,031 width=12) (actual rows= loops=)

96. 0.000 0.000 ↓ 0.0

Materialize (cost=299.82..346.63 rows=188 width=8) (actual rows= loops=)

97. 0.000 0.000 ↓ 0.0

Broadcast Motion 25:25 (slice21; segments: 25) (cost=0.00..295.14 rows=188 width=8) (actual rows= loops=)

98. 0.000 0.000 ↓ 0.0

Seq Scan on portal_position "position" (cost=0.00..246.46 rows=8 width=8) (actual rows= loops=)

  • Filter: position_channel::text = 'A0000603'::text