explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 4tD

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

Limit (cost=210,421.81..210,568.09 rows=10 width=241) (actual rows= loops=)

2. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=210,421.81..12,149,555.69 rows=816,189 width=241) (actual rows= loops=)

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

Nested Loop Left Join (cost=210,073.42..12,133,897.42 rows=816,189 width=1,103) (actual rows= loops=)

4. 0.000 0.000 ↓ 0.0

Nested Loop (cost=210,072.14..7,304,626.22 rows=816,189 width=1,081) (actual rows= loops=)

  • Join Filter: ((sam.title)::text = (subquery_sa.coe)::text)
5. 0.000 0.000 ↓ 0.0

Nested Loop (cost=202,082.65..4,848,043.33 rows=123,665 width=1,088) (actual rows= loops=)

6. 0.000 0.000 ↓ 0.0

Nested Loop (cost=202,082.36..4,720,195.84 rows=123,665 width=1,092) (actual rows= loops=)

7. 0.000 0.000 ↓ 0.0

Nested Loop (cost=202,082.08..4,494,750.23 rows=141,558 width=194) (actual rows= loops=)

8. 0.000 0.000 ↓ 0.0

Nested Loop (cost=202,081.92..4,462,735.77 rows=175,849 width=505) (actual rows= loops=)

9. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=202,081.65..4,237,515.59 rows=175,849 width=175) (actual rows= loops=)

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

Merge Left Join (cost=194,049.26..4,199,471.86 rows=175,849 width=143) (actual rows= loops=)

  • Merge Cond: (c.id = c_2.id)
11. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1,002.61..4,003,857.08 rows=175,849 width=143) (actual rows= loops=)

12. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1,002.32..3,007,172.21 rows=177,507 width=131) (actual rows= loops=)

13. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1,002.04..2,848,897.20 rows=177,507 width=115) (actual rows= loops=)

14. 0.000 0.000 ↓ 0.0

Gather Merge (cost=1,001.61..2,294,303.80 rows=129,019 width=99) (actual rows= loops=)

  • Workers Planned: 4
15. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1.55..2,277,936.34 rows=32,255 width=99) (actual rows= loops=)

16. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1.13..2,193,217.20 rows=44,060 width=103) (actual rows= loops=)

17. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.70..2,091,098.05 rows=45,656 width=103) (actual rows= loops=)

18. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.57..2,078,532.86 rows=52,178 width=86) (actual rows= loops=)

19. 0.000 0.000 ↓ 0.0

Parallel Index Scan using component_pkey on component c (cost=0.43..2,069,917.14 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)))
20. 0.000 0.000 ↓ 0.0

Index Scan using service_pkey on service s (cost=0.14..0.16 rows=1 width=40) (actual rows= loops=)

  • Index Cond: (id = c.service_id)
  • Filter: (active AND (id <> 2))
21. 0.000 0.000 ↓ 0.0

Index Scan using service_segment_pkey on service_segment ss (cost=0.13..0.25 rows=1 width=25) (actual rows= loops=)

  • Index Cond: (id = s.service_segment)
  • Filter: (active AND (id <> 5))
22. 0.000 0.000 ↓ 0.0

Index Scan using enquiry_pkey on enquiry e (cost=0.43..2.24 rows=1 width=8) (actual rows= loops=)

  • Index Cond: (id = c.enquiry_id)
  • Filter: active
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

Index Scan using process_service_mapping_pkey on process_service_mapping psm (cost=0.28..0.89 rows=1 width=24) (actual rows= loops=)

  • Index Cond: (id = cd.process_service_mapping_id)
  • Filter: active
26. 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
27. 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
28. 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
29. 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
30. 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
31. 0.000 0.000 ↓ 0.0

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

32. 0.000 0.000 ↓ 0.0

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

33. 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)
34. 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
35. 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)))
36. 0.000 0.000 ↓ 0.0

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

37. 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
38. 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
39. 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)
40. 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
41. 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
42. 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)
43. 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
44. 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
45. 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
46. 0.000 0.000 ↓ 0.0

Index Scan using subject_area_pkey on subject_area sa (cost=0.28..1.28 rows=1 width=338) (actual rows= loops=)

  • Index Cond: (id = c.subject_area_id)
  • Filter: active
47. 0.000 0.000 ↓ 0.0

Index Scan using subject_area_mapping_pkey on subject_area_mapping sam (cost=0.15..0.18 rows=1 width=27) (actual rows= loops=)

  • Index Cond: (id = ((sa.data ->> 'sa1_5'::text))::integer)
  • Filter: active
48. 0.000 0.000 ↓ 0.0

Index Scan using wb_user_pkey on wb_user wu (cost=0.29..1.59 rows=1 width=902) (actual rows= loops=)

  • Index Cond: (id = cd.wb_user_id)
49. 0.000 0.000 ↓ 0.0

Index Only Scan using wb_user_pkey on wb_user wu2 (cost=0.29..1.03 rows=1 width=4) (actual rows= loops=)

  • Index Cond: (id = c.pm_id)
50. 0.000 0.000 ↓ 0.0

Materialize (cost=7,989.49..8,019.19 rows=1,320 width=32) (actual rows= loops=)

51. 0.000 0.000 ↓ 0.0

Subquery Scan on subquery_sa (cost=7,989.49..8,012.59 rows=1,320 width=32) (actual rows= loops=)

52. 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
53. 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
54. 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)
55. 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
56. 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
57. 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)
58. 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
59. 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
60. 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
61. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1.28..5.91 rows=1 width=30) (actual rows= loops=)

62. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.86..4.13 rows=1 width=16) (actual rows= loops=)

63. 0.000 0.000 ↓ 0.0

Index Scan using component_detail_pkey on component_detail cd_1 (cost=0.43..1.92 rows=1 width=12) (actual rows= loops=)

  • Index Cond: (id = cd.id)
  • Filter: active
64. 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)))
65. 0.000 0.000 ↓ 0.0

Index Scan using client_direct_component_idx on client_direct direct (cost=0.42..1.77 rows=1 width=38) (actual rows= loops=)

  • Index Cond: (component_id = cd_1.component_id)
  • Filter: (active AND (cd_1.id = component_detail_id) AND (cd_1.wb_user_id = wb_user_id))
66. 0.000 0.000 ↓ 0.0

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

67. 0.000 0.000 ↓ 0.0

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

68. 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
69. 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))