explain.depesz.com

PostgreSQL's explain analyze made readable

Result: h87P

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

Nested Loop Left Join (cost=483,158.50..1,263,362.90 rows=816,189 width=241) (actual rows= loops=)

  • Join Filter: (cd_1.id = cd.id)
2. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=311,790.67..1,042,561.34 rows=816,189 width=1,085) (actual rows= loops=)

  • Hash Cond: (cd.wb_user_id = mpcm.wb_user_inhouse)
3. 0.000 0.000 ↓ 0.0

Hash Join (cost=311,442.28..1,033,024.49 rows=816,189 width=1,081) (actual rows= loops=)

  • Hash Cond: (((sa.data ->> 'sa1_5'::text))::integer = sam.id)
4. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=303,390.90..1,011,047.27 rows=153,622 width=1,399) (actual rows= loops=)

  • Hash Cond: (c.id = c_2.id)
5. 0.000 0.000 ↓ 0.0

Gather (cost=108,068.33..815,321.44 rows=153,622 width=1,399) (actual rows= loops=)

  • Workers Planned: 4
6. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=107,068.33..798,959.24 rows=38,406 width=1,399) (actual rows= loops=)

  • Hash Cond: (cd.wb_user_id = mpcm_1.wb_user_inhouse)
7. 0.000 0.000 ↓ 0.0

Hash Join (cost=99,035.94..784,372.27 rows=38,406 width=1,367) (actual rows= loops=)

  • Hash Cond: (c.pm_id = wu2.id)
8. 0.000 0.000 ↓ 0.0

Hash Join (cost=92,086.83..777,322.32 rows=38,406 width=1,371) (actual rows= loops=)

  • Hash Cond: (c.subject_area_id = sa.id)
9. 0.000 0.000 ↓ 0.0

Hash Join (cost=91,946.95..777,081.37 rows=38,406 width=1,041) (actual rows= loops=)

  • Hash Cond: (cd.wb_user_id = wu.id)
10. 0.000 0.000 ↓ 0.0

Hash Join (cost=75,691.22..756,334.22 rows=43,962 width=143) (actual rows= loops=)

  • Hash Cond: (cd.process_service_mapping_id = psm.id)
11. 0.000 0.000 ↓ 0.0

Nested Loop (cost=71,696.89..751,734.12 rows=44,377 width=115) (actual rows= loops=)

12. 0.000 0.000 ↓ 0.0

Nested Loop (cost=71,696.46..613,084.70 rows=32,255 width=99) (actual rows= loops=)

13. 0.000 0.000 ↓ 0.0

Hash Join (cost=71,696.04..528,365.56 rows=44,060 width=103) (actual rows= loops=)

  • Hash Cond: (s.service_segment = ss.id)
14. 0.000 0.000 ↓ 0.0

Hash Join (cost=71,694.85..528,162.17 rows=50,354 width=86) (actual rows= loops=)

  • Hash Cond: (c.service_id = s.id)
15. 0.000 0.000 ↓ 0.0

Hash Join (cost=71,688.80..528,017.13 rows=51,186 width=54) (actual rows= loops=)

  • Hash Cond: (c.enquiry_id = e.id)
16. 0.000 0.000 ↓ 0.0

Parallel Seq Scan on component c (cost=0.00..449,386.09 rows=53,041 width=54) (actual rows= loops=)

  • Filter: (active AND (type <> 'test'::component_type) AND (pm_id <> 130) AND (component_type = 'job'::component_entity_type) AND (sent_to_client_date > (date_trunc('month'::text, (LOCALTIMESTAMP + '05:30:00'::interval)) - '9 mons'::interval)))
17. 0.000 0.000 ↓ 0.0

Hash (cost=47,467.43..47,467.43 rows=1,476,350 width=8) (actual rows= loops=)

18. 0.000 0.000 ↓ 0.0

Seq Scan on enquiry e (cost=0.00..47,467.43 rows=1,476,350 width=8) (actual rows= loops=)

  • Filter: active
19. 0.000 0.000 ↓ 0.0

Hash (cost=4.54..4.54 rows=121 width=40) (actual rows= loops=)

20. 0.000 0.000 ↓ 0.0

Seq Scan on service s (cost=0.00..4.54 rows=121 width=40) (actual rows= loops=)

  • Filter: (active AND (id <> 2))
21. 0.000 0.000 ↓ 0.0

Hash (cost=1.10..1.10 rows=7 width=25) (actual rows= loops=)

22. 0.000 0.000 ↓ 0.0

Seq Scan on service_segment ss (cost=0.00..1.10 rows=7 width=25) (actual rows= loops=)

  • Filter: (active AND (id <> 5))
23. 0.000 0.000 ↓ 0.0

Index Scan using eos_user_pkey on eos_user eu (cost=0.42..1.92 rows=1 width=4) (actual rows= loops=)

  • Index Cond: (id = e.eos_user_id)
  • Filter: (type <> 'test'::user_type)
24. 0.000 0.000 ↓ 0.0

Index Scan using component_detail_component_id_idx on component_detail cd (cost=0.43..4.27 rows=3 width=20) (actual rows= loops=)

  • Index Cond: (component_id = c.id)
  • Filter: active
25. 0.000 0.000 ↓ 0.0

Hash (cost=3,985.60..3,985.60 rows=698 width=36) (actual rows= loops=)

26. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.29..3,985.60 rows=698 width=36) (actual rows= loops=)

27. 0.000 0.000 ↓ 0.0

Seq Scan on process_service_mapping psm (cost=0.00..27.05 rows=705 width=24) (actual rows= loops=)

  • Filter: active
28. 0.000 0.000 ↓ 0.0

Index Scan using master_pkey on master m (cost=0.29..5.61 rows=1 width=20) (actual rows= loops=)

  • Index Cond: (id = psm.process_id)
  • Filter: active
29. 0.000 0.000 ↓ 0.0

Hash (cost=13,399.99..13,399.99 rows=22,699 width=902) (actual rows= loops=)

30. 0.000 0.000 ↓ 0.0

Seq Scan on wb_user wu (cost=0.00..13,399.99 rows=22,699 width=902) (actual rows= loops=)

31. 0.000 0.000 ↓ 0.0

Hash (cost=119.39..119.39 rows=1,639 width=338) (actual rows= loops=)

32. 0.000 0.000 ↓ 0.0

Seq Scan on subject_area sa (cost=0.00..119.39 rows=1,639 width=338) (actual rows= loops=)

  • Filter: active
33. 0.000 0.000 ↓ 0.0

Hash (cost=6,665.38..6,665.38 rows=22,699 width=4) (actual rows= loops=)

34. 0.000 0.000 ↓ 0.0

Index Only Scan using wb_user_pkey on wb_user wu2 (cost=0.29..6,665.38 rows=22,699 width=4) (actual rows= loops=)

35. 0.000 0.000 ↓ 0.0

Hash (cost=8,015.89..8,015.89 rows=1,320 width=36) (actual rows= loops=)

36. 0.000 0.000 ↓ 0.0

Group (cost=7,989.49..8,002.69 rows=1,320 width=36) (actual rows= loops=)

  • Group Key: m_2.name, m2.name, mpcm_1.wb_user_inhouse
37. 0.000 0.000 ↓ 0.0

Sort (cost=7,989.49..7,992.79 rows=1,320 width=36) (actual rows= loops=)

  • Sort Key: m_2.name, m2.name, mpcm_1.wb_user_inhouse
38. 0.000 0.000 ↓ 0.0

Merge Join (cost=7,897.82..7,921.07 rows=1,320 width=36) (actual rows= loops=)

  • Merge Cond: (m_2.id = mpcm_1.coe_name_master_id)
39. 0.000 0.000 ↓ 0.0

Index Scan using master_pkey on master m_2 (cost=0.29..11,556.20 rows=83,272 width=20) (actual rows= loops=)

  • Filter: active
40. 0.000 0.000 ↓ 0.0

Sort (cost=4,193.07..4,196.40 rows=1,332 width=24) (actual rows= loops=)

  • Sort Key: mpcm_1.coe_name_master_id
41. 0.000 0.000 ↓ 0.0

Merge Join (cost=4,103.33..4,123.94 rows=1,332 width=24) (actual rows= loops=)

  • Merge Cond: (m2.id = mpcm_1.coe_team_name_master_id)
42. 0.000 0.000 ↓ 0.0

Index Scan using master_pkey on master m2 (cost=0.29..11,556.20 rows=83,272 width=20) (actual rows= loops=)

  • Filter: active
43. 0.000 0.000 ↓ 0.0

Sort (cost=395.05..398.41 rows=1,345 width=12) (actual rows= loops=)

  • Sort Key: mpcm_1.coe_team_name_master_id
44. 0.000 0.000 ↓ 0.0

Seq Scan on master_pm_coe_mapping mpcm_1 (cost=0.00..325.15 rows=1,345 width=12) (actual rows= loops=)

  • Filter: active
45. 0.000 0.000 ↓ 0.0

Hash (cost=195,119.71..195,119.71 rows=16,229 width=4) (actual rows= loops=)

46. 0.000 0.000 ↓ 0.0

Group (cost=193,046.65..194,957.42 rows=16,229 width=4) (actual rows= loops=)

  • Group Key: c_2.id
47. 0.000 0.000 ↓ 0.0

Gather Merge (cost=193,046.65..194,918.16 rows=15,705 width=4) (actual rows= loops=)

  • Workers Planned: 3
48. 0.000 0.000 ↓ 0.0

Group (cost=192,046.61..192,072.78 rows=5,235 width=4) (actual rows= loops=)

  • Group Key: c_2.id
49. 0.000 0.000 ↓ 0.0

Sort (cost=192,046.61..192,059.70 rows=5,235 width=4) (actual rows= loops=)

  • Sort Key: c_2.id
50. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.86..191,723.24 rows=5,235 width=4) (actual rows= loops=)

51. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.43..149,493.10 rows=37,236 width=4) (actual rows= loops=)

52. 0.000 0.000 ↓ 0.0

Parallel Seq Scan on client_direct (cost=0.00..12,638.84 rows=44,906 width=4) (actual rows= loops=)

  • Filter: ((NOT is_quality_check) AND active)
53. 0.000 0.000 ↓ 0.0

Index Scan using component_detail_pkey on component_detail cd_2 (cost=0.43..3.05 rows=1 width=8) (actual rows= loops=)

  • Index Cond: (id = client_direct.component_detail_id)
  • Filter: active
54. 0.000 0.000 ↓ 0.0

Index Scan using component_pkey on component c_2 (cost=0.43..1.13 rows=1 width=4) (actual rows= loops=)

  • Index Cond: (id = cd_2.component_id)
  • Filter: (active AND (sent_to_client_date >= (date_trunc('month'::text, (LOCALTIMESTAMP + '05:30:00'::interval)) - '9 mons'::interval)))
55. 0.000 0.000 ↓ 0.0

Hash (cost=8,038.09..8,038.09 rows=1,063 width=20) (actual rows= loops=)

56. 0.000 0.000 ↓ 0.0

Hash Join (cost=7,996.11..8,038.09 rows=1,063 width=20) (actual rows= loops=)

  • Hash Cond: ((m_3.name)::text = (sam.title)::text)
57. 0.000 0.000 ↓ 0.0

Group (cost=7,989.49..7,999.39 rows=1,320 width=32) (actual rows= loops=)

  • Group Key: m_3.name, m3.name
58. 0.000 0.000 ↓ 0.0

Sort (cost=7,989.49..7,992.79 rows=1,320 width=32) (actual rows= loops=)

  • Sort Key: m_3.name, m3.name
59. 0.000 0.000 ↓ 0.0

Merge Join (cost=7,897.82..7,921.07 rows=1,320 width=32) (actual rows= loops=)

  • Merge Cond: (m_3.id = mpcm_2.coe_name_master_id)
60. 0.000 0.000 ↓ 0.0

Index Scan using master_pkey on master m_3 (cost=0.29..11,556.20 rows=83,272 width=20) (actual rows= loops=)

  • Filter: active
61. 0.000 0.000 ↓ 0.0

Sort (cost=4,193.07..4,196.40 rows=1,332 width=20) (actual rows= loops=)

  • Sort Key: mpcm_2.coe_name_master_id
62. 0.000 0.000 ↓ 0.0

Merge Join (cost=4,103.33..4,123.94 rows=1,332 width=20) (actual rows= loops=)

  • Merge Cond: (m3.id = mpcm_2.coe_team_name_master_id)
63. 0.000 0.000 ↓ 0.0

Index Scan using master_pkey on master m3 (cost=0.29..11,556.20 rows=83,272 width=20) (actual rows= loops=)

  • Filter: active
64. 0.000 0.000 ↓ 0.0

Sort (cost=395.05..398.41 rows=1,345 width=8) (actual rows= loops=)

  • Sort Key: mpcm_2.coe_team_name_master_id
65. 0.000 0.000 ↓ 0.0

Seq Scan on master_pm_coe_mapping mpcm_2 (cost=0.00..325.15 rows=1,345 width=8) (actual rows= loops=)

  • Filter: active
66. 0.000 0.000 ↓ 0.0

Hash (cost=4.61..4.61 rows=161 width=27) (actual rows= loops=)

67. 0.000 0.000 ↓ 0.0

Seq Scan on subject_area_mapping sam (cost=0.00..4.61 rows=161 width=27) (actual rows= loops=)

  • Filter: active
68. 0.000 0.000 ↓ 0.0

Hash (cost=342.06..342.06 rows=506 width=8) (actual rows= loops=)

69. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.29..342.06 rows=506 width=8) (actual rows= loops=)

70. 0.000 0.000 ↓ 0.0

Index Scan using master_pkey on master m_1 (cost=0.29..8.31 rows=1 width=4) (actual rows= loops=)

  • Index Cond: (id = 26491)
  • Filter: active
71. 0.000 0.000 ↓ 0.0

Seq Scan on master_pm_coe_mapping mpcm (cost=0.00..328.69 rows=506 width=8) (actual rows= loops=)

  • Filter: (active AND (wb_user_role_master_id = 26491))
72. 0.000 0.000 ↓ 0.0

Materialize (cost=171,367.83..202,437.31 rows=1 width=30) (actual rows= loops=)

73. 0.000 0.000 ↓ 0.0

Nested Loop (cost=171,367.83..202,437.31 rows=1 width=30) (actual rows= loops=)

74. 0.000 0.000 ↓ 0.0

Gather (cost=171,367.40..202,435.09 rows=1 width=38) (actual rows= loops=)

  • Workers Planned: 3
75. 0.000 0.000 ↓ 0.0

Hash Join (cost=170,367.40..201,434.99 rows=1 width=38) (actual rows= loops=)

  • Hash Cond: ((direct.component_id = cd_1.component_id) AND (direct.component_detail_id = cd_1.id) AND (direct.wb_user_id = cd_1.wb_user_id))
76. 0.000 0.000 ↓ 0.0

Parallel Seq Scan on client_direct direct (cost=0.00..12,638.84 rows=235,523 width=38) (actual rows= loops=)

  • Filter: active
77. 0.000 0.000 ↓ 0.0

Hash (cost=111,273.34..111,273.34 rows=2,640,118 width=12) (actual rows= loops=)

78. 0.000 0.000 ↓ 0.0

Seq Scan on component_detail cd_1 (cost=0.00..111,273.34 rows=2,640,118 width=12) (actual rows= loops=)

  • Filter: active
79. 0.000 0.000 ↓ 0.0

Index Scan using component_pkey on component c_1 (cost=0.43..2.21 rows=1 width=4) (actual rows= loops=)

  • Index Cond: (id = cd_1.component_id)
  • Filter: (active AND (sent_to_client_date >= (date_trunc('month'::text, (LOCALTIMESTAMP + '05:30:00'::interval)) - '9 mons'::interval)))