explain.depesz.com

PostgreSQL's explain analyze made readable

Result: kh4g

Settings
# exclusive inclusive rows x rows loops node
1. 587.813 10,034.279 ↓ 294.8 12,086 1

Result (cost=332,088.85..333,538.87 rows=41 width=2,537) (actual time=7,792.022..10,034.279 rows=12,086 loops=1)

2.          

Initplan (for Result)

3. 68.965 226.362 ↓ 223.3 42,865 1

HashAggregate (cost=35,652.69..35,654.61 rows=192 width=4) (actual time=194.089..226.362 rows=42,865 loops=1)

  • Group Key: edl.entity_id
4.          

CTE user_data_filter

5. 0.022 0.022 ↑ 3,085.3 3 1

Index Scan using idx_user_data_access_user_id on user_data_access (cost=0.56..9,446.58 rows=9,256 width=23) (actual time=0.015..0.022 rows=3 loops=1)

  • Index Cond: (user_id = 4,247)
  • Filter: (NOT deleted)
6. 53.783 157.397 ↓ 223.3 42,865 1

Append (cost=0.43..26,205.63 rows=192 width=4) (actual time=0.043..157.397 rows=42,865 loops=1)

7. 54.841 103.608 ↓ 230.5 42,865 1

Nested Loop (cost=0.43..10,470.50 rows=186 width=4) (actual time=0.041..103.608 rows=42,865 loops=1)

8. 0.032 0.032 ↑ 1,542.7 3 1

CTE Scan on user_data_filter da (cost=0.00..185.12 rows=4,628 width=8) (actual time=0.019..0.032 rows=3 loops=1)

  • Filter: self_access
9. 48.735 48.735 ↓ 14,288.0 14,288 3

Index Scan using idx_entity_data_link_entity_type_id_ancestor_type_id_ancestor_i on entity_data_link edl (cost=0.43..2.21 rows=1 width=12) (actual time=0.009..16.245 rows=14,288 loops=3)

  • Index Cond: ((entity_type_id = 12) AND (ancestor_type_id = da.entity_type_id) AND (ancestor_id = da.entity_id))
  • Filter: (NOT deleted)
  • Rows Removed by Filter: 903
10. 0.002 0.006 ↓ 0.0 0 1

Nested Loop (cost=0.85..15,732.25 rows=6 width=4) (actual time=0.005..0.006 rows=0 loops=1)

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

Nested Loop (cost=0.43..15,484.66 rows=489 width=40) (actual time=0.004..0.004 rows=0 loops=1)

12. 0.003 0.003 ↓ 0.0 0 1

CTE Scan on user_data_filter da_1 (cost=0.00..185.12 rows=4,628 width=40) (actual time=0.002..0.003 rows=0 loops=1)

  • Filter: (NOT self_access)
  • Rows Removed by Filter: 3
13. 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..3.30 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))
14. 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.48 rows=1 width=12) (never executed)

  • Index Cond: ((entity_type_id = 12) AND (ancestor_type_id = edl_1.entity_type_id) AND (ancestor_id = edl_1.entity_id))
  • Filter: (NOT deleted)
15. 106.266 7,818.128 ↓ 294.8 12,086 1

Sort (cost=296,434.24..296,434.34 rows=41 width=2,349) (actual time=7,791.687..7,818.128 rows=12,086 loops=1)

  • Sort Key: cd.status_id
  • Sort Method: external merge Disk: 22,360kB
16. 78.920 7,711.862 ↓ 294.8 12,086 1

GroupAggregate (cost=296,415.92..296,433.14 rows=41 width=2,349) (actual time=7,624.288..7,711.862 rows=12,086 loops=1)

  • Group Key: cd.id, dno.id, rl.id, cntrct.id, lcdt.alias, lcdst.alias, cy.short_name, (get_label_by_id((dtc.name)::text, dtc.name_label_id, cntrct.client_id, 1)), f.alias, dtc.name, tz.time_zone, ets.id, ets1.id, res.id, rcl.id, lcpt.alias, lcop.alias, tier.name, (array_to_string(array_agg(DISTINCT rg.name), ', '::text)), (array_to_string(array_agg(DISTINCT rg_1.name), ', '::text)), (array_to_string(array_agg(DISTINCT ct.name), ', '::text)), (array_to_string(array_agg(DISTINCT cst.name), ', '::text)), (array_to_string(array_agg(DISTINCT pr.name), ', '::text)), (array_to_string(array_agg(DISTINCT i.name), ', '::text)), (array_to_string(array_agg(DISTINCT pl.name), ', '::text)), (array_to_string(array_agg(DISTINCT hub.name), ', '::text)), (array_to_string(array_agg(DISTINCT mkt.name), ', '::text)), (array_to_string(array_agg(DISTINCT icp.name), ', '::text)), (array_to_string(array_agg(DISTINCT cc.name), ', '::text)), (array_to_string(array_agg(DISTINCT hub_1.name), ', '::text)), (array_to_string(array_agg(DISTINCT market.name), ', '::text)), (array_to_string(array_agg(DISTINCT icp_1.name), ', '::text)), (array_to_string(array_agg(DISTINCT cc_1.name), ', '::text)), pt.id, au_lmby.last_name, au_lmby.first_name, vn.name
17. 55.528 7,632.942 ↓ 304.1 12,468 1

Sort (cost=296,415.92..296,416.03 rows=41 width=1,612) (actual time=7,624.249..7,632.942 rows=12,468 loops=1)

  • Sort Key: cd.id, dno.id, rl.id, cntrct.id, lcdt.alias, lcdst.alias, cy.short_name, (get_label_by_id((dtc.name)::text, dtc.name_label_id, cntrct.client_id, 1)), f.alias, dtc.name, tz.time_zone, ets.id, ets1.id, res.id, rcl.id, lcpt.alias, lcop.alias, tier.name, (array_to_string(array_agg(DISTINCT rg.name), ', '::text)), (array_to_string(array_agg(DISTINCT rg_1.name), ', '::text)), (array_to_string(array_agg(DISTINCT ct.name), ', '::text)), (array_to_string(array_agg(DISTINCT cst.name), ', '::text)), (array_to_string(array_agg(DISTINCT pr.name), ', '::text)), (array_to_string(array_agg(DISTINCT i.name), ', '::text)), (array_to_string(array_agg(DISTINCT pl.name), ', '::text)), (array_to_string(array_agg(DISTINCT hub.name), ', '::text)), (array_to_string(array_agg(DISTINCT mkt.name), ', '::text)), (array_to_string(array_agg(DISTINCT icp.name), ', '::text)), (array_to_string(array_agg(DISTINCT cc.name), ', '::text)), (array_to_string(array_agg(DISTINCT hub_1.name), ', '::text)), (array_to_string(array_agg(DISTINCT market.name), ', '::text)), (array_to_string(array_agg(DISTINCT icp_1.name), ', '::text)), (array_to_string(array_agg(DISTINCT cc_1.name), ', '::text)), pt.id, au_lmby.last_name, au_lmby.first_name, vn.name
  • Sort Method: quicksort Memory: 22,379kB
18. 593.001 7,577.414 ↓ 304.1 12,468 1

Nested Loop (cost=271,582.73..296,414.82 rows=41 width=1,612) (actual time=3,345.539..7,577.414 rows=12,468 loops=1)

19. 43.900 6,922.073 ↓ 290.0 12,468 1

Nested Loop Left Join (cost=271,582.32..296,292.66 rows=43 width=1,588) (actual time=3,345.385..6,922.073 rows=12,468 loops=1)

20. 24.089 6,840.769 ↓ 290.0 12,468 1

Merge Left Join (cost=271,582.04..296,199.07 rows=43 width=1,578) (actual time=3,345.367..6,840.769 rows=12,468 loops=1)

  • Merge Cond: (cd.id = leccc.entity_id)
21. 47.802 6,806.432 ↓ 290.0 12,468 1

Merge Left Join (cost=271,227.51..295,798.43 rows=43 width=1,546) (actual time=3,339.881..6,806.432 rows=12,468 loops=1)

  • Merge Cond: (cd.id = lecicp.entity_id)
22. 47.429 6,509.949 ↓ 290.0 12,468 1

Merge Left Join (cost=265,067.85..288,386.47 rows=43 width=1,514) (actual time=3,218.658..6,509.949 rows=12,468 loops=1)

  • Merge Cond: (cd.id = lecm.entity_id)
23. 46.915 6,232.931 ↓ 290.0 12,468 1

Merge Left Join (cost=259,271.17..281,394.62 rows=43 width=1,482) (actual time=3,105.703..6,232.931 rows=12,468 loops=1)

  • Merge Cond: (cd.id = lech.entity_id)
24. 26.316 5,956.159 ↓ 290.0 12,468 1

Merge Left Join (cost=253,793.07..274,707.80 rows=43 width=1,450) (actual time=2,993.161..5,956.159 rows=12,468 loops=1)

  • Merge Cond: (cd.id = lecc.entity_id)
25. 59.367 5,886.045 ↓ 290.0 12,468 1

Merge Left Join (cost=252,827.32..273,500.75 rows=43 width=1,418) (actual time=2,969.775..5,886.045 rows=12,468 loops=1)

  • Merge Cond: (cd.id = leicp.entity_id)
26. 57.514 5,479.444 ↓ 290.0 12,468 1

Merge Left Join (cost=243,607.92..262,582.22 rows=43 width=1,386) (actual time=2,797.061..5,479.444 rows=12,468 loops=1)

  • Merge Cond: (cd.id = lem.entity_id)
27. 57.470 5,079.590 ↓ 290.0 12,468 1

Merge Left Join (cost=234,034.47..251,198.05 rows=43 width=1,354) (actual time=2,626.874..5,079.590 rows=12,468 loops=1)

  • Merge Cond: (cd.id = leh.entity_id)
28. 52.923 4,699.549 ↓ 290.0 12,468 1

Merge Left Join (cost=226,127.15..241,607.97 rows=43 width=1,322) (actual time=2,470.218..4,699.549 rows=12,468 loops=1)

  • Merge Cond: (cd.id = lepl.entity_id)
29. 53.207 4,334.407 ↓ 290.0 12,468 1

Merge Left Join (cost=226,126.73..236,329.59 rows=43 width=1,290) (actual time=2,467.673..4,334.407 rows=12,468 loops=1)

  • Merge Cond: (cd.id = lei.entity_id)
30. 52.868 4,018.648 ↓ 290.0 12,468 1

Merge Left Join (cost=221,785.96..230,519.42 rows=43 width=1,258) (actual time=2,345.564..4,018.648 rows=12,468 loops=1)

  • Merge Cond: (cd.id = lcp.entity_id)
31. 34.046 3,673.216 ↓ 290.0 12,468 1

Nested Loop Left Join (cost=210,582.22..217,773.97 rows=43 width=1,226) (actual time=2,198.431..3,673.216 rows=12,468 loops=1)

32. 37.058 3,614.234 ↓ 290.0 12,468 1

Nested Loop Left Join (cost=210,582.08..217,763.34 rows=43 width=1,224) (actual time=2,198.417..3,614.234 rows=12,468 loops=1)

33. 35.829 3,552.240 ↓ 290.0 12,468 1

Nested Loop Left Join (cost=210,581.93..217,755.80 rows=43 width=1,217) (actual time=2,198.404..3,552.240 rows=12,468 loops=1)

34. 38.128 3,491.475 ↓ 290.0 12,468 1

Nested Loop Left Join (cost=210,581.79..217,748.25 rows=43 width=1,206) (actual time=2,198.391..3,491.475 rows=12,468 loops=1)

35. 37.826 3,428.411 ↓ 290.0 12,468 1

Nested Loop Left Join (cost=210,581.65..217,736.99 rows=43 width=1,195) (actual time=2,198.376..3,428.411 rows=12,468 loops=1)

36. 81.102 3,365.649 ↓ 290.0 12,468 1

Nested Loop Left Join (cost=210,581.52..217,725.83 rows=43 width=1,188) (actual time=2,198.362..3,365.649 rows=12,468 loops=1)

  • Join Filter: ((res.id = rcl.responsibility_id) AND (rcl.client_id = cd.client_id))
  • Rows Removed by Join Filter: 62,340
37. 37.953 3,222.207 ↓ 290.0 12,468 1

Nested Loop Left Join (cost=210,581.52..217,719.24 rows=43 width=1,169) (actual time=2,198.348..3,222.207 rows=12,468 loops=1)

  • Join Filter: (res.id = cd.responsibility_id)
  • Rows Removed by Join Filter: 16,863
38. 35.337 3,159.318 ↓ 290.0 12,468 1

Nested Loop Left Join (cost=210,581.52..217,715.58 rows=43 width=1,156) (actual time=2,198.333..3,159.318 rows=12,468 loops=1)

39. 38.883 3,099.045 ↓ 290.0 12,468 1

Nested Loop Left Join (cost=210,581.24..217,670.90 rows=43 width=1,132) (actual time=2,198.321..3,099.045 rows=12,468 loops=1)

40. 66.568 3,022.758 ↓ 290.0 12,468 1

Merge Left Join (cost=210,580.96..217,658.08 rows=43 width=1,112) (actual time=2,198.301..3,022.758 rows=12,468 loops=1)

  • Merge Cond: (cd.id = ller_1.entity_id)
41. 66.747 2,510.634 ↓ 290.0 12,468 1

Merge Left Join (cost=195,531.08..200,302.46 rows=43 width=1,080) (actual time=1,920.510..2,510.634 rows=12,468 loops=1)

  • Merge Cond: (cd.id = les.entity_id)
42. 77.714 1,773.379 ↓ 290.0 12,468 1

Merge Left Join (cost=70,226.16..72,559.53 rows=43 width=1,048) (actual time=1,487.107..1,773.379 rows=12,468 loops=1)

  • Merge Cond: (cd.id = lef.entity_id)
43. 31.279 1,229.702 ↓ 290.0 12,468 1

Sort (cost=27,217.95..27,218.05 rows=43 width=1,016) (actual time=1,218.509..1,229.702 rows=12,468 loops=1)

  • Sort Key: cd.id
  • Sort Method: quicksort Memory: 17,817kB
44. 38.301 1,198.423 ↓ 290.0 12,468 1

Merge Right Join (cost=24,860.41..27,216.78 rows=43 width=1,016) (actual time=1,051.023..1,198.423 rows=12,468 loops=1)

  • Merge Cond: (epr_cp.entity_id = cd.dnoid)
45. 83.784 206.701 ↑ 2.1 21,789 1

GroupAggregate (cost=15,514.53..17,292.09 rows=46,253 width=72) (actual time=105.474..206.701 rows=21,789 loops=1)

  • Group Key: epr_cp.entity_id, epr_cp.document_id
46. 58.702 122.917 ↑ 1.8 26,876 1

Sort (cost=15,514.53..15,638.77 rows=49,699 width=23) (actual time=105.448..122.917 rows=26,876 loops=1)

  • Sort Key: epr_cp.entity_id, epr_cp.document_id
  • Sort Method: quicksort Memory: 4,752kB
47. 64.215 64.215 ↑ 1.0 48,973 1

Index Scan using idx_dno_page_reference_4 on entity_page_reference epr_cp (cost=0.42..11,637.77 rows=49,699 width=23) (actual time=0.018..64.215 rows=48,973 loops=1)

  • Index Cond: (entity_type_id = 12)
48. 28.253 953.421 ↓ 2,078.0 12,468 1

Sort (cost=9,345.89..9,345.90 rows=6 width=948) (actual time=944.492..953.421 rows=12,468 loops=1)

  • Sort Key: cd.dnoid
  • Sort Method: quicksort Memory: 16,675kB
49. 29.727 925.168 ↓ 2,014.3 12,086 1

Nested Loop Left Join (cost=9,324.40..9,345.81 rows=6 width=948) (actual time=799.592..925.168 rows=12,086 loops=1)

50. 28.280 871.269 ↓ 2,014.3 12,086 1

Nested Loop Left Join (cost=9,323.98..9,329.98 rows=6 width=928) (actual time=799.578..871.269 rows=12,086 loops=1)

51. 23.028 830.903 ↓ 2,014.3 12,086 1

Merge Left Join (cost=9,323.84..9,328.57 rows=6 width=923) (actual time=799.566..830.903 rows=12,086 loops=1)

  • Merge Cond: (cd.id = ller.entity_id)
52. 33.691 777.596 ↓ 2,014.3 12,086 1

Sort (cost=220.25..220.27 rows=6 width=891) (actual time=768.627..777.596 rows=12,086 loops=1)

  • Sort Key: cd.id
  • Sort Method: quicksort Memory: 16,532kB
53. 20.635 743.905 ↓ 2,014.3 12,086 1

Hash Left Join (cost=5.24..220.18 rows=6 width=891) (actual time=265.697..743.905 rows=12,086 loops=1)

  • Hash Cond: ((cd.frequency_id = f.frequency_id) AND (cd.client_id = f.client_id))
54. 35.971 723.167 ↓ 2,417.2 12,086 1

Nested Loop Left Join (cost=1.72..216.50 rows=5 width=881) (actual time=265.579..723.167 rows=12,086 loops=1)

55. 36.442 675.110 ↓ 2,417.2 12,086 1

Nested Loop Left Join (cost=1.57..214.88 rows=5 width=881) (actual time=265.567..675.110 rows=12,086 loops=1)

56. 31.806 626.582 ↓ 2,417.2 12,086 1

Nested Loop Left Join (cost=1.42..214.05 rows=5 width=866) (actual time=265.553..626.582 rows=12,086 loops=1)

57. 33.204 570.604 ↓ 2,417.2 12,086 1

Nested Loop Left Join (cost=1.00..200.87 rows=5 width=842) (actual time=265.536..570.604 rows=12,086 loops=1)

58. 34.647 513.228 ↓ 2,417.2 12,086 1

Nested Loop Left Join (cost=0.72..196.25 rows=5 width=797) (actual time=265.521..513.228 rows=12,086 loops=1)

59. 57.261 466.495 ↓ 2,417.2 12,086 1

Nested Loop (cost=0.58..194.97 rows=5 width=785) (actual time=265.510..466.495 rows=12,086 loops=1)

60. 372.320 372.320 ↓ 542.9 18,457 1

Index Scan using idx_child_dno_2 on child_dno cd (cost=0.29..110.77 rows=34 width=736) (actual time=265.212..372.320 rows=18,457 loops=1)

  • Index Cond: (dnoid = ANY ($19))
  • Filter: ((NOT deleted) AND (status_id = ANY ('{1626,1627,1628,1629,1630,2,4,21}'::integer[])))
  • Rows Removed by Filter: 27,509
61. 36.914 36.914 ↑ 1.0 1 18,457

Index Scan using dno_deleted_ix on dno (cost=0.29..2.48 rows=1 width=49) (actual time=0.002..0.002 rows=1 loops=18,457)

  • Index Cond: (id = cd.dnoid)
  • Filter: (status_id = ANY ('{5}'::integer[]))
  • Rows Removed by Filter: 0
62. 12.086 12.086 ↑ 1.0 1 12,086

Index Scan using pk_time_zone on time_zone tz (cost=0.14..0.25 rows=1 width=20) (actual time=0.001..0.001 rows=1 loops=12,086)

  • Index Cond: (id = cd.time_zone_id)
63. 24.172 24.172 ↑ 1.0 1 12,086

Index Scan using pk_contract on contract cntrct (cost=0.29..0.92 rows=1 width=49) (actual time=0.002..0.002 rows=1 loops=12,086)

  • Index Cond: (id = dno.contract_id)
64. 24.172 24.172 ↑ 1.0 1 12,086

Index Scan using pk_relation on relation rl (cost=0.42..2.64 rows=1 width=28) (actual time=0.002..0.002 rows=1 loops=12,086)

  • Index Cond: (cd.relation_id = id)
65. 12.086 12.086 ↑ 1.0 1 12,086

Index Scan using pk_entity_type on entity_type dtc (cost=0.15..0.17 rows=1 width=23) (actual time=0.001..0.001 rows=1 loops=12,086)

  • Index Cond: (id = cntrct.document_type_id)
66. 12.086 12.086 ↑ 1.0 1 12,086

Index Scan using pk_currency on currency cy (cost=0.14..0.32 rows=1 width=8) (actual time=0.001..0.001 rows=1 loops=12,086)

  • Index Cond: (id = cd.currency_id)
67. 0.051 0.103 ↑ 1.5 41 1

Hash (cost=2.61..2.61 rows=61 width=22) (actual time=0.102..0.103 rows=41 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 11kB
68. 0.052 0.052 ↑ 1.0 61 1

Seq Scan on link_client_frequency f (cost=0.00..2.61 rows=61 width=22) (actual time=0.007..0.052 rows=61 loops=1)

69. 2.423 30.279 ↓ 7.3 982 1

GroupAggregate (cost=9,103.59..9,106.60 rows=134 width=36) (actual time=27.240..30.279 rows=982 loops=1)

  • Group Key: ller.entity_id
70. 1.407 27.856 ↓ 7.3 982 1

Sort (cost=9,103.59..9,103.92 rows=134 width=12) (actual time=27.222..27.856 rows=982 loops=1)

  • Sort Key: ller.entity_id
  • Sort Method: quicksort Memory: 71kB
71. 5.127 26.449 ↓ 7.3 982 1

Nested Loop Left Join (cost=0.43..9,098.86 rows=134 width=12) (actual time=2.164..26.449 rows=982 loops=1)

  • Join Filter: (rg.id = ller.region_id)
  • Rows Removed by Join Filter: 5,037
72. 17.394 17.394 ↓ 7.3 982 1

Index Scan using idx_link_entity_region_5 on link_entity_region ller (cost=0.43..9,056.10 rows=134 width=8) (actual time=2.141..17.394 rows=982 loops=1)

  • Index Cond: (entity_type_id = 13)
  • Filter: (NOT global)
  • Rows Removed by Filter: 72,058
73. 3.914 3.928 ↑ 3.5 6 982

Materialize (cost=0.00..2.31 rows=21 width=12) (actual time=0.001..0.004 rows=6 loops=982)

74. 0.014 0.014 ↑ 1.9 11 1

Seq Scan on region rg (cost=0.00..2.21 rows=21 width=12) (actual time=0.006..0.014 rows=11 loops=1)

75. 12.086 12.086 ↑ 1.0 1 12,086

Index Scan using pk_priority_table on priority_table pt (cost=0.13..0.25 rows=1 width=9) (actual time=0.001..0.001 rows=1 loops=12,086)

  • Index Cond: (id = cd.priority_id)
76. 24.172 24.172 ↑ 1.0 1 12,086

Index Scan using pk_vendor on vendor vn (cost=0.42..2.64 rows=1 width=28) (actual time=0.002..0.002 rows=1 loops=12,086)

  • Index Cond: (id = cd.vendor_id)
77. 192.456 465.963 ↑ 1.0 64,164 1

GroupAggregate (cost=43,008.22..44,529.92 rows=64,881 width=36) (actual time=223.052..465.963 rows=64,164 loops=1)

  • Group Key: lef.entity_id
78. 111.246 273.507 ↑ 1.0 71,638 1

Sort (cost=43,008.22..43,191.05 rows=73,132 width=18) (actual time=223.031..273.507 rows=71,638 loops=1)

  • Sort Key: lef.entity_id
  • Sort Method: quicksort Memory: 7,038kB
79. 100.193 162.261 ↑ 1.0 71,638 1

Hash Left Join (cost=3.56..37,099.80 rows=73,132 width=18) (actual time=0.117..162.261 rows=71,638 loops=1)

  • Hash Cond: (lef.function_id = ct.id)
80. 61.985 61.985 ↑ 1.0 71,638 1

Index Scan using idx_link_entity_function_4 on link_entity_function lef (cost=0.43..36,888.43 rows=73,132 width=8) (actual time=0.024..61.985 rows=71,638 loops=1)

  • Index Cond: (entity_type_id = 13)
81. 0.041 0.083 ↑ 1.0 50 1

Hash (cost=2.50..2.50 rows=50 width=18) (actual time=0.082..0.083 rows=50 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 11kB
82. 0.042 0.042 ↑ 1.0 50 1

Seq Scan on contract_type ct (cost=0.00..2.50 rows=50 width=18) (actual time=0.007..0.042 rows=50 loops=1)

83. 233.276 670.508 ↓ 1.2 64,164 1

GroupAggregate (cost=125,304.92..127,065.58 rows=54,151 width=36) (actual time=357.436..670.508 rows=64,164 loops=1)

  • Group Key: les.entity_id
84. 175.925 437.232 ↑ 1.1 116,804 1

Sort (cost=125,304.92..125,621.05 rows=126,453 width=37) (actual time=357.414..437.232 rows=116,804 loops=1)

  • Sort Key: les.entity_id
  • Sort Method: quicksort Memory: 11,639kB
85. 162.753 261.307 ↑ 1.1 116,804 1

Hash Left Join (cost=54.38..114,589.14 rows=126,453 width=37) (actual time=1.588..261.307 rows=116,804 loops=1)

  • Hash Cond: (les.service_id = cst.id)
86. 96.998 96.998 ↑ 1.1 116,804 1

Index Scan using idx_link_entity_service_5 on link_entity_service les (cost=0.44..114,201.94 rows=126,453 width=8) (actual time=0.022..96.998 rows=116,804 loops=1)

  • Index Cond: (entity_type_id = 13)
87. 0.782 1.556 ↑ 1.0 1,064 1

Hash (cost=40.64..40.64 rows=1,064 width=37) (actual time=1.555..1.556 rows=1,064 loops=1)

  • Buckets: 2,048 Batches: 1 Memory Usage: 90kB
88. 0.774 0.774 ↑ 1.0 1,064 1

Seq Scan on contract_sub_type cst (cost=0.00..40.64 rows=1,064 width=37) (actual time=0.006..0.774 rows=1,064 loops=1)

89. 171.403 445.556 ↑ 1.0 63,222 1

GroupAggregate (cost=15,049.88..16,551.04 rows=64,323 width=36) (actual time=223.410..445.556 rows=63,222 loops=1)

  • Group Key: ller_1.entity_id
90. 111.525 274.153 ↓ 1.0 72,058 1

Sort (cost=15,049.88..15,228.65 rows=71,509 width=12) (actual time=223.389..274.153 rows=72,058 loops=1)

  • Sort Key: ller_1.entity_id
  • Sort Method: quicksort Memory: 6,450kB
91. 98.385 162.628 ↓ 1.0 72,058 1

Hash Left Join (cost=2.90..9,284.16 rows=71,509 width=12) (actual time=0.073..162.628 rows=72,058 loops=1)

  • Hash Cond: (ller_1.region_id = rg_1.id)
92. 64.203 64.203 ↓ 1.0 72,058 1

Index Scan using idx_link_entity_region_5 on link_entity_region ller_1 (cost=0.43..9,056.10 rows=71,509 width=8) (actual time=0.023..64.203 rows=72,058 loops=1)

  • Index Cond: (entity_type_id = 13)
  • Filter: global
  • Rows Removed by Filter: 982
93. 0.019 0.040 ↑ 1.0 21 1

Hash (cost=2.21..2.21 rows=21 width=12) (actual time=0.039..0.040 rows=21 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
94. 0.021 0.021 ↑ 1.0 21 1

Seq Scan on region rg_1 (cost=0.00..2.21 rows=21 width=12) (actual time=0.006..0.021 rows=21 loops=1)

95. 37.404 37.404 ↑ 1.0 1 12,468

Index Scan using pk_work_flow_status on work_flow_status ets (cost=0.28..0.30 rows=1 width=24) (actual time=0.003..0.003 rows=1 loops=12,468)

  • Index Cond: (id = dno.status_id)
96. 24.936 24.936 ↑ 1.0 1 12,468

Index Scan using pk_work_flow_status on work_flow_status ets1 (cost=0.28..1.04 rows=1 width=24) (actual time=0.002..0.002 rows=1 loops=12,468)

  • Index Cond: (id = cd.status_id)
97. 24.927 24.936 ↑ 1.5 2 12,468

Materialize (cost=0.00..2.04 rows=3 width=17) (actual time=0.001..0.002 rows=2 loops=12,468)

98. 0.009 0.009 ↑ 1.0 3 1

Seq Scan on responsibility res (cost=0.00..2.03 rows=3 width=17) (actual time=0.006..0.009 rows=3 loops=1)

99. 62.328 62.340 ↑ 1.0 6 12,468

Materialize (cost=0.00..2.09 rows=6 width=27) (actual time=0.001..0.005 rows=6 loops=12,468)

100. 0.012 0.012 ↑ 1.0 6 1

Seq Scan on responsibility_client_link rcl (cost=0.00..2.06 rows=6 width=27) (actual time=0.005..0.012 rows=6 loops=1)

101. 24.936 24.936 ↑ 1.0 1 12,468

Index Scan using pk_link_client_performance_type on link_client_performance_type lcpt (cost=0.14..0.25 rows=1 width=19) (actual time=0.002..0.002 rows=1 loops=12,468)

  • Index Cond: (id = cd.type)
  • Filter: (client_id = cd.client_id)
102. 24.936 24.936 ↑ 1.0 1 12,468

Index Scan using pk_link_client_obligation_phase on link_client_obligation_phase lcop (cost=0.14..0.25 rows=1 width=19) (actual time=0.002..0.002 rows=1 loops=12,468)

  • Index Cond: (cd.phase_id = id)
  • Filter: (client_id = cd.client_id)
103. 24.936 24.936 ↑ 1.0 1 12,468

Index Scan using pk_link_client_dno_type on link_client_dno_type lcdt (cost=0.14..0.17 rows=1 width=23) (actual time=0.002..0.002 rows=1 loops=12,468)

  • Index Cond: (dno.dno_type_id = id)
  • Filter: (client_id = dno.client_id)
104. 24.936 24.936 ↑ 1.0 1 12,468

Index Scan using pk_link_client_dno_sub_type on link_client_dno_sub_type lcdst (cost=0.14..0.17 rows=1 width=23) (actual time=0.002..0.002 rows=1 loops=12,468)

  • Index Cond: (dno.dno_sub_type_id = id)
  • Filter: (client_id = dno.client_id)
105. 24.936 24.936 ↑ 1.0 1 12,468

Index Scan using pk_tier on tier (cost=0.14..0.25 rows=1 width=10) (actual time=0.002..0.002 rows=1 loops=12,468)

  • Index Cond: (cd.tier_id = id)
106. 116.686 292.564 ↑ 1.0 41,960 1

GroupAggregate (cost=11,203.75..12,197.25 rows=43,824 width=36) (actual time=145.921..292.564 rows=41,960 loops=1)

  • Group Key: lcp.entity_id
107. 62.262 175.878 ↑ 1.0 44,042 1

Sort (cost=11,203.75..11,315.79 rows=44,819 width=22) (actual time=145.903..175.878 rows=44,042 loops=1)

  • Sort Key: lcp.entity_id
  • Sort Method: quicksort Memory: 4,682kB
108. 63.222 113.616 ↑ 1.0 44,042 1

Hash Left Join (cost=6.76..7,741.07 rows=44,819 width=22) (actual time=0.236..113.616 rows=44,042 loops=1)

  • Hash Cond: (lcp.project_id = pr.id)
109. 50.225 50.225 ↑ 1.0 44,042 1

Index Scan using idx_link_contract_project_4 on link_entity_project lcp (cost=0.42..7,612.29 rows=44,819 width=8) (actual time=0.056..50.225 rows=44,042 loops=1)

  • Index Cond: (entity_type_id = 13)
110. 0.081 0.169 ↑ 1.0 104 1

Hash (cost=5.04..5.04 rows=104 width=22) (actual time=0.168..0.169 rows=104 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 14kB
111. 0.088 0.088 ↑ 1.0 104 1

Seq Scan on project pr (cost=0.00..5.04 rows=104 width=22) (actual time=0.006..0.088 rows=104 loops=1)

112. 112.018 262.552 ↓ 1.0 43,527 1

GroupAggregate (cost=4,340.77..5,287.42 rows=41,789 width=36) (actual time=120.912..262.552 rows=43,527 loops=1)

  • Group Key: lei.entity_id
113. 60.432 150.534 ↓ 1.0 43,532 1

Sort (cost=4,340.77..4,447.37 rows=42,642 width=19) (actual time=120.892..150.534 rows=43,532 loops=1)

  • Sort Key: lei.entity_id
  • Sort Method: quicksort Memory: 4,594kB
114. 58.971 90.102 ↓ 1.0 43,532 1

Hash Left Join (cost=3.95..1,061.60 rows=42,642 width=19) (actual time=0.127..90.102 rows=43,532 loops=1)

  • Hash Cond: (lei.initiative_id = i.id)
115. 31.023 31.023 ↓ 1.0 43,532 1

Index Only Scan using idx_link_entity_initiative_4 on link_entity_initiative lei (cost=0.42..939.16 rows=42,642 width=8) (actual time=0.012..31.023 rows=43,532 loops=1)

  • Index Cond: (entity_type_id = 13)
  • Heap Fetches: 85
116. 0.054 0.108 ↑ 1.0 68 1

Hash (cost=2.68..2.68 rows=68 width=19) (actual time=0.107..0.108 rows=68 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 12kB
117. 0.054 0.054 ↑ 1.0 68 1

Seq Scan on initiative i (cost=0.00..2.68 rows=68 width=19) (actual time=0.006..0.054 rows=68 loops=1)

118. 116.752 312.219 ↓ 1.0 44,482 1

GroupAggregate (cost=0.42..4,734.85 rows=43,451 width=36) (actual time=0.043..312.219 rows=44,482 loops=1)

  • Group Key: lepl.entity_id
119. 114.636 195.467 ↓ 1.0 44,482 1

Nested Loop Left Join (cost=0.42..3,861.29 rows=44,360 width=15) (actual time=0.029..195.467 rows=44,482 loops=1)

  • Join Filter: (pl.id = lepl.project_level_id)
  • Rows Removed by Join Filter: 30,134
120. 36.349 36.349 ↓ 1.0 44,482 1

Index Only Scan using idx_link_entity_project_level_6 on link_entity_project_level lepl (cost=0.42..975.82 rows=44,360 width=8) (actual time=0.011..36.349 rows=44,482 loops=1)

  • Index Cond: (entity_type_id = 13)
  • Heap Fetches: 125
121. 44.475 44.482 ↑ 2.5 2 44,482

Materialize (cost=0.00..2.07 rows=5 width=15) (actual time=0.001..0.001 rows=2 loops=44,482)

122. 0.007 0.007 ↑ 2.5 2 1

Seq Scan on project_level pl (cost=0.00..2.05 rows=5 width=15) (actual time=0.006..0.007 rows=2 loops=1)

123. 130.002 322.571 ↓ 1.0 49,771 1

GroupAggregate (cost=7,907.32..8,992.96 rows=47,736 width=36) (actual time=156.435..322.571 rows=49,771 loops=1)

  • Group Key: leh.entity_id
124. 78.418 192.569 ↓ 1.0 49,947 1

Sort (cost=7,907.32..8,030.52 rows=49,279 width=11) (actual time=156.418..192.569 rows=49,947 loops=1)

  • Sort Key: leh.entity_id
  • Sort Method: quicksort Memory: 3,909kB
125. 69.427 114.151 ↓ 1.0 49,947 1

Hash Left Join (cost=2.83..4,066.35 rows=49,279 width=11) (actual time=0.075..114.151 rows=49,947 loops=1)

  • Hash Cond: (leh.hub_id = hub.id)
126. 44.676 44.676 ↓ 1.0 49,947 1

Index Scan using idx_link_entity_hub_4 on link_entity_hub leh (cost=0.42..3,904.13 rows=49,279 width=8) (actual time=0.018..44.676 rows=49,947 loops=1)

  • Index Cond: (entity_type_id = 13)
127. 0.028 0.048 ↑ 1.0 18 1

Hash (cost=2.18..2.18 rows=18 width=11) (actual time=0.047..0.048 rows=18 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
128. 0.020 0.020 ↑ 1.0 18 1

Seq Scan on hub (cost=0.00..2.18 rows=18 width=11) (actual time=0.006..0.020 rows=18 loops=1)

129. 133.894 342.340 ↑ 1.0 49,771 1

GroupAggregate (cost=9,573.45..10,753.12 rows=50,448 width=36) (actual time=169.883..342.340 rows=49,771 loops=1)

  • Group Key: lem.entity_id
130. 84.369 208.446 ↑ 1.1 53,594 1

Sort (cost=9,573.45..9,714.43 rows=56,393 width=17) (actual time=169.860..208.446 rows=53,594 loops=1)

  • Sort Key: lem.entity_id
  • Sort Method: quicksort Memory: 4,291kB
131. 75.113 124.077 ↑ 1.1 53,594 1

Hash Left Join (cost=11.67..5,123.13 rows=56,393 width=17) (actual time=0.374..124.077 rows=53,594 loops=1)

  • Hash Cond: (lem.market_id = mkt.id)
132. 48.615 48.615 ↑ 1.1 53,594 1

Index Scan using idx_link_entity_market_4 on link_entity_market lem (cost=0.42..4,961.16 rows=56,393 width=8) (actual time=0.015..48.615 rows=53,594 loops=1)

  • Index Cond: (entity_type_id = 13)
133. 0.175 0.349 ↑ 1.0 233 1

Hash (cost=8.33..8.33 rows=233 width=17) (actual time=0.348..0.349 rows=233 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 20kB
134. 0.174 0.174 ↑ 1.0 233 1

Seq Scan on market mkt (cost=0.00..8.33 rows=233 width=17) (actual time=0.007..0.174 rows=233 loops=1)

135. 135.886 347.234 ↓ 1.1 49,771 1

GroupAggregate (cost=9,219.40..10,327.28 rows=47,266 width=36) (actual time=172.394..347.234 rows=49,771 loops=1)

  • Group Key: leicp.entity_id
136. 85.845 211.348 ↓ 1.0 53,982 1

Sort (cost=9,219.40..9,352.36 rows=53,186 width=33) (actual time=172.374..211.348 rows=53,982 loops=1)

  • Sort Key: leicp.entity_id
  • Sort Method: quicksort Memory: 5,820kB
137. 75.578 125.503 ↓ 1.0 53,982 1

Hash Left Join (cost=43.14..5,044.63 rows=53,186 width=33) (actual time=1.263..125.503 rows=53,982 loops=1)

  • Hash Cond: (leicp.icp_id = icp.id)
138. 48.692 48.692 ↓ 1.0 53,982 1

Index Scan using idx_link_entity_icp_4 on link_entity_icp leicp (cost=0.42..4,861.58 rows=53,186 width=8) (actual time=0.020..48.692 rows=53,982 loops=1)

  • Index Cond: (entity_type_id = 13)
139. 0.613 1.233 ↑ 1.0 832 1

Hash (cost=32.32..32.32 rows=832 width=33) (actual time=1.232..1.233 rows=832 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 63kB
140. 0.620 0.620 ↑ 1.0 832 1

Seq Scan on internal_contracting_party icp (cost=0.00..32.32 rows=832 width=33) (actual time=0.007..0.620 rows=832 loops=1)

141. 15.600 43.798 ↑ 1.5 4,499 1

GroupAggregate (cost=965.75..1,121.78 rows=6,809 width=36) (actual time=23.379..43.798 rows=4,499 loops=1)

  • Group Key: lecc.entity_id
142. 10.051 28.198 ↑ 1.0 7,186 1

Sort (cost=965.75..983.72 rows=7,186 width=9) (actual time=23.366..28.198 rows=7,186 loops=1)

  • Sort Key: lecc.entity_id
  • Sort Method: quicksort Memory: 529kB
143. 9.962 18.147 ↑ 1.0 7,186 1

Hash Left Join (cost=35.77..505.45 rows=7,186 width=9) (actual time=1.157..18.147 rows=7,186 loops=1)

  • Hash Cond: (lecc.company_code_id = cc.id)
144. 7.052 7.052 ↑ 1.0 7,186 1

Index Scan using idx_link_entity_company_code_2 on link_entity_company_code lecc (cost=0.29..451.01 rows=7,186 width=8) (actual time=0.014..7.052 rows=7,186 loops=1)

  • Index Cond: (entity_type_id = 13)
145. 0.565 1.133 ↑ 1.0 777 1

Hash (cost=25.77..25.77 rows=777 width=9) (actual time=1.132..1.133 rows=777 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 42kB
146. 0.568 0.568 ↑ 1.0 777 1

Seq Scan on company_code cc (cost=0.00..25.77 rows=777 width=9) (actual time=0.007..0.568 rows=777 loops=1)

147. 91.195 229.857 ↓ 1.0 35,140 1

GroupAggregate (cost=5,478.10..6,256.90 rows=34,366 width=36) (actual time=112.478..229.857 rows=35,140 loops=1)

  • Group Key: lech.entity_id
148. 56.755 138.662 ↓ 1.0 35,703 1

Sort (cost=5,478.10..5,565.87 rows=35,108 width=11) (actual time=112.458..138.662 rows=35,703 loops=1)

  • Sort Key: lech.entity_id
  • Sort Method: quicksort Memory: 3,242kB
149. 49.689 81.907 ↓ 1.0 35,703 1

Hash Left Join (cost=2.83..2,827.54 rows=35,108 width=11) (actual time=0.060..81.907 rows=35,703 loops=1)

  • Hash Cond: (lech.hub_id = hub_1.id)
150. 32.181 32.181 ↓ 1.0 35,703 1

Index Scan using idx_link_entity_contracting_hub_4 on link_entity_contracting_hub lech (cost=0.42..2,711.28 rows=35,108 width=8) (actual time=0.015..32.181 rows=35,703 loops=1)

  • Index Cond: (entity_type_id = 13)
151. 0.017 0.037 ↑ 1.0 18 1

Hash (cost=2.18..2.18 rows=18 width=11) (actual time=0.036..0.037 rows=18 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
152. 0.020 0.020 ↑ 1.0 18 1

Seq Scan on hub hub_1 (cost=0.00..2.18 rows=18 width=11) (actual time=0.007..0.020 rows=18 loops=1)

153. 90.675 229.589 ↓ 1.0 35,140 1

GroupAggregate (cost=5,796.67..6,570.50 rows=33,681 width=36) (actual time=112.892..229.589 rows=35,140 loops=1)

  • Group Key: lecm.entity_id
154. 56.552 138.914 ↑ 1.0 35,746 1

Sort (cost=5,796.67..5,886.21 rows=35,815 width=17) (actual time=112.872..138.914 rows=35,746 loops=1)

  • Sort Key: lecm.entity_id
  • Sort Method: quicksort Memory: 3,392kB
155. 49.754 82.362 ↑ 1.0 35,746 1

Hash Left Join (cost=11.66..3,087.58 rows=35,815 width=17) (actual time=0.378..82.362 rows=35,746 loops=1)

  • Hash Cond: (lecm.market_id = market.id)
156. 32.259 32.259 ↑ 1.0 35,746 1

Index Scan using idx_link_entity_contracting_market_4 on link_entity_contracting_market lecm (cost=0.42..2,980.61 rows=35,815 width=8) (actual time=0.015..32.259 rows=35,746 loops=1)

  • Index Cond: (entity_type_id = 13)
157. 0.175 0.349 ↑ 1.0 233 1

Hash (cost=8.33..8.33 rows=233 width=17) (actual time=0.349..0.349 rows=233 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 20kB
158. 0.174 0.174 ↑ 1.0 233 1

Seq Scan on market (cost=0.00..8.33 rows=233 width=17) (actual time=0.007..0.174 rows=233 loops=1)

159. 99.738 248.681 ↓ 1.0 35,140 1

GroupAggregate (cost=6,159.67..6,972.70 rows=35,113 width=36) (actual time=121.158..248.681 rows=35,140 loops=1)

  • Group Key: lecicp.entity_id
160. 60.381 148.943 ↑ 1.0 37,798 1

Sort (cost=6,159.67..6,255.11 rows=38,178 width=33) (actual time=121.140..148.943 rows=37,798 loops=1)

  • Sort Key: lecicp.entity_id
  • Sort Method: quicksort Memory: 4,630kB
161. 53.047 88.562 ↑ 1.0 37,798 1

Hash Left Join (cost=43.14..3,254.23 rows=38,178 width=33) (actual time=1.245..88.562 rows=37,798 loops=1)

  • Hash Cond: (lecicp.icp_id = icp_1.id)
162. 34.299 34.299 ↑ 1.0 37,798 1

Index Scan using idx_link_entity_contracting_icp_4 on link_entity_contracting_icp lecicp (cost=0.42..3,110.78 rows=38,178 width=8) (actual time=0.020..34.299 rows=37,798 loops=1)

  • Index Cond: (entity_type_id = 13)
163. 0.610 1.216 ↑ 1.0 832 1

Hash (cost=32.32..32.32 rows=832 width=33) (actual time=1.216..1.216 rows=832 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 63kB
164. 0.606 0.606 ↑ 1.0 832 1

Seq Scan on internal_contracting_party icp_1 (cost=0.00..32.32 rows=832 width=33) (actual time=0.007..0.606 rows=832 loops=1)

165. 3.763 10.248 ↓ 1.0 1,316 1

GroupAggregate (cost=354.52..384.10 rows=1,314 width=36) (actual time=5.479..10.248 rows=1,316 loops=1)

  • Group Key: leccc.entity_id
166. 1.998 6.485 ↑ 1.0 1,316 1

Sort (cost=354.52..357.81 rows=1,316 width=9) (actual time=5.469..6.485 rows=1,316 loops=1)

  • Sort Key: leccc.entity_id
  • Sort Method: quicksort Memory: 110kB
167. 1.860 4.487 ↑ 1.0 1,316 1

Hash Left Join (cost=35.77..286.34 rows=1,316 width=9) (actual time=1.136..4.487 rows=1,316 loops=1)

  • Hash Cond: (leccc.company_code_id = cc_1.id)
168. 1.513 1.513 ↑ 1.0 1,316 1

Index Scan using idx_link_entity_contracting_company_code_2 on link_entity_contracting_company_code leccc (cost=0.29..247.38 rows=1,316 width=8) (actual time=0.010..1.513 rows=1,316 loops=1)

  • Index Cond: (entity_type_id = 13)
169. 0.561 1.114 ↑ 1.0 777 1

Hash (cost=25.77..25.77 rows=777 width=9) (actual time=1.113..1.114 rows=777 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 42kB
170. 0.553 0.553 ↑ 1.0 777 1

Seq Scan on company_code cc_1 (cost=0.00..25.77 rows=777 width=9) (actual time=0.006..0.553 rows=777 loops=1)

171. 37.404 37.404 ↑ 1.0 1 12,468

Index Scan using pk_app_user on app_user au_lmby (cost=0.28..2.18 rows=1 width=18) (actual time=0.003..0.003 rows=1 loops=12,468)

  • Index Cond: (id = cd.last_modified_by_user_id)
172. 62.340 62.340 ↑ 1.0 1 12,468

Index Scan using pk_child_dno on child_dno cd_1 (cost=0.41..2.60 rows=1 width=16) (actual time=0.005..0.005 rows=1 loops=12,468)

  • Index Cond: (id = cd.id)
  • Filter: (client_id = 1,002)
173.          

SubPlan (for Result)

174. 84.602 302.150 ↑ 1.0 1 12,086

Limit (cost=5.16..5.17 rows=1 width=40) (actual time=0.019..0.025 rows=1 loops=12,086)

175. 36.258 217.548 ↑ 1.0 1 12,086

Sort (cost=5.16..5.17 rows=1 width=40) (actual time=0.017..0.018 rows=1 loops=12,086)

  • Sort Key: epr1.date_created DESC
  • Sort Method: top-N heapsort Memory: 25kB
176. 60.639 181.290 ↑ 1.0 1 12,086

Nested Loop Left Join (cost=0.71..5.15 rows=1 width=40) (actual time=0.010..0.015 rows=1 loops=12,086)

177. 72.516 72.516 ↑ 1.0 1 12,086

Index Scan using idx_dno_page_reference_4 on entity_page_reference epr1 (cost=0.42..2.64 rows=1 width=12) (actual time=0.004..0.006 rows=1 loops=12,086)

  • Index Cond: ((entity_id = cd.dnoid) AND (entity_type_id = 12))
178. 48.135 48.135 ↑ 1.0 1 16,045

Index Scan using idx_contract_document_id_headerversion on contract_document cdoc (cost=0.29..2.51 rows=1 width=63) (actual time=0.002..0.003 rows=1 loops=16,045)

  • Index Cond: (id = epr1.document_id)
179. 84.602 229.634 ↑ 1.0 1 12,086

Aggregate (cost=5.17..5.19 rows=1 width=32) (actual time=0.018..0.019 rows=1 loops=12,086)

180. 52.518 145.032 ↑ 1.0 1 12,086

Nested Loop Left Join (cost=0.71..5.15 rows=1 width=70) (actual time=0.008..0.012 rows=1 loops=12,086)

181. 60.430 60.430 ↑ 1.0 1 12,086

Index Scan using idx_dno_page_reference_4 on entity_page_reference epr1_1 (cost=0.42..2.64 rows=1 width=19) (actual time=0.003..0.005 rows=1 loops=12,086)

  • Index Cond: ((entity_id = cd.id) AND (entity_type_id = 13))
182. 32.084 32.084 ↑ 1.0 1 16,042

Index Scan using idx_contract_document_id_headerversion on contract_document cdoc_1 (cost=0.29..2.51 rows=1 width=59) (actual time=0.002..0.002 rows=1 loops=16,042)

  • Index Cond: (id = epr1_1.document_id)
183. 72.516 338.408 ↑ 1.0 1 12,086

Aggregate (cost=8.20..8.22 rows=1 width=32) (actual time=0.028..0.028 rows=1 loops=12,086)

184. 60.546 265.892 ↑ 2.0 1 12,086

Nested Loop (cost=3.57..8.20 rows=2 width=12) (actual time=0.016..0.022 rows=1 loops=12,086)

185. 36.258 169.204 ↑ 2.0 1 12,086

Unique (cost=3.43..3.44 rows=2 width=4) (actual time=0.011..0.014 rows=1 loops=12,086)

186. 60.430 132.946 ↑ 2.0 1 12,086

Sort (cost=3.43..3.43 rows=2 width=4) (actual time=0.010..0.011 rows=1 loops=12,086)

  • Sort Key: link_entity_country.country_id
  • Sort Method: quicksort Memory: 25kB
187. 72.516 72.516 ↑ 2.0 1 12,086

Index Scan using idx_link_entity_country_3 on link_entity_country (cost=0.43..3.42 rows=2 width=4) (actual time=0.005..0.006 rows=1 loops=12,086)

  • Index Cond: ((entity_id = cd.id) AND (entity_type_id = 13))
  • Filter: global
188. 36.142 36.142 ↑ 1.0 1 18,071

Index Scan using pk_delivery_country on delivery_country (cost=0.15..2.37 rows=1 width=16) (actual time=0.002..0.002 rows=1 loops=18,071)

  • Index Cond: (id = link_entity_country.country_id)
189. 36.258 108.774 ↑ 1.0 1 12,086

Aggregate (cost=5.81..5.83 rows=1 width=32) (actual time=0.009..0.009 rows=1 loops=12,086)

190. 12.086 72.516 ↓ 0.0 0 12,086

Nested Loop (cost=3.57..5.81 rows=1 width=12) (actual time=0.006..0.006 rows=0 loops=12,086)

191. 24.172 60.430 ↓ 0.0 0 12,086

HashAggregate (cost=3.42..3.43 rows=1 width=4) (actual time=0.005..0.005 rows=0 loops=12,086)

  • Group Key: link_entity_country_1.country_id
192. 36.258 36.258 ↓ 0.0 0 12,086

Index Scan using idx_link_entity_country_3 on link_entity_country link_entity_country_1 (cost=0.43..3.42 rows=1 width=4) (actual time=0.003..0.003 rows=0 loops=12,086)

  • Index Cond: ((entity_id = cd.id) AND (entity_type_id = 13))
  • Filter: (NOT global)
  • Rows Removed by Filter: 1
193. 0.000 0.000 ↓ 0.0 0

Index Scan using pk_delivery_country on delivery_country delivery_country_1 (cost=0.15..2.37 rows=1 width=16) (never executed)

  • Index Cond: (id = link_entity_country_1.country_id)
194. 48.344 205.462 ↑ 1.0 1 12,086

Aggregate (cost=5.04..5.05 rows=1 width=32) (actual time=0.017..0.017 rows=1 loops=12,086)

195. 37.590 157.118 ↑ 1.0 1 12,086

Nested Loop (cost=2.79..5.04 rows=1 width=12) (actual time=0.011..0.013 rows=1 loops=12,086)

196. 48.344 96.688 ↑ 1.0 1 12,086

HashAggregate (cost=2.65..2.66 rows=1 width=4) (actual time=0.007..0.008 rows=1 loops=12,086)

  • Group Key: link_entity_delivery_country.country_id
197. 48.344 48.344 ↑ 1.0 1 12,086

Index Scan using idx_link_entity_delivery_country_6 on link_entity_delivery_country (cost=0.42..2.64 rows=1 width=4) (actual time=0.004..0.004 rows=1 loops=12,086)

  • Index Cond: ((entity_id = cd.id) AND (entity_type_id = 13))
198. 22.840 22.840 ↑ 1.0 1 11,420

Index Scan using pk_delivery_country on delivery_country delivery_country_2 (cost=0.15..2.37 rows=1 width=16) (actual time=0.002..0.002 rows=1 loops=11,420)

  • Index Cond: (id = link_entity_delivery_country.country_id)
199. 60.430 217.548 ↑ 1.0 1 12,086

Aggregate (cost=4.09..4.10 rows=1 width=32) (actual time=0.017..0.018 rows=1 loops=12,086)

200. 53.123 157.118 ↑ 1.0 1 12,086

Nested Loop (cost=1.83..4.06 rows=1 width=66) (actual time=0.011..0.013 rows=1 loops=12,086)

201. 36.258 72.516 ↑ 1.0 1 12,086

HashAggregate (cost=1.41..1.42 rows=1 width=4) (actual time=0.006..0.006 rows=1 loops=12,086)

  • Group Key: child_dno_contract_entity_link.contract_entity_id
202. 36.258 36.258 ↑ 1.0 1 12,086

Index Only Scan using idx_child_dno_contract_entity_link_4 on child_dno_contract_entity_link (cost=0.29..1.41 rows=1 width=4) (actual time=0.002..0.003 rows=1 loops=12,086)

  • Index Cond: (child_dno_id = cd.id)
  • Heap Fetches: 52
203. 31.479 31.479 ↑ 1.0 1 10,493

Index Scan using idx_contract_entity_2 on contract_entity (cost=0.42..2.64 rows=1 width=66) (actual time=0.003..0.003 rows=1 loops=10,493)

  • Index Cond: ((id = child_dno_contract_entity_link.contract_entity_id) AND (contract_entity_type = 2))
Planning time : 35.092 ms
Execution time : 10,052.666 ms