explain.depesz.com

PostgreSQL's explain analyze made readable

Result: XXJ8W

Settings
# exclusive inclusive rows x rows loops node
1. 262.800 6,799.875 ↓ 1.3 3,733 1

Result (cost=325,259.06..429,503.89 rows=2,949 width=2,535) (actual time=6,097.496..6,799.875 rows=3,733 loops=1)

2. 16.608 6,100.314 ↓ 1.3 3,733 1

Sort (cost=325,259.06..325,266.43 rows=2,949 width=2,347) (actual time=6,097.152..6,100.314 rows=3,733 loops=1)

  • Sort Key: cd.status_id
  • Sort Method: quicksort Memory: 9,956kB
3. 25.569 6,083.706 ↓ 1.3 3,733 1

GroupAggregate (cost=323,850.53..325,089.11 rows=2,949 width=2,347) (actual time=6,055.506..6,083.706 rows=3,733 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, aj_localregion.contractregions, (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
4. 18.877 6,058.137 ↓ 1.3 3,895 1

Sort (cost=323,850.53..323,857.90 rows=2,949 width=1,611) (actual time=6,055.467..6,058.137 rows=3,895 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, aj_localregion.contractregions, (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: 6,968kB
5. 195.976 6,039.260 ↓ 1.3 3,895 1

Nested Loop Left Join (cost=292,545.74..323,680.58 rows=2,949 width=1,611) (actual time=4,204.334..6,039.260 rows=3,895 loops=1)

6. 8.295 5,831.599 ↓ 1.3 3,895 1

Merge Left Join (cost=292,545.45..321,654.14 rows=2,949 width=1,577) (actual time=4,204.161..5,831.599 rows=3,895 loops=1)

  • Merge Cond: (cd.id = leccc.entity_id)
7. 30.359 5,813.164 ↓ 1.3 3,895 1

Merge Left Join (cost=292,211.58..321,266.28 rows=2,949 width=1,545) (actual time=4,198.820..5,813.164 rows=3,895 loops=1)

  • Merge Cond: (cd.id = lecicp.entity_id)
8. 29.952 5,528.700 ↓ 1.3 3,895 1

Merge Left Join (cost=286,200.98..313,974.81 rows=2,949 width=1,513) (actual time=4,005.694..5,528.700 rows=3,895 loops=1)

  • Merge Cond: (cd.id = lecm.entity_id)
9. 30.107 5,262.396 ↓ 1.3 3,895 1

Merge Left Join (cost=280,652.66..307,226.20 rows=2,949 width=1,481) (actual time=3,826.827..5,262.396 rows=3,895 loops=1)

  • Merge Cond: (cd.id = lech.entity_id)
10. 10.312 4,996.886 ↓ 1.3 3,895 1

Merge Left Join (cost=275,326.63..300,653.84 rows=2,949 width=1,449) (actual time=3,648.980..4,996.886 rows=3,895 loops=1)

  • Merge Cond: (cd.id = lecc.entity_id)
11. 39.440 4,943.409 ↓ 1.3 3,895 1

Merge Left Join (cost=274,376.38..299,451.88 rows=2,949 width=1,417) (actual time=3,626.282..4,943.409 rows=3,895 loops=1)

  • Merge Cond: (cd.id = leicp.entity_id)
12. 39.643 4,553.769 ↓ 1.3 3,895 1

Merge Left Join (cost=265,172.75..288,464.67 rows=2,949 width=1,385) (actual time=3,357.054..4,553.769 rows=3,895 loops=1)

  • Merge Cond: (cd.id = lem.entity_id)
13. 39.723 4,164.940 ↓ 1.3 3,895 1

Merge Left Join (cost=256,330.38..277,889.99 rows=2,949 width=1,353) (actual time=3,086.852..4,164.940 rows=3,895 loops=1)

  • Merge Cond: (cd.id = leh.entity_id)
14. 36.214 3,794.670 ↓ 1.3 3,895 1

Merge Left Join (cost=248,531.52..268,350.38 rows=2,949 width=1,321) (actual time=2,828.994..3,794.670 rows=3,895 loops=1)

  • Merge Cond: (cd.id = lepl.entity_id)
15. 35.598 3,441.631 ↓ 1.3 3,895 1

Merge Left Join (cost=248,531.10..262,939.72 rows=2,949 width=1,289) (actual time=2,636.437..3,441.631 rows=3,895 loops=1)

  • Merge Cond: (cd.id = lei.entity_id)
16. 34.874 3,134.410 ↓ 1.3 3,895 1

Merge Left Join (cost=244,177.24..257,084.59 rows=2,949 width=1,257) (actual time=2,414.795..3,134.410 rows=3,895 loops=1)

  • Merge Cond: (cd.id = lcp.entity_id)
17. 10.565 2,806.903 ↓ 1.3 3,895 1

Nested Loop Left Join (cost=233,050.60..244,402.39 rows=2,949 width=1,225) (actual time=2,168.486..2,806.903 rows=3,895 loops=1)

18. 12.032 2,788.548 ↓ 1.3 3,895 1

Nested Loop Left Join (cost=233,050.46..243,946.71 rows=2,949 width=1,223) (actual time=2,168.473..2,788.548 rows=3,895 loops=1)

19. 11.894 2,768.726 ↓ 1.3 3,895 1

Nested Loop Left Join (cost=233,050.32..243,429.18 rows=2,949 width=1,216) (actual time=2,168.457..2,768.726 rows=3,895 loops=1)

20. 9.565 2,749.042 ↓ 1.3 3,895 1

Nested Loop Left Join (cost=233,050.17..242,911.53 rows=2,949 width=1,205) (actual time=2,168.443..2,749.042 rows=3,895 loops=1)

  • Join Filter: ((lcop.client_id = cd.client_id) AND (cd.phase_id = lcop.id))
  • Rows Removed by Join Filter: 819
21. 12.413 2,735.582 ↓ 1.3 3,895 1

Nested Loop Left Join (cost=233,050.17..242,610.64 rows=2,949 width=1,194) (actual time=2,168.428..2,735.582 rows=3,895 loops=1)

  • Join Filter: ((lcpt.client_id = cd.client_id) AND (lcpt.id = cd.type))
  • Rows Removed by Join Filter: 2,974
22. 17.177 2,719.274 ↓ 1.3 3,895 1

Nested Loop Left Join (cost=233,050.17..242,460.18 rows=2,949 width=1,187) (actual time=2,168.413..2,719.274 rows=3,895 loops=1)

  • Join Filter: ((rcl.client_id = cd.client_id) AND (res.id = rcl.responsibility_id))
  • Rows Removed by Join Filter: 7,790
23. 11.737 2,690.412 ↓ 1.3 3,895 1

Nested Loop Left Join (cost=233,050.17..242,304.27 rows=2,949 width=1,168) (actual time=2,168.392..2,690.412 rows=3,895 loops=1)

  • Join Filter: (res.id = cd.responsibility_id)
  • Rows Removed by Join Filter: 4,900
24. 10.296 2,670.885 ↓ 1.3 3,895 1

Nested Loop Left Join (cost=233,050.17..242,192.40 rows=2,949 width=1,155) (actual time=2,168.366..2,670.885 rows=3,895 loops=1)

25. 12.139 2,652.799 ↓ 1.3 3,895 1

Nested Loop Left Join (cost=233,049.89..241,318.95 rows=2,949 width=1,131) (actual time=2,168.355..2,652.799 rows=3,895 loops=1)

26. 48.163 2,628.975 ↓ 1.3 3,895 1

Merge Left Join (cost=233,049.62..240,439.63 rows=2,949 width=1,111) (actual time=2,168.327..2,628.975 rows=3,895 loops=1)

  • Merge Cond: (cd.id = ller_1.entity_id)
27. 49.203 2,124.724 ↓ 1.4 3,895 1

Merge Left Join (cost=217,725.16..222,671.42 rows=2,811 width=1,079) (actual time=1,787.655..2,124.724 rows=3,895 loops=1)

  • Merge Cond: (cd.id = les.entity_id)
28. 52.037 1,394.098 ↓ 1.4 3,895 1

Merge Left Join (cost=85,103.56..87,433.34 rows=2,811 width=1,047) (actual time=1,244.714..1,394.098 rows=3,895 loops=1)

  • Merge Cond: (cd.id = lef.entity_id)
29. 10.226 883.305 ↓ 1.4 3,895 1

Sort (cost=42,794.40..42,801.43 rows=2,811 width=1,015) (actual time=879.860..883.305 rows=3,895 loops=1)

  • Sort Key: cd.id
  • Sort Method: quicksort Memory: 5,516kB
30. 21.864 873.079 ↓ 1.4 3,895 1

Merge Right Join (cost=40,269.17..42,633.37 rows=2,811 width=1,015) (actual time=736.113..873.079 rows=3,895 loops=1)

  • Merge Cond: (epr_cp.entity_id = cd.dnoid)
31. 95.403 235.672 ↑ 2.1 21,774 1

GroupAggregate (cost=15,043.04..16,794.76 rows=45,625 width=72) (actual time=121.982..235.672 rows=21,774 loops=1)

  • Group Key: epr_cp.entity_id, epr_cp.document_id
32. 63.525 140.269 ↑ 1.8 26,861 1

Sort (cost=15,043.04..15,165.26 rows=48,888 width=23) (actual time=121.948..140.269 rows=26,861 loops=1)

  • Sort Key: epr_cp.entity_id, epr_cp.document_id
  • Sort Method: quicksort Memory: 4,752kB
33. 76.744 76.744 ↓ 1.0 48,970 1

Seq Scan on entity_page_reference epr_cp (cost=0.00..11,235.35 rows=48,888 width=23) (actual time=0.012..76.744 rows=48,970 loops=1)

  • Filter: (entity_type_id = 12)
  • Rows Removed by Filter: 283,298
34. 12.906 615.543 ↓ 9.8 3,895 1

Sort (cost=25,226.13..25,227.13 rows=398 width=947) (actual time=612.820..615.543 rows=3,895 loops=1)

  • Sort Key: cd.dnoid
  • Sort Method: quicksort Memory: 5,109kB
35. 10.080 602.637 ↓ 9.4 3,733 1

Nested Loop Left Join (cost=9,092.63..25,208.95 rows=398 width=947) (actual time=89.186..602.637 rows=3,733 loops=1)

36. 6.643 581.358 ↓ 9.4 3,733 1

Hash Left Join (cost=9,092.21..24,647.24 rows=398 width=927) (actual time=89.169..581.358 rows=3,733 loops=1)

  • Hash Cond: (cd.priority_id = pt.id)
37. 7.044 574.698 ↓ 9.4 3,733 1

Hash Left Join (cost=9,091.10..24,644.36 rows=398 width=922) (actual time=89.143..574.698 rows=3,733 loops=1)

  • Hash Cond: (cd.id = aj_localregion.entity_id)
38. 61.523 535.246 ↓ 9.4 3,733 1

Nested Loop Left Join (cost=3.50..15,555.72 rows=398 width=890) (actual time=56.724..535.246 rows=3,733 loops=1)

  • Join Filter: ((f.client_id = cd.client_id) AND (f.frequency_id = cd.frequency_id))
  • Rows Removed by Join Filter: 70,927
39. 9.813 425.194 ↓ 10.9 3,733 1

Nested Loop Left Join (cost=3.50..15,434.55 rows=341 width=880) (actual time=56.670..425.194 rows=3,733 loops=1)

40. 9.624 407.915 ↓ 10.9 3,733 1

Nested Loop Left Join (cost=3.35..15,379.09 rows=341 width=880) (actual time=56.658..407.915 rows=3,733 loops=1)

41. 9.568 390.825 ↓ 10.9 3,733 1

Nested Loop Left Join (cost=3.21..15,322.69 rows=341 width=865) (actual time=56.646..390.825 rows=3,733 loops=1)

42. 10.485 370.058 ↓ 10.9 3,733 1

Nested Loop Left Join (cost=2.79..14,964.94 rows=341 width=841) (actual time=56.632..370.058 rows=3,733 loops=1)

43. 13.685 348.374 ↓ 10.9 3,733 1

Nested Loop (cost=2.50..14,648.32 rows=341 width=796) (actual time=56.615..348.374 rows=3,733 loops=1)

44. 274.228 316.873 ↓ 1.9 4,454 1

Hash Left Join (cost=2.21..13,228.71 rows=2,336 width=747) (actual time=56.594..316.873 rows=4,454 loops=1)

  • Hash Cond: (cd.time_zone_id = tz.id)
  • Filter: ((cd.due_date >= change_tz('2019-08-01 05:30:00+05:30'::timestamp with time zone, tz.time_zone, 'UTC'::character varying)) AND (cd.due_date <= change_tz('2020-09-02 05:29:59+05:30'::timestamp with time zone, tz.time_zone, 'UTC'::character varying)))
  • Rows Removed by Filter: 13,857
45. 42.574 42.574 ↑ 1.1 18,311 1

Index Scan using cdno_deleted_ix on child_dno cd (cost=0.29..12,906.82 rows=21,028 width=735) (actual time=0.024..42.574 rows=18,311 loops=1)

  • Index Cond: (client_id = 1,002)
  • Filter: (status_id = ANY ('{1626,1627,1628,1629,1630,2,4,21}'::integer[]))
  • Rows Removed by Filter: 2,822
46. 0.034 0.071 ↑ 1.0 41 1

Hash (cost=1.41..1.41 rows=41 width=20) (actual time=0.070..0.071 rows=41 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 11kB
47. 0.037 0.037 ↑ 1.0 41 1

Seq Scan on time_zone tz (cost=0.00..1.41 rows=41 width=20) (actual time=0.008..0.037 rows=41 loops=1)

48. 17.816 17.816 ↑ 1.0 1 4,454

Index Scan using dno_deleted_ix on dno (cost=0.29..0.61 rows=1 width=49) (actual time=0.004..0.004 rows=1 loops=4,454)

  • Index Cond: (id = cd.dnoid)
  • Filter: (status_id = ANY ('{5}'::integer[]))
  • Rows Removed by Filter: 0
49. 11.199 11.199 ↑ 1.0 1 3,733

Index Scan using pk_contract on contract cntrct (cost=0.29..0.93 rows=1 width=49) (actual time=0.003..0.003 rows=1 loops=3,733)

  • Index Cond: (id = dno.contract_id)
50. 11.199 11.199 ↑ 1.0 1 3,733

Index Scan using pk_relation on relation rl (cost=0.42..1.05 rows=1 width=28) (actual time=0.003..0.003 rows=1 loops=3,733)

  • Index Cond: (cd.relation_id = id)
51. 7.466 7.466 ↑ 1.0 1 3,733

Index Scan using pk_entity_type on entity_type dtc (cost=0.15..0.17 rows=1 width=23) (actual time=0.002..0.002 rows=1 loops=3,733)

  • Index Cond: (id = cntrct.document_type_id)
52. 7.466 7.466 ↑ 1.0 1 3,733

Index Scan using pk_currency on currency cy (cost=0.14..0.16 rows=1 width=8) (actual time=0.002..0.002 rows=1 loops=3,733)

  • Index Cond: (id = cd.currency_id)
53. 48.502 48.529 ↑ 1.0 20 3,733

Materialize (cost=0.00..1.86 rows=20 width=22) (actual time=0.001..0.013 rows=20 loops=3,733)

54. 0.027 0.027 ↑ 1.0 20 1

Seq Scan on link_client_frequency f (cost=0.00..1.76 rows=20 width=22) (actual time=0.008..0.027 rows=20 loops=1)

  • Filter: (client_id = 1,002)
  • Rows Removed by Filter: 41
55. 0.757 32.408 ↓ 7.6 982 1

Hash (cost=9,085.97..9,085.97 rows=130 width=36) (actual time=32.407..32.408 rows=982 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 51kB
56. 1.256 31.651 ↓ 7.6 982 1

Subquery Scan on aj_localregion (cost=9,081.75..9,085.97 rows=130 width=36) (actual time=26.991..31.651 rows=982 loops=1)

57. 2.788 30.395 ↓ 7.6 982 1

GroupAggregate (cost=9,081.75..9,084.67 rows=130 width=36) (actual time=26.989..30.395 rows=982 loops=1)

  • Group Key: ller.entity_id
58. 1.399 27.607 ↓ 7.6 982 1

Sort (cost=9,081.75..9,082.07 rows=130 width=12) (actual time=26.971..27.607 rows=982 loops=1)

  • Sort Key: ller.entity_id
  • Sort Method: quicksort Memory: 71kB
59. 5.041 26.208 ↓ 7.6 982 1

Nested Loop Left Join (cost=0.43..9,077.18 rows=130 width=12) (actual time=1.912..26.208 rows=982 loops=1)

  • Join Filter: (rg.id = ller.region_id)
  • Rows Removed by Join Filter: 5,037
60. 17.239 17.239 ↓ 7.6 982 1

Index Scan using idx_link_entity_region_5 on link_entity_region ller (cost=0.43..9,036.69 rows=130 width=8) (actual time=1.894..17.239 rows=982 loops=1)

  • Index Cond: (entity_type_id = 13)
  • Filter: (NOT global)
  • Rows Removed by Filter: 71,902
61. 3.915 3.928 ↑ 3.5 6 982

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

62. 0.013 0.013 ↑ 1.9 11 1

Seq Scan on region rg (cost=0.00..1.21 rows=21 width=12) (actual time=0.005..0.013 rows=11 loops=1)

63. 0.007 0.017 ↑ 1.0 5 1

Hash (cost=1.05..1.05 rows=5 width=9) (actual time=0.016..0.017 rows=5 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
64. 0.010 0.010 ↑ 1.0 5 1

Seq Scan on priority_table pt (cost=0.00..1.05 rows=5 width=9) (actual time=0.006..0.010 rows=5 loops=1)

65. 11.199 11.199 ↑ 1.0 1 3,733

Index Scan using pk_vendor on vendor vn (cost=0.42..1.41 rows=1 width=28) (actual time=0.003..0.003 rows=1 loops=3,733)

  • Index Cond: (id = cd.vendor_id)
66. 187.874 458.756 ↓ 1.0 63,842 1

GroupAggregate (cost=42,309.16..43,801.56 rows=63,631 width=36) (actual time=222.019..458.756 rows=63,842 loops=1)

  • Group Key: lef.entity_id
67. 110.421 270.882 ↑ 1.0 71,317 1

Sort (cost=42,309.16..42,488.47 rows=71,725 width=18) (actual time=221.992..270.882 rows=71,317 loops=1)

  • Sort Key: lef.entity_id
  • Sort Method: quicksort Memory: 7,031kB
68. 99.047 160.461 ↑ 1.0 71,482 1

Hash Left Join (cost=2.55..36,524.47 rows=71,725 width=18) (actual time=0.125..160.461 rows=71,482 loops=1)

  • Hash Cond: (lef.function_id = ct.id)
69. 61.328 61.328 ↑ 1.0 71,482 1

Index Scan using idx_link_entity_function_4 on link_entity_function lef (cost=0.43..36,318.11 rows=71,725 width=8) (actual time=0.029..61.328 rows=71,482 loops=1)

  • Index Cond: (entity_type_id = 13)
70. 0.040 0.086 ↑ 1.0 50 1

Hash (cost=1.50..1.50 rows=50 width=18) (actual time=0.085..0.086 rows=50 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 11kB
71. 0.046 0.046 ↑ 1.0 50 1

Seq Scan on contract_type ct (cost=0.00..1.50 rows=50 width=18) (actual time=0.011..0.046 rows=50 loops=1)

72. 249.024 681.423 ↓ 1.1 63,842 1

GroupAggregate (cost=132,621.61..134,505.36 rows=56,085 width=36) (actual time=354.299..681.423 rows=63,842 loops=1)

  • Group Key: les.entity_id
73. 174.724 432.399 ↑ 1.2 116,439 1

Sort (cost=132,621.61..132,969.10 rows=138,997 width=37) (actual time=354.271..432.399 rows=116,439 loops=1)

  • Sort Key: les.entity_id
  • Sort Method: quicksort Memory: 11,627kB
74. 161.129 257.675 ↑ 1.2 116,648 1

Hash Left Join (cost=1,540.10..120,748.00 rows=138,997 width=37) (actual time=7.765..257.675 rows=116,648 loops=1)

  • Hash Cond: (les.service_id = cst.id)
75. 89.506 94.989 ↑ 1.2 116,648 1

Bitmap Heap Scan on link_entity_service les (cost=1,501.16..120,342.74 rows=138,997 width=8) (actual time=6.197..94.989 rows=116,648 loops=1)

  • Recheck Cond: (entity_type_id = 13)
  • Heap Blocks: exact=5,306
76. 5.483 5.483 ↑ 1.2 116,648 1

Bitmap Index Scan on idx_link_entity_service_5 (cost=0.00..1,466.41 rows=138,997 width=0) (actual time=5.482..5.483 rows=116,648 loops=1)

  • Index Cond: (entity_type_id = 13)
77. 0.789 1.557 ↑ 1.0 1,064 1

Hash (cost=25.64..25.64 rows=1,064 width=37) (actual time=1.557..1.557 rows=1,064 loops=1)

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

Seq Scan on contract_sub_type cst (cost=0.00..25.64 rows=1,064 width=37) (actual time=0.011..0.768 rows=1,064 loops=1)

79. 185.970 456.088 ↑ 1.1 62,900 1

GroupAggregate (cost=15,324.45..16,892.31 rows=67,151 width=36) (actual time=221.086..456.088 rows=62,900 loops=1)

  • Group Key: ller_1.entity_id
80. 109.924 270.118 ↑ 1.0 71,737 1

Sort (cost=15,324.45..15,511.32 rows=74,745 width=12) (actual time=221.059..270.118 rows=71,737 loops=1)

  • Sort Key: ller_1.entity_id
  • Sort Method: quicksort Memory: 6,443kB
81. 96.320 160.194 ↑ 1.0 71,902 1

Hash Left Join (cost=1.90..9,273.96 rows=74,745 width=12) (actual time=0.088..160.194 rows=71,902 loops=1)

  • Hash Cond: (ller_1.region_id = rg_1.id)
82. 63.829 63.829 ↑ 1.0 71,902 1

Index Scan using idx_link_entity_region_5 on link_entity_region ller_1 (cost=0.43..9,036.69 rows=74,745 width=8) (actual time=0.028..63.829 rows=71,902 loops=1)

  • Index Cond: (entity_type_id = 13)
  • Filter: global
  • Rows Removed by Filter: 982
83. 0.021 0.045 ↑ 1.0 21 1

Hash (cost=1.21..1.21 rows=21 width=12) (actual time=0.045..0.045 rows=21 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
84. 0.024 0.024 ↑ 1.0 21 1

Seq Scan on region rg_1 (cost=0.00..1.21 rows=21 width=12) (actual time=0.009..0.024 rows=21 loops=1)

85. 11.685 11.685 ↑ 1.0 1 3,895

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=3,895)

  • Index Cond: (id = dno.status_id)
86. 7.790 7.790 ↑ 1.0 1 3,895

Index Scan using pk_work_flow_status on work_flow_status ets1 (cost=0.28..0.30 rows=1 width=24) (actual time=0.002..0.002 rows=1 loops=3,895)

  • Index Cond: (id = cd.status_id)
87. 7.778 7.790 ↑ 1.5 2 3,895

Materialize (cost=0.00..1.04 rows=3 width=17) (actual time=0.001..0.002 rows=2 loops=3,895)

88. 0.012 0.012 ↑ 1.0 3 1

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

89. 11.674 11.685 ↑ 1.0 3 3,895

Materialize (cost=0.00..1.09 rows=3 width=27) (actual time=0.001..0.003 rows=3 loops=3,895)

90. 0.011 0.011 ↑ 1.0 3 1

Seq Scan on responsibility_client_link rcl (cost=0.00..1.07 rows=3 width=27) (actual time=0.006..0.011 rows=3 loops=1)

  • Filter: (client_id = 1,002)
  • Rows Removed by Filter: 3
91. 3.885 3.895 ↑ 1.5 2 3,895

Materialize (cost=0.00..1.19 rows=3 width=19) (actual time=0.001..0.001 rows=2 loops=3,895)

92. 0.010 0.010 ↑ 1.0 3 1

Seq Scan on link_client_performance_type lcpt (cost=0.00..1.18 rows=3 width=19) (actual time=0.007..0.010 rows=3 loops=1)

  • Filter: (client_id = 1,002)
  • Rows Removed by Filter: 4
93. 3.882 3.895 ↑ 6.0 1 3,895

Materialize (cost=0.00..1.30 rows=6 width=19) (actual time=0.001..0.001 rows=1 loops=3,895)

94. 0.013 0.013 ↑ 1.0 6 1

Seq Scan on link_client_obligation_phase lcop (cost=0.00..1.27 rows=6 width=19) (actual time=0.007..0.013 rows=6 loops=1)

  • Filter: (client_id = 1,002)
  • Rows Removed by Filter: 7
95. 7.790 7.790 ↑ 1.0 1 3,895

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=3,895)

  • Index Cond: (dno.dno_type_id = id)
  • Filter: (client_id = dno.client_id)
96. 7.790 7.790 ↑ 1.0 1 3,895

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=3,895)

  • Index Cond: (dno.dno_sub_type_id = id)
  • Filter: (client_id = dno.client_id)
97. 7.790 7.790 ↑ 1.0 1 3,895

Index Scan using pk_tier on tier (cost=0.14..0.16 rows=1 width=10) (actual time=0.002..0.002 rows=1 loops=3,895)

  • Index Cond: (cd.tier_id = id)
98. 118.742 292.633 ↑ 1.0 41,760 1

GroupAggregate (cost=11,126.64..12,111.89 rows=43,435 width=36) (actual time=145.035..292.633 rows=41,760 loops=1)

  • Group Key: lcp.entity_id
99. 61.447 173.891 ↑ 1.0 43,843 1

Sort (cost=11,126.64..11,237.88 rows=44,497 width=22) (actual time=145.013..173.891 rows=43,843 loops=1)

  • Sort Key: lcp.entity_id
  • Sort Method: quicksort Memory: 4,670kB
100. 62.424 112.444 ↑ 1.0 43,890 1

Hash Left Join (cost=4.76..7,691.15 rows=44,497 width=22) (actual time=0.247..112.444 rows=43,890 loops=1)

  • Hash Cond: (lcp.project_id = pr.id)
101. 49.851 49.851 ↑ 1.0 43,890 1

Index Scan using idx_link_contract_project_4 on link_entity_project lcp (cost=0.42..7,565.24 rows=44,497 width=8) (actual time=0.065..49.851 rows=43,890 loops=1)

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

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

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

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

104. 122.400 271.623 ↓ 1.0 43,237 1

GroupAggregate (cost=4,353.86..5,304.00 rows=41,954 width=36) (actual time=120.638..271.623 rows=43,237 loops=1)

  • Group Key: lei.entity_id
105. 60.109 149.223 ↓ 1.0 43,243 1

Sort (cost=4,353.86..4,460.80 rows=42,777 width=19) (actual time=120.614..149.223 rows=43,243 loops=1)

  • Sort Key: lei.entity_id
  • Sort Method: quicksort Memory: 4,582kB
106. 58.232 89.114 ↓ 1.0 43,376 1

Hash Left Join (cost=2.95..1,063.34 rows=42,777 width=19) (actual time=0.137..89.114 rows=43,376 loops=1)

  • Hash Cond: (lei.initiative_id = i.id)
107. 30.772 30.772 ↓ 1.0 43,376 1

Index Only Scan using idx_link_entity_initiative_4 on link_entity_initiative lei (cost=0.42..941.52 rows=42,777 width=8) (actual time=0.014..30.772 rows=43,376 loops=1)

  • Index Cond: (entity_type_id = 13)
  • Heap Fetches: 0
108. 0.055 0.110 ↑ 1.0 68 1

Hash (cost=1.68..1.68 rows=68 width=19) (actual time=0.109..0.110 rows=68 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 12kB
109. 0.055 0.055 ↑ 1.0 68 1

Seq Scan on initiative i (cost=0.00..1.68 rows=68 width=19) (actual time=0.009..0.055 rows=68 loops=1)

110. 127.881 316.825 ↑ 1.0 44,187 1

GroupAggregate (cost=0.42..4,828.96 rows=44,313 width=36) (actual time=0.049..316.825 rows=44,187 loops=1)

  • Group Key: lepl.entity_id
111. 110.891 188.944 ↑ 1.0 44,188 1

Nested Loop Left Join (cost=0.42..3,938.02 rows=45,249 width=15) (actual time=0.036..188.944 rows=44,188 loops=1)

  • Join Filter: (pl.id = lepl.project_level_id)
  • Rows Removed by Join Filter: 29,867
112. 33.865 33.865 ↑ 1.0 44,188 1

Index Only Scan using idx_link_entity_project_level_6 on link_entity_project_level lepl (cost=0.42..995.78 rows=45,249 width=8) (actual time=0.018..33.865 rows=44,188 loops=1)

  • Index Cond: (entity_type_id = 13)
  • Heap Fetches: 0
113. 44.179 44.188 ↑ 2.5 2 44,188

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

114. 0.009 0.009 ↑ 2.5 2 1

Seq Scan on project_level pl (cost=0.00..1.05 rows=5 width=15) (actual time=0.008..0.009 rows=2 loops=1)

115. 139.441 330.547 ↓ 1.0 49,449 1

GroupAggregate (cost=7,798.86..8,903.29 rows=48,527 width=36) (actual time=156.467..330.547 rows=49,449 loops=1)

  • Group Key: leh.entity_id
116. 78.093 191.106 ↑ 1.0 49,626 1

Sort (cost=7,798.86..7,924.37 rows=50,203 width=11) (actual time=156.444..191.106 rows=49,626 loops=1)

  • Sort Key: leh.entity_id
  • Sort Method: quicksort Memory: 3,902kB
117. 68.793 113.013 ↑ 1.0 49,791 1

Hash Left Join (cost=1.83..3,879.14 rows=50,203 width=11) (actual time=0.075..113.013 rows=49,791 loops=1)

  • Hash Cond: (leh.hub_id = hub.id)
118. 44.180 44.180 ↑ 1.0 49,791 1

Index Scan using idx_link_entity_hub_4 on link_entity_hub leh (cost=0.42..3,714.92 rows=50,203 width=8) (actual time=0.024..44.180 rows=49,791 loops=1)

  • Index Cond: (entity_type_id = 13)
119. 0.018 0.040 ↑ 1.0 18 1

Hash (cost=1.18..1.18 rows=18 width=11) (actual time=0.039..0.040 rows=18 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
120. 0.022 0.022 ↑ 1.0 18 1

Seq Scan on hub (cost=0.00..1.18 rows=18 width=11) (actual time=0.008..0.022 rows=18 loops=1)

121. 143.690 349.186 ↓ 1.0 49,449 1

GroupAggregate (cost=8,842.37..9,951.95 rows=47,479 width=36) (actual time=168.479..349.186 rows=49,449 loops=1)

  • Group Key: lem.entity_id
122. 83.551 205.496 ↓ 1.0 53,273 1

Sort (cost=8,842.37..8,974.84 rows=52,985 width=17) (actual time=168.449..205.496 rows=53,273 loops=1)

  • Sort Key: lem.entity_id
  • Sort Method: quicksort Memory: 4,284kB
123. 73.809 121.945 ↓ 1.0 53,438 1

Hash Left Join (cost=8.67..4,684.83 rows=52,985 width=17) (actual time=0.389..121.945 rows=53,438 loops=1)

  • Hash Cond: (lem.market_id = mkt.id)
124. 47.786 47.786 ↓ 1.0 53,438 1

Index Scan using idx_link_entity_market_4 on link_entity_market lem (cost=0.42..4,534.97 rows=52,985 width=8) (actual time=0.025..47.786 rows=53,438 loops=1)

  • Index Cond: (entity_type_id = 13)
125. 0.175 0.350 ↑ 1.0 233 1

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

  • Buckets: 1,024 Batches: 1 Memory Usage: 20kB
126. 0.175 0.175 ↑ 1.0 233 1

Seq Scan on market mkt (cost=0.00..5.33 rows=233 width=17) (actual time=0.010..0.175 rows=233 loops=1)

127. 141.416 350.200 ↓ 1.0 49,449 1

GroupAggregate (cost=9,203.63..10,348.02 rows=48,749 width=36) (actual time=171.337..350.200 rows=49,449 loops=1)

  • Group Key: leicp.entity_id
128. 85.200 208.784 ↑ 1.0 53,661 1

Sort (cost=9,203.63..9,341.35 rows=55,088 width=33) (actual time=171.314..208.784 rows=53,661 loops=1)

  • Sort Key: leicp.entity_id
  • Sort Method: quicksort Memory: 5,812kB
129. 74.712 123.584 ↑ 1.0 53,826 1

Hash Left Join (cost=31.15..4,865.60 rows=55,088 width=33) (actual time=1.249..123.584 rows=53,826 loops=1)

  • Hash Cond: (leicp.icp_id = icp.id)
130. 47.658 47.658 ↑ 1.0 53,826 1

Index Scan using idx_link_entity_icp_4 on link_entity_icp leicp (cost=0.42..4,689.54 rows=55,088 width=8) (actual time=0.024..47.658 rows=53,826 loops=1)

  • Index Cond: (entity_type_id = 13)
131. 0.612 1.214 ↑ 1.0 832 1

Hash (cost=20.32..20.32 rows=832 width=33) (actual time=1.213..1.214 rows=832 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 63kB
132. 0.602 0.602 ↑ 1.0 832 1

Seq Scan on internal_contracting_party icp (cost=0.00..20.32 rows=832 width=33) (actual time=0.009..0.602 rows=832 loops=1)

133. 15.626 43.165 ↑ 1.5 4,493 1

GroupAggregate (cost=950.25..1,106.31 rows=6,811 width=36) (actual time=22.691..43.165 rows=4,493 loops=1)

  • Group Key: lecc.entity_id
134. 10.603 27.539 ↑ 1.0 7,181 1

Sort (cost=950.25..968.21 rows=7,186 width=9) (actual time=22.676..27.539 rows=7,181 loops=1)

  • Sort Key: lecc.entity_id
  • Sort Method: quicksort Memory: 529kB
135. 9.955 16.936 ↑ 1.0 7,186 1

Hash Left Join (cost=123.16..489.95 rows=7,186 width=9) (actual time=1.564..16.936 rows=7,186 loops=1)

  • Hash Cond: (lecc.company_code_id = cc.id)
136. 5.460 5.847 ↑ 1.0 7,186 1

Bitmap Heap Scan on link_entity_company_code lecc (cost=96.68..444.50 rows=7,186 width=8) (actual time=0.419..5.847 rows=7,186 loops=1)

  • Recheck Cond: (entity_type_id = 13)
  • Heap Blocks: exact=246
137. 0.387 0.387 ↓ 1.0 7,187 1

Bitmap Index Scan on idx_link_entity_company_code_2 (cost=0.00..94.88 rows=7,186 width=0) (actual time=0.387..0.387 rows=7,187 loops=1)

  • Index Cond: (entity_type_id = 13)
138. 0.564 1.134 ↑ 1.0 777 1

Hash (cost=16.77..16.77 rows=777 width=9) (actual time=1.133..1.134 rows=777 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 42kB
139. 0.570 0.570 ↑ 1.0 777 1

Seq Scan on company_code cc (cost=0.00..16.77 rows=777 width=9) (actual time=0.011..0.570 rows=777 loops=1)

140. 98.840 235.403 ↓ 1.0 34,864 1

GroupAggregate (cost=5,326.03..6,113.95 rows=34,801 width=36) (actual time=111.602..235.403 rows=34,864 loops=1)

  • Group Key: lech.entity_id
141. 56.279 136.563 ↑ 1.0 35,428 1

Sort (cost=5,326.03..5,414.67 rows=35,453 width=11) (actual time=111.576..136.563 rows=35,428 loops=1)

  • Sort Key: lech.entity_id
  • Sort Method: quicksort Memory: 3,234kB
142. 49.155 80.284 ↓ 1.0 35,547 1

Hash Left Join (cost=1.83..2,646.92 rows=35,453 width=11) (actual time=0.058..80.284 rows=35,547 loops=1)

  • Hash Cond: (lech.hub_id = hub_1.id)
143. 31.094 31.094 ↓ 1.0 35,547 1

Index Scan using idx_link_entity_contracting_hub_4 on link_entity_contracting_hub lech (cost=0.42..2,530.53 rows=35,453 width=8) (actual time=0.016..31.094 rows=35,547 loops=1)

  • Index Cond: (entity_type_id = 13)
144. 0.016 0.035 ↑ 1.0 18 1

Hash (cost=1.18..1.18 rows=18 width=11) (actual time=0.034..0.035 rows=18 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
145. 0.019 0.019 ↑ 1.0 18 1

Seq Scan on hub hub_1 (cost=0.00..1.18 rows=18 width=11) (actual time=0.006..0.019 rows=18 loops=1)

146. 98.997 236.352 ↓ 1.1 34,864 1

GroupAggregate (cost=5,548.32..6,310.96 rows=33,198 width=36) (actual time=112.619..236.352 rows=34,864 loops=1)

  • Group Key: lecm.entity_id
147. 56.206 137.355 ↓ 1.0 35,471 1

Sort (cost=5,548.32..5,636.54 rows=35,289 width=17) (actual time=112.595..137.355 rows=35,471 loops=1)

  • Sort Key: lecm.entity_id
  • Sort Method: quicksort Memory: 3,384kB
148. 49.123 81.149 ↓ 1.0 35,590 1

Hash Left Join (cost=8.67..2,882.78 rows=35,289 width=17) (actual time=0.387..81.149 rows=35,590 loops=1)

  • Hash Cond: (lecm.market_id = market.id)
149. 31.676 31.676 ↓ 1.0 35,590 1

Index Scan using idx_link_entity_contracting_market_4 on link_entity_contracting_market lecm (cost=0.42..2,780.22 rows=35,289 width=8) (actual time=0.024..31.676 rows=35,590 loops=1)

  • Index Cond: (entity_type_id = 13)
150. 0.175 0.350 ↑ 1.0 233 1

Hash (cost=5.33..5.33 rows=233 width=17) (actual time=0.350..0.350 rows=233 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 20kB
151. 0.175 0.175 ↑ 1.0 233 1

Seq Scan on market (cost=0.00..5.33 rows=233 width=17) (actual time=0.009..0.175 rows=233 loops=1)

152. 107.229 254.105 ↑ 1.0 34,864 1

GroupAggregate (cost=6,010.60..6,827.01 rows=35,267 width=36) (actual time=120.402..254.105 rows=34,864 loops=1)

  • Group Key: lecicp.entity_id
153. 59.980 146.876 ↑ 1.0 37,523 1

Sort (cost=6,010.60..6,106.40 rows=38,321 width=33) (actual time=120.376..146.876 rows=37,523 loops=1)

  • Sort Key: lecicp.entity_id
  • Sort Method: quicksort Memory: 4,618kB
154. 52.262 86.896 ↑ 1.0 37,642 1

Hash Left Join (cost=31.14..3,093.25 rows=38,321 width=33) (actual time=1.240..86.896 rows=37,642 loops=1)

  • Hash Cond: (lecicp.icp_id = icp_1.id)
155. 33.427 33.427 ↑ 1.0 37,642 1

Index Scan using idx_link_entity_contracting_icp_4 on link_entity_contracting_icp lecicp (cost=0.42..2,961.42 rows=38,321 width=8) (actual time=0.020..33.427 rows=37,642 loops=1)

  • Index Cond: (entity_type_id = 13)
156. 0.608 1.207 ↑ 1.0 832 1

Hash (cost=20.32..20.32 rows=832 width=33) (actual time=1.206..1.207 rows=832 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 63kB
157. 0.599 0.599 ↑ 1.0 832 1

Seq Scan on internal_contracting_party icp_1 (cost=0.00..20.32 rows=832 width=33) (actual time=0.009..0.599 rows=832 loops=1)

158. 3.833 10.140 ↑ 1.0 1,311 1

GroupAggregate (cost=333.88..363.46 rows=1,314 width=36) (actual time=5.333..10.140 rows=1,311 loops=1)

  • Group Key: leccc.entity_id
159. 2.048 6.307 ↑ 1.0 1,312 1

Sort (cost=333.88..337.17 rows=1,316 width=9) (actual time=5.320..6.307 rows=1,312 loops=1)

  • Sort Key: leccc.entity_id
  • Sort Method: quicksort Memory: 110kB
160. 1.847 4.259 ↑ 1.0 1,316 1

Hash Left Join (cost=45.77..265.70 rows=1,316 width=9) (actual time=1.245..4.259 rows=1,316 loops=1)

  • Hash Cond: (leccc.company_code_id = cc_1.id)
161. 1.203 1.288 ↑ 1.0 1,316 1

Bitmap Heap Scan on link_entity_contracting_company_code leccc (cost=19.29..235.74 rows=1,316 width=8) (actual time=0.106..1.288 rows=1,316 loops=1)

  • Recheck Cond: (entity_type_id = 13)
  • Heap Blocks: exact=158
162. 0.085 0.085 ↓ 1.0 1,317 1

Bitmap Index Scan on idx_link_entity_contracting_company_code_2 (cost=0.00..18.96 rows=1,316 width=0) (actual time=0.084..0.085 rows=1,317 loops=1)

  • Index Cond: (entity_type_id = 13)
163. 0.570 1.124 ↑ 1.0 777 1

Hash (cost=16.77..16.77 rows=777 width=9) (actual time=1.124..1.124 rows=777 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 42kB
164. 0.554 0.554 ↑ 1.0 777 1

Seq Scan on company_code cc_1 (cost=0.00..16.77 rows=777 width=9) (actual time=0.011..0.554 rows=777 loops=1)

165. 11.685 11.685 ↑ 1.0 1 3,895

Index Scan using pk_app_user on app_user au_lmby (cost=0.28..0.44 rows=1 width=18) (actual time=0.003..0.003 rows=1 loops=3,895)

  • Index Cond: (id = cd.last_modified_by_user_id)
166.          

SubPlan (for Result)

167. 26.131 93.325 ↑ 1.0 1 3,733

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

168. 11.199 67.194 ↑ 1.0 1 3,733

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

  • Sort Key: epr1.date_created DESC
  • Sort Method: quicksort Memory: 25kB
169. 18.876 55.995 ↑ 1.0 1 3,733

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

170. 22.398 22.398 ↑ 1.0 1 3,733

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=3,733)

  • Index Cond: ((entity_id = cd.dnoid) AND (entity_type_id = 12))
171. 14.721 14.721 ↑ 1.0 1 4,907

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

  • Index Cond: (id = epr1.document_id)
172. 26.131 70.927 ↑ 1.0 1 3,733

Aggregate (cost=5.17..5.19 rows=1 width=32) (actual time=0.019..0.019 rows=1 loops=3,733)

173. 16.319 44.796 ↑ 1.0 1 3,733

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

174. 18.665 18.665 ↑ 1.0 1 3,733

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=3,733)

  • Index Cond: ((entity_id = cd.id) AND (entity_type_id = 13))
175. 9.812 9.812 ↑ 1.0 1 4,906

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=4,906)

  • Index Cond: (id = epr1_1.document_id)
176. 26.131 111.990 ↑ 1.0 1 3,733

Aggregate (cost=8.19..8.21 rows=1 width=32) (actual time=0.029..0.030 rows=1 loops=3,733)

177. 18.184 85.859 ↑ 1.0 2 3,733

Nested Loop (cost=3.57..8.19 rows=2 width=12) (actual time=0.017..0.023 rows=2 loops=3,733)

178. 11.199 55.995 ↑ 1.0 2 3,733

Unique (cost=3.42..3.43 rows=2 width=4) (actual time=0.012..0.015 rows=2 loops=3,733)

179. 18.665 44.796 ↑ 1.0 2 3,733

Sort (cost=3.42..3.42 rows=2 width=4) (actual time=0.011..0.012 rows=2 loops=3,733)

  • Sort Key: link_entity_country.country_id
  • Sort Method: quicksort Memory: 25kB
180. 26.131 26.131 ↑ 1.0 2 3,733

Index Scan using idx_link_entity_country_3 on link_entity_country (cost=0.43..3.41 rows=2 width=4) (actual time=0.005..0.007 rows=2 loops=3,733)

  • Index Cond: ((entity_id = cd.id) AND (entity_type_id = 13))
  • Filter: global
181. 11.680 11.680 ↑ 1.0 1 5,840

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=5,840)

  • Index Cond: (id = link_entity_country.country_id)
182. 11.199 33.597 ↑ 1.0 1 3,733

Aggregate (cost=5.80..5.82 rows=1 width=32) (actual time=0.009..0.009 rows=1 loops=3,733)

183. 3.733 22.398 ↓ 0.0 0 3,733

Nested Loop (cost=3.56..5.80 rows=1 width=12) (actual time=0.006..0.006 rows=0 loops=3,733)

184. 7.466 18.665 ↓ 0.0 0 3,733

HashAggregate (cost=3.41..3.42 rows=1 width=4) (actual time=0.005..0.005 rows=0 loops=3,733)

  • Group Key: link_entity_country_1.country_id
185. 11.199 11.199 ↓ 0.0 0 3,733

Index Scan using idx_link_entity_country_3 on link_entity_country link_entity_country_1 (cost=0.43..3.41 rows=1 width=4) (actual time=0.003..0.003 rows=0 loops=3,733)

  • Index Cond: ((entity_id = cd.id) AND (entity_type_id = 13))
  • Filter: (NOT global)
  • Rows Removed by Filter: 2
186. 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)
187. 14.932 59.728 ↑ 1.0 1 3,733

Aggregate (cost=5.04..5.05 rows=1 width=32) (actual time=0.016..0.016 rows=1 loops=3,733)

188. 12.693 44.796 ↑ 1.0 1 3,733

Nested Loop (cost=2.79..5.04 rows=1 width=12) (actual time=0.010..0.012 rows=1 loops=3,733)

189. 11.199 26.131 ↑ 1.0 1 3,733

HashAggregate (cost=2.65..2.66 rows=1 width=4) (actual time=0.007..0.007 rows=1 loops=3,733)

  • Group Key: link_entity_delivery_country.country_id
190. 14.932 14.932 ↑ 1.0 1 3,733

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=3,733)

  • Index Cond: ((entity_id = cd.id) AND (entity_type_id = 13))
191. 5.972 5.972 ↑ 1.0 1 2,986

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=2,986)

  • Index Cond: (id = link_entity_delivery_country.country_id)
192. 18.665 67.194 ↑ 1.0 1 3,733

Aggregate (cost=4.09..4.10 rows=1 width=32) (actual time=0.018..0.018 rows=1 loops=3,733)

193. 16.810 48.529 ↑ 1.0 1 3,733

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

194. 11.199 22.398 ↑ 1.0 1 3,733

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

  • Group Key: child_dno_contract_entity_link.contract_entity_id
195. 11.199 11.199 ↑ 1.0 1 3,733

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.003..0.003 rows=1 loops=3,733)

  • Index Cond: (child_dno_id = cd.id)
  • Heap Fetches: 71
196. 9.321 9.321 ↑ 1.0 1 3,107

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=3,107)

  • Index Cond: ((id = child_dno_contract_entity_link.contract_entity_id) AND (contract_entity_type = 2))
Planning time : 29.859 ms
Execution time : 6,805.459 ms