explain.depesz.com

PostgreSQL's explain analyze made readable

Result: TV2w

Settings
# exclusive inclusive rows x rows loops node
1. 475.525 7,027.797 ↓ 7.4 2,362 1

Result (cost=1,142,892.57..1,154,009.72 rows=319 width=903) (actual time=6,529.914..7,027.797 rows=2,362 loops=1)

2.          

Initplan (for Result)

3. 0.271 3.741 ↓ 1,181.0 2,362 1

Unique (cost=709.06..709.07 rows=2 width=4) (actual time=3.370..3.741 rows=2,362 loops=1)

4.          

CTE user_data_filter

5. 0.170 0.170 ↑ 6.8 21 1

Index Scan using idx_user_data_access_user_id on user_data_access (cost=0.43..81.98 rows=143 width=23) (actual time=0.050..0.170 rows=21 loops=1)

  • Index Cond: (user_id = 2,159,767)
  • Filter: (NOT deleted)
6. 0.683 3.470 ↓ 1,181.0 2,362 1

Sort (cost=627.08..627.08 rows=2 width=4) (actual time=3.370..3.470 rows=2,362 loops=1)

  • Sort Key: edl.entity_id
  • Sort Method: quicksort Memory: 207kB
7. 0.144 2.787 ↓ 1,181.0 2,362 1

Append (cost=0.43..627.07 rows=2 width=4) (actual time=0.097..2.787 rows=2,362 loops=1)

8. 0.193 2.640 ↓ 2,362.0 2,362 1

Nested Loop (cost=0.43..194.38 rows=1 width=4) (actual time=0.097..2.640 rows=2,362 loops=1)

9. 0.179 0.179 ↑ 3.4 21 1

CTE Scan on user_data_filter da (cost=0.00..2.86 rows=72 width=8) (actual time=0.052..0.179 rows=21 loops=1)

  • Filter: self_access
10. 2.268 2.268 ↓ 112.0 112 21

Index Scan using idx_entity_data_link_entity_type_id_ancestor_type_id_ancestor_i on entity_data_link edl (cost=0.43..2.65 rows=1 width=12) (actual time=0.004..0.108 rows=112 loops=21)

  • Index Cond: ((entity_type_id = 18) AND (ancestor_type_id = da.entity_type_id) AND (ancestor_id = da.entity_id))
  • Filter: (NOT deleted)
  • Rows Removed by Filter: 1
11. 0.000 0.003 ↓ 0.0 0 1

Nested Loop (cost=0.85..432.66 rows=1 width=4) (actual time=0.003..0.003 rows=0 loops=1)

  • Join Filter: (edc.ancestor_type_id = ANY (da_1.access_type_ids))
12. 0.001 0.003 ↓ 0.0 0 1

Nested Loop (cost=0.43..426.43 rows=12 width=40) (actual time=0.003..0.003 rows=0 loops=1)

13. 0.002 0.002 ↓ 0.0 0 1

CTE Scan on user_data_filter da_1 (cost=0.00..2.86 rows=72 width=40) (actual time=0.002..0.002 rows=0 loops=1)

  • Filter: (NOT self_access)
  • Rows Removed by Filter: 21
14. 0.000 0.000 ↓ 0.0 0

Index Scan using idx_entity_data_link_ancestor_type_id_ancestor_id on entity_data_link edl_1 (cost=0.43..5.87 rows=1 width=16) (never executed)

  • Index Cond: ((ancestor_type_id = da_1.entity_type_id) AND (ancestor_id = da_1.entity_id))
  • Filter: (parent AND (NOT deleted))
15. 0.000 0.000 ↓ 0.0 0

Index Scan using idx_entity_data_link_entity_type_id_ancestor_type_id_ancestor_i on entity_data_link edc (cost=0.43..0.50 rows=1 width=12) (never executed)

  • Index Cond: ((entity_type_id = 18) AND (ancestor_type_id = edl_1.entity_type_id) AND (ancestor_id = edl_1.entity_id))
  • Filter: (NOT deleted)
16. 91.726 6,546.050 ↓ 7.4 2,362 1

Sort (cost=1,142,183.51..1,142,184.30 rows=319 width=811) (actual time=6,528.278..6,546.050 rows=2,362 loops=1)

  • Sort Key: action.status_id
  • Sort Method: external merge Disk: 54,672kB
17. 16.056 6,454.324 ↓ 7.4 2,362 1

Group (cost=1,141,907.06..1,142,170.24 rows=319 width=811) (actual time=6,423.567..6,454.324 rows=2,362 loops=1)

  • Group Key: action.id, r.id, c.id, lcat.name, cy.short_name, (change_tz(action.approveal_date, 'UTC'::character varying, tz.time_zone)), (change_tz(action.rejection_date, 'UTC'::character varying, tz.time_zone)), (change_tz(action.submission_date, 'UTC'::character varying, tz.time_zone)), v.status, tz.id, pt.id, res.id, rcl.id, gbc.id, gb.id, tier.name, (array_to_string(array_agg(DISTINCT rg1.name), ', '::text)), (array_to_string(array_agg(DISTINCT rg2.name), ', '::text)), (array_to_string(array_agg(DISTINCT dc1.name), ', '::text)), (array_to_string(array_agg(DISTINCT dc2.name), ', '::text)), v.name, ets.description, et.id, (array_to_string(array_agg(DISTINCT dc.name), ', '::text)), (array_to_string(array_agg(DISTINCT ct.name), ', '::text)), (array_to_string(array_agg(DISTINCT cst.name), ', '::text))
18. 83.790 6,438.268 ↓ 7.4 2,362 1

Sort (cost=1,141,907.06..1,141,907.86 rows=319 width=832) (actual time=6,423.554..6,438.268 rows=2,362 loops=1)

  • Sort Key: action.id, r.id, c.id, lcat.name, cy.short_name, (change_tz(action.approveal_date, 'UTC'::character varying, tz.time_zone)), (change_tz(action.rejection_date, 'UTC'::character varying, tz.time_zone)), (change_tz(action.submission_date, 'UTC'::character varying, tz.time_zone)), v.status, tz.id, pt.id, res.id, rcl.id, gbc.id, gb.id, tier.name, (array_to_string(array_agg(DISTINCT rg1.name), ', '::text)), (array_to_string(array_agg(DISTINCT rg2.name), ', '::text)), (array_to_string(array_agg(DISTINCT dc1.name), ', '::text)), (array_to_string(array_agg(DISTINCT dc2.name), ', '::text)), v.name, ets.description, et.id, (array_to_string(array_agg(DISTINCT dc.name), ', '::text)), (array_to_string(array_agg(DISTINCT ct.name), ', '::text)), (array_to_string(array_agg(DISTINCT cst.name), ', '::text))
  • Sort Method: external merge Disk: 54,696kB
19. 57.711 6,354.478 ↓ 7.4 2,362 1

Merge Left Join (cost=1,116,590.17..1,141,893.80 rows=319 width=832) (actual time=2,964.259..6,354.478 rows=2,362 loops=1)

  • Merge Cond: (action.id = ledc_1.entity_id)
20. 1.895 6,265.728 ↓ 8.7 2,362 1

Nested Loop Left Join (cost=1,103,249.91..1,127,930.48 rows=271 width=800) (actual time=2,941.472..6,265.728 rows=2,362 loops=1)

21. 2.354 6,263.833 ↓ 8.7 2,362 1

Nested Loop Left Join (cost=1,103,249.63..1,127,846.66 rows=271 width=777) (actual time=2,941.468..6,263.833 rows=2,362 loops=1)

22. 2.410 6,256.755 ↓ 8.7 2,362 1

Nested Loop Left Join (cost=1,103,249.34..1,127,166.45 rows=271 width=747) (actual time=2,941.448..6,256.755 rows=2,362 loops=1)

23. 16.780 6,254.345 ↓ 8.7 2,362 1

Nested Loop Left Join (cost=1,103,249.05..1,126,487.59 rows=271 width=717) (actual time=2,941.443..6,254.345 rows=2,362 loops=1)

  • Join Filter: (action.tier_id = tier.id)
  • Rows Removed by Join Filter: 232,373
24. 2.456 6,228.117 ↓ 8.7 2,362 1

Merge Left Join (cost=1,103,248.90..1,125,876.66 rows=271 width=715) (actual time=2,941.382..6,228.117 rows=2,362 loops=1)

  • Merge Cond: (action.id = ledc.entity_id)
25. 1.989 4,799.264 ↓ 42.2 2,362 1

Merge Left Join (cost=856,464.66..872,183.86 rows=56 width=651) (actual time=2,095.084..4,799.264 rows=2,362 loops=1)

  • Merge Cond: (action.id = ller.entity_id)
26. 6.613 4,753.922 ↓ 67.5 2,362 1

Nested Loop Left Join (cost=844,748.05..859,894.49 rows=35 width=587) (actual time=2,069.228..4,753.922 rows=2,362 loops=1)

  • Join Filter: ((lcat.client_id = action.client_id) AND (action.type_id = lcat.type_id))
  • Rows Removed by Join Filter: 87,209
27. 1.889 4,742.585 ↓ 67.5 2,362 1

Nested Loop Left Join (cost=844,748.05..859,840.82 rows=35 width=577) (actual time=2,069.171..4,742.585 rows=2,362 loops=1)

  • Join Filter: ((rcl.client_id = action.client_id) AND (res.id = rcl.responsibility_id))
  • Rows Removed by Join Filter: 4,694
28. 2.115 4,740.696 ↓ 67.5 2,362 1

Nested Loop Left Join (cost=844,748.05..859,835.34 rows=35 width=558) (actual time=2,069.147..4,740.696 rows=2,362 loops=1)

  • Join Filter: (res.id = action.responsibility_id)
  • Rows Removed by Join Filter: 7,021
29. 1.323 4,738.581 ↓ 67.5 2,362 1

Nested Loop Left Join (cost=844,747.92..859,830.42 rows=35 width=545) (actual time=2,069.137..4,738.581 rows=2,362 loops=1)

  • Join Filter: (pt.id = action.priority)
  • Rows Removed by Join Filter: 239
30. 1.718 4,737.258 ↓ 67.5 2,362 1

Nested Loop Left Join (cost=844,747.78..859,824.57 rows=35 width=540) (actual time=2,069.128..4,737.258 rows=2,362 loops=1)

  • Join Filter: (tz.id = action.time_zone_id)
  • Rows Removed by Join Filter: 185
31. 1.965 4,735.540 ↓ 67.5 2,362 1

Merge Left Join (cost=844,747.64..859,799.48 rows=35 width=495) (actual time=2,069.114..4,735.540 rows=2,362 loops=1)

  • Merge Cond: (action.id = lef.entity_id)
32. 5.885 4,631.742 ↓ 295.2 2,362 1

Merge Left Join (cost=808,867.26..822,531.15 rows=8 width=463) (actual time=2,009.295..4,631.742 rows=2,362 loops=1)

  • Merge Cond: (action.id = les.entity_id)
33. 1.629 39.539 ↓ 1,181.0 2,362 1

Nested Loop Left Join (cost=1.44..48.83 rows=2 width=431) (actual time=4.034..39.539 rows=2,362 loops=1)

34. 0.933 35.548 ↓ 1,181.0 2,362 1

Nested Loop Left Join (cost=1.29..44.07 rows=2 width=431) (actual time=4.024..35.548 rows=2,362 loops=1)

35. 1.858 29.891 ↓ 1,181.0 2,362 1

Nested Loop Left Join (cost=1.00..39.05 rows=2 width=401) (actual time=4.004..29.891 rows=2,362 loops=1)

36. 1.833 28.033 ↓ 1,181.0 2,362 1

Nested Loop Left Join (cost=0.71..34.04 rows=2 width=377) (actual time=3.996..28.033 rows=2,362 loops=1)

37. 1.723 23.838 ↓ 1,181.0 2,362 1

Nested Loop Left Join (cost=0.57..29.30 rows=2 width=355) (actual time=3.990..23.838 rows=2,362 loops=1)

38. 17.391 17.391 ↓ 1,181.0 2,362 1

Index Scan using action_item_mgmt_id_idx on action_item_mgmt action (cost=0.29..24.30 rows=2 width=336) (actual time=3.965..17.391 rows=2,362 loops=1)

  • Index Cond: (id = ANY ($20))
  • Filter: ((NOT deleted) AND (client_id = 1,024))
39. 4.724 4.724 ↑ 1.0 1 2,362

Index Scan using pk_work_flow_status on work_flow_status ets (cost=0.28..2.50 rows=1 width=23) (actual time=0.002..0.002 rows=1 loops=2,362)

  • Index Cond: (id = action.status_id)
40. 2.362 2.362 ↑ 1.0 1 2,362

Index Scan using pk_entity_type on entity_type et (cost=0.15..2.37 rows=1 width=22) (actual time=0.001..0.001 rows=1 loops=2,362)

  • Index Cond: (action.entity_type_id = id)
41. 0.000 0.000 ↓ 0.0 0 2,362

Index Scan using pk_contract on contract c (cost=0.29..2.51 rows=1 width=28) (actual time=0.000..0.000 rows=0 loops=2,362)

  • Index Cond: (action.contract_id = id)
42. 4.724 4.724 ↑ 1.0 1 2,362

Index Scan using pk_relation on relation r (cost=0.29..2.51 rows=1 width=34) (actual time=0.002..0.002 rows=1 loops=2,362)

  • Index Cond: (action.relation_id = id)
43. 2.362 2.362 ↑ 1.0 1 2,362

Index Scan using pk_currency on currency cy (cost=0.14..2.36 rows=1 width=8) (actual time=0.001..0.001 rows=1 loops=2,362)

  • Index Cond: (action.currency_id = id)
44. 2,392.202 4,586.318 ↑ 5.7 5,689 1

GroupAggregate (cost=808,865.82..822,078.09 rows=32,332 width=36) (actual time=2,002.365..4,586.318 rows=5,689 loops=1)

  • Group Key: les.entity_id
45. 885.526 2,194.116 ↓ 1.0 1,742,155 1

Sort (cost=808,865.82..813,108.25 rows=1,696,971 width=28) (actual time=2,002.343..2,194.116 rows=1,742,155 loops=1)

  • Sort Key: les.entity_id
  • Sort Method: external merge Disk: 69,216kB
46. 227.061 1,308.590 ↓ 1.0 1,742,157 1

Merge Left Join (cost=531,818.93..557,289.18 rows=1,696,971 width=28) (actual time=920.325..1,308.590 rows=1,742,157 loops=1)

  • Merge Cond: (les.service_id = cst.id)
47. 690.950 1,079.954 ↓ 1.0 1,742,157 1

Sort (cost=531,439.45..535,681.88 rows=1,696,971 width=8) (actual time=918.964..1,079.954 rows=1,742,157 loops=1)

  • Sort Key: les.service_id
  • Sort Method: external merge Disk: 30,704kB
48. 389.004 389.004 ↓ 1.0 1,742,157 1

Index Scan using idx_link_entity_service_5 on link_entity_service les (cost=0.44..312,429.41 rows=1,696,971 width=8) (actual time=0.048..389.004 rows=1,742,157 loops=1)

  • Index Cond: (entity_type_id = 18)
49. 1.105 1.575 ↑ 1.0 3,161 1

Sort (cost=379.44..387.34 rows=3,162 width=28) (actual time=1.355..1.575 rows=3,161 loops=1)

  • Sort Key: cst.id
  • Sort Method: quicksort Memory: 345kB
50. 0.470 0.470 ↑ 1.0 3,162 1

Seq Scan on contract_sub_type cst (cost=0.00..195.62 rows=3,162 width=28) (actual time=0.010..0.470 rows=3,162 loops=1)

51. 37.467 101.833 ↑ 6.6 5,689 1

GroupAggregate (cost=35,880.38..36,799.77 rows=37,454 width=36) (actual time=57.882..101.833 rows=5,689 loops=1)

  • Group Key: lef.entity_id
52. 19.876 64.366 ↑ 1.0 45,937 1

Sort (cost=35,880.38..35,999.57 rows=47,678 width=18) (actual time=57.855..64.366 rows=45,937 loops=1)

  • Sort Key: lef.entity_id
  • Sort Method: quicksort Memory: 4,721kB
53. 6.619 44.490 ↑ 1.0 45,938 1

Merge Left Join (cost=31,441.42..32,175.55 rows=47,678 width=18) (actual time=32.699..44.490 rows=45,938 loops=1)

  • Merge Cond: (lef.function_id = ct.id)
54. 12.636 37.781 ↑ 1.0 45,938 1

Sort (cost=31,441.20..31,560.39 rows=47,678 width=8) (actual time=32.677..37.781 rows=45,938 loops=1)

  • Sort Key: lef.function_id
  • Sort Method: quicksort Memory: 3,690kB
55. 25.145 25.145 ↑ 1.0 45,938 1

Index Scan using idx_link_entity_function_4 on link_entity_function lef (cost=0.43..27,736.37 rows=47,678 width=8) (actual time=0.042..25.145 rows=45,938 loops=1)

  • Index Cond: (entity_type_id = 18)
56. 0.090 0.090 ↑ 1.0 268 1

Index Scan using pk_contract_type on contract_type ct (cost=0.15..18.58 rows=269 width=18) (actual time=0.017..0.090 rows=268 loops=1)

57. 0.000 0.000 ↑ 41.0 1 2,362

Materialize (cost=0.14..4.26 rows=41 width=49) (actual time=0.000..0.000 rows=1 loops=2,362)

58. 0.008 0.008 ↑ 20.5 2 1

Index Scan using pk_time_zone on time_zone tz (cost=0.14..4.06 rows=41 width=49) (actual time=0.007..0.008 rows=2 loops=1)

59. 0.000 0.000 ↑ 5.0 1 2,362

Materialize (cost=0.13..3.53 rows=5 width=9) (actual time=0.000..0.000 rows=1 loops=2,362)

60. 0.009 0.009 ↑ 1.0 5 1

Index Scan using pk_priority_table on priority_table pt (cost=0.13..3.51 rows=5 width=9) (actual time=0.004..0.009 rows=5 loops=1)

61. 0.000 0.000 ↑ 1.0 3 2,362

Materialize (cost=0.13..3.49 rows=3 width=17) (actual time=0.000..0.000 rows=3 loops=2,362)

62. 0.007 0.007 ↑ 1.0 3 1

Index Scan using pk_responsibility on responsibility res (cost=0.13..3.48 rows=3 width=17) (actual time=0.005..0.007 rows=3 loops=1)

63. 0.000 0.000 ↑ 1.0 2 2,362

Materialize (cost=0.00..4.26 rows=2 width=27) (actual time=0.000..0.000 rows=2 loops=2,362)

64. 0.017 0.017 ↑ 1.0 2 1

Seq Scan on responsibility_client_link rcl (cost=0.00..4.25 rows=2 width=27) (actual time=0.015..0.017 rows=2 loops=1)

  • Filter: (client_id = 1,024)
  • Rows Removed by Filter: 18
65. 4.649 4.724 ↑ 1.0 37 2,362

Materialize (cost=0.00..31.10 rows=37 width=22) (actual time=0.000..0.002 rows=37 loops=2,362)

66. 0.075 0.075 ↑ 1.0 37 1

Seq Scan on link_client_action_type lcat (cost=0.00..30.91 rows=37 width=22) (actual time=0.051..0.075 rows=37 loops=1)

  • Filter: (client_id = 1,024)
  • Rows Removed by Filter: 516
67. 18.807 43.353 ↑ 2.3 5,667 1

GroupAggregate (cost=11,716.61..12,122.32 rows=13,312 width=68) (actual time=22.866..43.353 rows=5,667 loops=1)

  • Group Key: ller.entity_id
68. 5.472 24.546 ↑ 1.0 13,404 1

Sort (cost=11,716.61..11,751.48 rows=13,947 width=22) (actual time=22.846..24.546 rows=13,404 loops=1)

  • Sort Key: ller.entity_id
  • Sort Method: quicksort Memory: 1,049kB
69. 2.578 19.074 ↑ 1.0 13,404 1

Merge Left Join (cost=10,202.07..10,756.53 rows=13,947 width=22) (actual time=12.695..19.074 rows=13,404 loops=1)

  • Merge Cond: (ller.region_id = rg2.id)
  • Join Filter: (NOT ller.global)
  • Rows Removed by Join Filter: 13,221
70. 2.287 15.919 ↑ 1.0 13,404 1

Merge Left Join (cost=10,201.72..10,496.38 rows=13,947 width=18) (actual time=12.686..15.919 rows=13,404 loops=1)

  • Merge Cond: (ller.region_id = rg1.id)
  • Join Filter: ller.global
  • Rows Removed by Join Filter: 183
71. 3.024 13.528 ↑ 1.0 13,404 1

Sort (cost=10,201.37..10,236.24 rows=13,947 width=9) (actual time=12.662..13.528 rows=13,404 loops=1)

  • Sort Key: ller.region_id
  • Sort Method: quicksort Memory: 1,013kB
72. 10.504 10.504 ↑ 1.0 13,404 1

Index Scan using idx_link_entity_region_5 on link_entity_region ller (cost=0.43..9,241.29 rows=13,947 width=9) (actual time=0.037..10.504 rows=13,404 loops=1)

  • Index Cond: (entity_type_id = 18)
73. 0.037 0.104 ↓ 1.6 400 1

Materialize (cost=0.14..16.85 rows=250 width=13) (actual time=0.013..0.104 rows=400 loops=1)

74. 0.067 0.067 ↑ 1.0 247 1

Index Scan using pk_region on region rg1 (cost=0.14..16.22 rows=250 width=13) (actual time=0.008..0.067 rows=247 loops=1)

75. 0.526 0.577 ↓ 53.5 13,380 1

Materialize (cost=0.14..16.85 rows=250 width=13) (actual time=0.005..0.577 rows=13,380 loops=1)

76. 0.051 0.051 ↑ 1.0 248 1

Index Scan using pk_region on region rg2 (cost=0.14..16.22 rows=250 width=13) (actual time=0.004..0.051 rows=248 loops=1)

77. 545.815 1,426.397 ↑ 7.2 5,664 1

GroupAggregate (cost=246,784.24..253,182.92 rows=40,562 width=68) (actual time=832.152..1,426.397 rows=5,664 loops=1)

  • Group Key: ledc.entity_id
78. 311.730 880.582 ↑ 1.1 528,421 1

Sort (cost=246,784.24..248,181.10 rows=558,744 width=32) (actual time=832.131..880.582 rows=528,421 loops=1)

  • Sort Key: ledc.entity_id
  • Sort Method: external merge Disk: 13,008kB
79. 111.065 568.852 ↑ 1.1 528,422 1

Merge Left Join (cost=172,443.57..193,447.02 rows=558,744 width=32) (actual time=258.702..568.852 rows=528,422 loops=1)

  • Merge Cond: (ledc.country_id = dc2.id)
  • Join Filter: (NOT ledc.global)
  • Rows Removed by Join Filter: 527,704
80. 99.968 436.745 ↑ 1.1 528,422 1

Merge Left Join (cost=172,443.30..183,643.45 rows=558,744 width=23) (actual time=258.684..436.745 rows=528,422 loops=1)

  • Merge Cond: (ledc.country_id = dc1.id)
  • Join Filter: ledc.global
  • Rows Removed by Join Filter: 718
81. 211.164 336.426 ↑ 1.1 528,422 1

Sort (cost=172,443.02..173,839.88 rows=558,744 width=9) (actual time=258.655..336.426 rows=528,422 loops=1)

  • Sort Key: ledc.country_id
  • Sort Method: quicksort Memory: 37,877kB
82. 125.262 125.262 ↑ 1.1 528,422 1

Index Scan using idx_link_entity_country_5 on link_entity_country ledc (cost=0.44..119,105.80 rows=558,744 width=9) (actual time=0.045..125.262 rows=528,422 loops=1)

  • Index Cond: (entity_type_id = 18)
83. 0.110 0.351 ↓ 2.3 1,206 1

Materialize (cost=0.28..27.69 rows=534 width=18) (actual time=0.022..0.351 rows=1,206 loops=1)

84. 0.241 0.241 ↑ 1.0 510 1

Index Scan using pk_delivery_country on delivery_country dc1 (cost=0.28..26.36 rows=534 width=18) (actual time=0.019..0.241 rows=510 loops=1)

85. 20.764 21.042 ↓ 988.6 527,888 1

Materialize (cost=0.28..27.69 rows=534 width=18) (actual time=0.007..21.042 rows=527,888 loops=1)

86. 0.278 0.278 ↑ 1.0 511 1

Index Scan using pk_delivery_country on delivery_country dc2 (cost=0.28..26.36 rows=534 width=18) (actual time=0.005..0.278 rows=511 loops=1)

87. 9.391 9.448 ↑ 1.5 99 2,362

Materialize (cost=0.14..10.03 rows=149 width=10) (actual time=0.000..0.004 rows=99 loops=2,362)

88. 0.057 0.057 ↑ 1.0 149 1

Index Scan using pk_tier on tier (cost=0.14..9.28 rows=149 width=10) (actual time=0.014..0.057 rows=149 loops=1)

89. 0.000 0.000 ↓ 0.0 0 2,362

Index Scan using pk_governance_body_child on governance_body_child gbc (cost=0.29..2.51 rows=1 width=34) (actual time=0.000..0.000 rows=0 loops=2,362)

  • Index Cond: (action.governance_body_child_id = id)
90. 4.724 4.724 ↑ 1.0 1 2,362

Index Scan using pk_vendor on vendor v (cost=0.29..2.51 rows=1 width=38) (actual time=0.002..0.002 rows=1 loops=2,362)

  • Index Cond: (action.vendor_id = id)
91. 0.000 0.000 ↓ 0.0 0 2,362

Index Scan using pk_governance_body on governance_body gb (cost=0.28..0.31 rows=1 width=27) (actual time=0.000..0.000 rows=0 loops=2,362)

  • Index Cond: (gbc.governance_body_id = id)
92. 14.937 31.039 ↑ 6.2 1,595 1

GroupAggregate (cost=13,340.26..13,596.84 rows=9,869 width=36) (actual time=14.705..31.039 rows=1,595 loops=1)

  • Group Key: ledc_1.entity_id
93. 4.377 16.102 ↓ 1.1 15,284 1

Sort (cost=13,340.26..13,376.44 rows=14,472 width=18) (actual time=14.688..16.102 rows=15,284 loops=1)

  • Sort Key: ledc_1.entity_id
  • Sort Method: quicksort Memory: 1,231kB
94. 2.148 11.725 ↓ 1.1 15,284 1

Merge Left Join (cost=12,108.57..12,340.18 rows=14,472 width=18) (actual time=8.367..11.725 rows=15,284 loops=1)

  • Merge Cond: (ledc_1.country_id = dc.id)
95. 3.691 9.448 ↓ 1.1 15,284 1

Sort (cost=12,108.29..12,144.47 rows=14,472 width=8) (actual time=8.353..9.448 rows=15,284 loops=1)

  • Sort Key: ledc_1.country_id
  • Sort Method: quicksort Memory: 1,101kB
96. 5.757 5.757 ↓ 1.1 15,284 1

Index Scan using idx_link_entity_delivery_country_4 on link_entity_delivery_country ledc_1 (cost=0.43..11,108.21 rows=14,472 width=8) (actual time=0.035..5.757 rows=15,284 loops=1)

  • Index Cond: (entity_type_id = 18)
97. 0.129 0.129 ↑ 1.4 381 1

Index Scan using pk_delivery_country on delivery_country dc (cost=0.28..26.36 rows=534 width=18) (actual time=0.011..0.129 rows=381 loops=1)

98.          

SubPlan (for Result)

99. 2.247 2.247 ↑ 1.0 1 2,247

Index Scan using pk_relation on relation src (cost=0.29..2.51 rows=1 width=30) (actual time=0.001..0.001 rows=1 loops=2,247)

  • Index Cond: (id = action.entity_id)
100. 0.052 0.052 ↑ 1.0 1 52

Index Scan using pk_contract on contract src_1 (cost=0.29..2.51 rows=1 width=24) (actual time=0.001..0.001 rows=1 loops=52)

  • Index Cond: (id = action.entity_id)
101. 0.070 0.070 ↑ 1.0 1 14

Index Scan using pk_dno on dno src_2 (cost=0.29..2.50 rows=1 width=42) (actual time=0.004..0.005 rows=1 loops=14)

  • Index Cond: (id = action.entity_id)
102. 0.015 0.015 ↑ 1.0 1 1

Index Scan using pk_child_dno on child_dno src_3 (cost=0.42..2.64 rows=1 width=24) (actual time=0.015..0.015 rows=1 loops=1)

  • Index Cond: (id = action.entity_id)
103. 0.006 0.006 ↑ 1.0 1 3

Index Scan using pk_sla on sla src_4 (cost=0.29..2.51 rows=1 width=38) (actual time=0.002..0.002 rows=1 loops=3)

  • Index Cond: (id = action.entity_id)
104. 0.003 0.003 ↑ 1.0 1 1

Index Scan using pk_child_sla on child_sla src_5 (cost=0.42..2.64 rows=1 width=44) (actual time=0.003..0.003 rows=1 loops=1)

  • Index Cond: (id = action.entity_id)
105. 0.000 0.000 ↓ 0.0 0

Index Scan using pk_contract_intpn on contract_intpn src_6 (cost=0.28..2.50 rows=1 width=20) (never executed)

  • Index Cond: (id = action.entity_id)
106. 0.026 0.026 ↑ 1.0 1 13

Index Scan using pk_issue_mgmt on issue_mgmt src_7 (cost=0.28..2.50 rows=1 width=18) (actual time=0.001..0.002 rows=1 loops=13)

  • Index Cond: (id = action.entity_id)
107. 0.000 0.000 ↓ 0.0 0

Index Scan using pk_dispute_mgmt on dispute_mgmt src_8 (cost=0.28..2.50 rows=1 width=17) (never executed)

  • Index Cond: (id = action.entity_id)
108. 0.062 0.062 ↑ 1.0 1 31

Index Scan using action_item_mgmt_id_idx on action_item_mgmt src_9 (cost=0.29..2.50 rows=1 width=20) (actual time=0.001..0.002 rows=1 loops=31)

  • Index Cond: (id = action.entity_id)
109. 0.000 0.000 ↓ 0.0 0

Index Scan using change_request_pkey on change_request src_10 (cost=0.28..2.50 rows=1 width=20) (never executed)

  • Index Cond: (id = action.entity_id)
110. 0.000 0.000 ↓ 0.0 0

Index Scan using base_invoice_pkey on base_invoice src_11 (cost=0.28..2.50 rows=1 width=20) (never executed)

  • Index Cond: (id = action.entity_id)
111. 0.000 0.000 ↓ 0.0 0

Index Scan using work_order_request_pkey on work_order_request src_12 (cost=0.28..2.50 rows=1 width=12) (never executed)

  • Index Cond: (id = action.entity_id)
Planning time : 17.922 ms
Execution time : 7,068.230 ms