explain.depesz.com

PostgreSQL's explain analyze made readable

Result: RNoK : Optimization for: Optimization for: Optimization for: Optimization for: plan #VWvn; plan #jLt2; plan #WI2t; plan #4Jq4

Settings

Optimization path:

# exclusive inclusive rows x rows loops node
1. 0.389 1,584.355 ↑ 672.1 25 1

Result (cost=282,819.38..287,565.95 rows=16,802 width=436) (actual time=1,584.080..1,584.355 rows=25 loops=1)

2.          

CTE renewal

3. 79.645 1,023.938 ↓ 1.4 24,668 1

HashAggregate (cost=168,916.11..169,143.26 rows=18,172 width=41) (actual time=1,011.673..1,023.938 rows=24,668 loops=1)

  • Group Key: p_3.idpreviouspolicy
4.          

CTE offerstatus

5. 95.450 511.918 ↑ 1.1 205,574 1

Hash Join (cost=49,622.47..84,284.51 rows=217,194 width=40) (actual time=227.226..511.918 rows=205,574 loops=1)

  • Hash Cond: (pv_2.idpolicy = p_2.id)
6. 106.298 295.188 ↑ 1.1 205,574 1

Hash Join (cost=10,608.16..41,985.13 rows=217,194 width=34) (actual time=105.523..295.188 rows=205,574 loops=1)

  • Hash Cond: (pv_2.id = od.id)
7. 83.777 83.777 ↑ 1.0 271,963 1

Seq Scan on tblpolicyversion pv_2 (cost=0.00..30,662.76 rows=272,075 width=16) (actual time=0.013..83.777 rows=271,963 loops=1)

  • Filter: (policyversionstatus = 'CURRENT'::text)
  • Rows Removed by Filter: 78018
8. 54.006 105.113 ↓ 1.0 279,388 1

Hash (cost=7,115.85..7,115.85 rows=279,385 width=26) (actual time=105.112..105.113 rows=279,388 loops=1)

  • Buckets: 524288 Batches: 1 Memory Usage: 21558kB
9. 51.107 51.107 ↓ 1.0 279,388 1

Seq Scan on tblofferdata od (cost=0.00..7,115.85 rows=279,385 width=26) (actual time=0.014..51.107 rows=279,388 loops=1)

10. 45.315 121.280 ↑ 1.0 271,914 1

Hash (cost=35,602.47..35,602.47 rows=272,947 width=16) (actual time=121.280..121.280 rows=271,914 loops=1)

  • Buckets: 524288 Batches: 1 Memory Usage: 14859kB
11. 75.965 75.965 ↑ 1.0 271,914 1

Seq Scan on tblpolicy p_2 (cost=0.00..35,602.47 rows=272,947 width=16) (actual time=0.012..75.965 rows=271,914 loops=1)

12. 58.549 944.293 ↓ 1.1 65,731 1

Hash Right Join (cost=74,874.10..83,536.98 rows=62,550 width=65) (actual time=853.361..944.293 rows=65,731 loops=1)

  • Hash Cond: (od_1.id = pv_3.id)
13. 32.474 32.474 ↓ 1.0 279,388 1

Seq Scan on tblofferdata od_1 (cost=0.00..7,115.85 rows=279,385 width=19) (actual time=0.024..32.474 rows=279,388 loops=1)

14. 14.625 853.270 ↓ 1.1 65,731 1

Hash (cost=74,092.23..74,092.23 rows=62,550 width=54) (actual time=853.270..853.270 rows=65,731 loops=1)

  • Buckets: 131072 (originally 65536) Batches: 1 (originally 1) Memory Usage: 4955kB
15. 55.100 838.645 ↓ 1.1 65,731 1

Hash Right Join (cost=68,545.69..74,092.23 rows=62,550 width=54) (actual time=460.731..838.645 rows=65,731 loops=1)

  • Hash Cond: (os.idpolicyversion = pv_3.id)
16. 550.243 550.243 ↑ 1.1 205,574 1

CTE Scan on offerstatus os (cost=0.00..4,343.88 rows=217,194 width=40) (actual time=227.230..550.243 rows=205,574 loops=1)

17. 12.719 233.302 ↓ 1.1 65,731 1

Hash (cost=67,763.82..67,763.82 rows=62,550 width=22) (actual time=233.302..233.302 rows=65,731 loops=1)

  • Buckets: 131072 (originally 65536) Batches: 1 (originally 1) Memory Usage: 4619kB
18. 49.949 220.583 ↓ 1.1 65,731 1

Hash Join (cost=36,386.85..67,763.82 rows=62,550 width=22) (actual time=100.494..220.583 rows=65,731 loops=1)

  • Hash Cond: (pv_3.idpolicy = p_3.id)
19. 70.209 70.209 ↑ 1.0 271,963 1

Seq Scan on tblpolicyversion pv_3 (cost=0.00..30,662.76 rows=272,075 width=16) (actual time=0.012..70.209 rows=271,963 loops=1)

  • Filter: (policyversionstatus = 'CURRENT'::text)
  • Rows Removed by Filter: 78018
20. 11.233 100.425 ↓ 1.0 65,730 1

Hash (cost=35,602.47..35,602.47 rows=62,750 width=22) (actual time=100.424..100.425 rows=65,730 loops=1)

  • Buckets: 131072 (originally 65536) Batches: 1 (originally 1) Memory Usage: 4619kB
21. 89.192 89.192 ↓ 1.0 65,730 1

Seq Scan on tblpolicy p_3 (cost=0.00..35,602.47 rows=62,750 width=22) (actual time=0.012..89.192 rows=65,730 loops=1)

  • Filter: ((idpreviouspolicy IS NOT NULL) AND (canceldate IS NULL) AND (NOT test))
  • Rows Removed by Filter: 206184
22.          

CTE datawindow

23. 0.008 1,254.164 ↑ 1.0 25 1

Limit (cost=38,187.93..38,187.99 rows=25 width=28) (actual time=1,254.157..1,254.164 rows=25 loops=1)

24. 0.094 1,254.156 ↑ 1.3 25 1

Sort (cost=38,187.93..38,188.01 rows=33 width=28) (actual time=1,254.155..1,254.156 rows=25 loops=1)

  • Sort Key: pv_4.enddate, n_2.number, pv_4.id
  • Sort Method: top-N heapsort Memory: 28kB
25. 0.319 1,254.062 ↓ 23.2 766 1

WindowAgg (cost=37,025.73..38,187.10 rows=33 width=28) (actual time=1,253.966..1,254.062 rows=766 loops=1)

26. 0.292 1,253.743 ↓ 23.2 766 1

Nested Loop Left Join (cost=37,025.73..38,186.69 rows=33 width=20) (actual time=1,127.757..1,253.743 rows=766 loops=1)

27. 4.488 1,251.919 ↓ 23.2 766 1

Nested Loop (cost=37,025.44..38,173.86 rows=33 width=20) (actual time=1,127.745..1,251.919 rows=766 loops=1)

  • Join Filter: (abs((CURRENT_DATE - (CASE WHEN pv_4.isenddateclosed THEN (pv_4.enddate + '1 day'::interval) ELSE (pv_4.enddate)::timestamp without time zone END)::date)) <= COALESCE(ga_1.renewableperiodindays, '30'::bigint))
  • Rows Removed by Join Filter: 11739
28. 6.656 1,222.421 ↓ 127.6 12,505 1

Nested Loop (cost=37,025.30..38,155.45 rows=98 width=31) (actual time=1,127.635..1,222.421 rows=12,505 loops=1)

29. 16.649 1,135.329 ↓ 90.3 26,812 1

Hash Right Join (cost=37,024.88..37,436.02 rows=297 width=18) (actual time=1,127.598..1,135.329 rows=26,812 loops=1)

  • Hash Cond: (renewal_1.id = p_4.id)
  • Filter: (((renewal_1.renewed IS NULL) OR (NOT renewal_1.renewed)) AND ((renewal_1.offers IS NULL) OR (json_array_length(renewal_1.offers) = 0)))
  • Rows Removed by Filter: 24515
30. 1,029.090 1,029.090 ↓ 1.4 24,668 1

CTE Scan on renewal renewal_1 (cost=0.00..363.44 rows=18,172 width=41) (actual time=1,011.677..1,029.090 rows=24,668 loops=1)

31. 7.539 89.590 ↑ 1.2 51,327 1

Hash (cost=36,284.84..36,284.84 rows=59,203 width=18) (actual time=89.589..89.590 rows=51,327 loops=1)

  • Buckets: 65536 Batches: 1 Memory Usage: 3029kB
32. 82.051 82.051 ↑ 1.2 51,327 1

Seq Scan on tblpolicy p_4 (cost=0.00..36,284.84 rows=59,203 width=18) (actual time=0.008..82.051 rows=51,327 loops=1)

  • Filter: ((NOT test) AND (canceldate IS NULL) AND (policytype = 'POLICY'::text))
  • Rows Removed by Filter: 220587
33. 80.436 80.436 ↓ 0.0 0 26,812

Index Scan using tblpolicyversion_idpolicy on tblpolicyversion pv_4 (cost=0.42..2.41 rows=1 width=21) (actual time=0.003..0.003 rows=0 loops=26,812)

  • Index Cond: (idpolicy = p_4.id)
  • Filter: (renewable AND (policyversionstatus = 'CURRENT'::text) AND (CASE WHEN isenddateclosed THEN (enddate + '1 day'::interval) ELSE (enddate)::timestamp without time zone END > now()))
  • Rows Removed by Filter: 1
34. 25.010 25.010 ↑ 1.0 1 12,505

Index Scan using tblgeneralagreement_pkey on tblgeneralagreement ga_1 (cost=0.14..0.16 rows=1 width=19) (actual time=0.002..0.002 rows=1 loops=12,505)

  • Index Cond: (id = p_4.idgeneralagreement)
35. 1.532 1.532 ↑ 1.0 1 766

Index Scan using tblnumber_idpolicy_indx on tblnumber n_2 (cost=0.29..0.38 rows=1 width=16) (actual time=0.002..0.002 rows=1 loops=766)

  • Index Cond: (p_4.id = idpolicy)
36.          

CTE premiums

37. 0.068 1,254.446 ↑ 1.0 25 1

GroupAggregate (cost=301.46..305.76 rows=25 width=136) (actual time=1,254.352..1,254.446 rows=25 loops=1)

  • Group Key: rp.idpolicyversion
38. 0.055 1,254.378 ↑ 1.3 60 1

WindowAgg (cost=301.46..303.17 rows=76 width=50) (actual time=1,254.328..1,254.378 rows=60 loops=1)

39. 0.037 1,254.323 ↑ 1.3 60 1

Sort (cost=301.46..301.65 rows=76 width=42) (actual time=1,254.319..1,254.323 rows=60 loops=1)

  • Sort Key: rp.idpolicyversion, rp.riskname, rp.validfrom DESC
  • Sort Method: quicksort Memory: 30kB
40. 0.015 1,254.286 ↑ 1.3 60 1

Nested Loop (cost=0.42..299.09 rows=76 width=42) (actual time=1,254.176..1,254.286 rows=60 loops=1)

41. 1,254.171 1,254.171 ↑ 1.0 25 1

CTE Scan on datawindow w (cost=0.00..0.50 rows=25 width=8) (actual time=1,254.159..1,254.171 rows=25 loops=1)

42. 0.100 0.100 ↑ 1.5 2 25

Index Scan using tblriskpremium_idpolicyversion_index on tblriskpremium rp (cost=0.42..11.91 rows=3 width=42) (actual time=0.004..0.004 rows=2 loops=25)

  • Index Cond: (idpolicyversion = w.idpolicyversion)
43. 0.047 1,583.966 ↑ 672.1 25 1

Sort (cost=75,182.36..75,224.37 rows=16,802 width=412) (actual time=1,583.964..1,583.966 rows=25 loops=1)

  • Sort Key: pv.enddate, n.number, pv.id
  • Sort Method: quicksort Memory: 37kB
44. 2.250 1,583.919 ↑ 672.1 25 1

Hash Right Join (cost=73,224.35..74,003.17 rows=16,802 width=412) (actual time=1,583.844..1,583.919 rows=25 loops=1)

  • Hash Cond: (renewal.id = p.id)
45. 2.989 2.989 ↓ 1.4 24,668 1

CTE Scan on renewal (cost=0.00..363.44 rows=18,172 width=40) (actual time=0.002..2.989 rows=24,668 loops=1)

46. 0.054 1,578.680 ↑ 672.1 25 1

Hash (cost=73,014.33..73,014.33 rows=16,802 width=611) (actual time=1,578.680..1,578.680 rows=25 loops=1)

  • Buckets: 32768 Batches: 1 Memory Usage: 267kB
47. 0.136 1,578.626 ↑ 672.1 25 1

Hash Left Join (cost=22,793.02..73,014.33 rows=16,802 width=611) (actual time=1,495.718..1,578.626 rows=25 loops=1)

  • Hash Cond: (p_1.id = n_1.idpolicy)
48. 0.059 1,546.347 ↑ 672.1 25 1

Nested Loop Left Join (cost=19,636.68..69,754.13 rows=16,802 width=587) (actual time=1,463.472..1,546.347 rows=25 loops=1)

  • Join Filter: (p.fallbacklocale ~~* (cd_label_fallback.locale || '%'::text))
  • Rows Removed by Join Filter: 15
49. 0.058 1,546.263 ↑ 672.1 25 1

Nested Loop Left Join (cost=19,636.26..58,507.50 rows=16,802 width=501) (actual time=1,463.467..1,546.263 rows=25 loops=1)

50. 0.145 1,545.980 ↑ 672.1 25 1

Hash Left Join (cost=19,635.83..47,428.90 rows=16,802 width=412) (actual time=1,463.446..1,545.980 rows=25 loops=1)

  • Hash Cond: (p.id = n.idpolicy)
51. 0.091 1,513.519 ↑ 672.1 25 1

Hash Left Join (cost=16,479.50..44,168.69 rows=16,802 width=372) (actual time=1,431.027..1,513.519 rows=25 loops=1)

  • Hash Cond: (c.idmetaclient = mc.id)
52. 0.064 1,499.125 ↑ 672.1 25 1

Nested Loop Left Join (cost=14,337.09..41,982.18 rows=16,802 width=372) (actual time=1,416.670..1,499.125 rows=25 loops=1)

53. 18.309 1,498.736 ↑ 672.1 25 1

Hash Join (cost=14,336.25..18,714.24 rows=16,802 width=364) (actual time=1,416.627..1,498.736 rows=25 loops=1)

  • Hash Cond: (tblriskpremium.idpolicyversion = datawindow.idpolicyversion)
54. 170.727 224.884 ↓ 2.0 349,901 1

HashAggregate (cost=14,049.64..15,822.11 rows=177,247 width=40) (actual time=156.518..224.884 rows=349,901 loops=1)

  • Group Key: tblriskpremium.idpolicyversion
55. 54.157 54.157 ↑ 1.0 536,931 1

Seq Scan on tblriskpremium (cost=0.00..12,707.31 rows=536,931 width=8) (actual time=0.009..54.157 rows=536,931 loops=1)

56. 0.022 1,255.543 ↓ 1.3 25 1

Hash (cost=286.37..286.37 rows=19 width=388) (actual time=1,255.543..1,255.543 rows=25 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 16kB
57. 0.018 1,255.521 ↓ 1.3 25 1

Nested Loop Left Join (cost=5.19..286.37 rows=19 width=388) (actual time=1,254.550..1,255.521 rows=25 loops=1)

58. 0.047 1,255.428 ↓ 1.3 25 1

Nested Loop Left Join (cost=4.90..280.25 rows=19 width=380) (actual time=1,254.537..1,255.428 rows=25 loops=1)

  • Join Filter: (pl_label.id = pl.id)
  • Rows Removed by Join Filter: 375
59. 0.024 1,255.331 ↓ 1.3 25 1

Nested Loop (cost=4.90..278.48 rows=19 width=348) (actual time=1,254.506..1,255.331 rows=25 loops=1)

60. 0.014 1,255.196 ↓ 1.6 37 1

Nested Loop (cost=4.48..266.10 rows=23 width=356) (actual time=1,254.490..1,255.196 rows=37 loops=1)

  • Join Filter: (datawindow.idpolicyversion = pc_ubezpieczony.idpolicyversion)
61. 0.021 1,255.082 ↓ 1.3 25 1

Nested Loop (cost=4.05..254.17 rows=19 width=307) (actual time=1,254.478..1,255.082 rows=25 loops=1)

  • Join Filter: (p.idinsurancecompany = cu.id)
62. 0.016 1,255.061 ↓ 1.3 25 1

Hash Join (cost=4.05..252.63 rows=19 width=283) (actual time=1,254.464..1,255.061 rows=25 loops=1)

  • Hash Cond: (ga.idproductline = pl.id)
63. 0.019 1,255.027 ↓ 1.3 25 1

Nested Loop (cost=2.65..251.17 rows=19 width=257) (actual time=1,254.440..1,255.027 rows=25 loops=1)

64. 0.003 1,254.958 ↓ 1.3 25 1

Nested Loop (cost=2.51..248.13 rows=19 width=261) (actual time=1,254.432..1,254.958 rows=25 loops=1)

65. 0.006 1,254.855 ↓ 1.3 25 1

Nested Loop (cost=2.22..242.30 rows=19 width=245) (actual time=1,254.420..1,254.855 rows=25 loops=1)

66. 0.011 1,254.799 ↓ 1.3 25 1

Nested Loop (cost=1.94..236.56 rows=19 width=225) (actual time=1,254.415..1,254.799 rows=25 loops=1)

67. 0.019 1,254.713 ↓ 1.3 25 1

Nested Loop (cost=1.66..230.83 rows=19 width=207) (actual time=1,254.403..1,254.713 rows=25 loops=1)

68. 0.020 1,254.594 ↓ 1.3 25 1

Hash Join (cost=1.23..212.46 rows=19 width=113) (actual time=1,254.389..1,254.594 rows=25 loops=1)

  • Hash Cond: (pv.id = datawindow.idpolicyversion)
69. 0.033 1,254.565 ↓ 1.3 25 1

Nested Loop (cost=0.42..211.56 rows=19 width=97) (actual time=1,254.368..1,254.565 rows=25 loops=1)

70. 1,254.457 1,254.457 ↑ 1.0 25 1

CTE Scan on premiums (cost=0.00..0.50 rows=25 width=72) (actual time=1,254.355..1,254.457 rows=25 loops=1)

71. 0.075 0.075 ↑ 1.0 1 25

Index Scan using tblpolicyversion_pkey on tblpolicyversion pv (cost=0.42..8.44 rows=1 width=25) (actual time=0.003..0.003 rows=1 loops=25)

  • Index Cond: (id = premiums.idpolicyversion)
  • Filter: (policyversionstatus = 'CURRENT'::text)
72. 0.006 0.009 ↑ 1.0 25 1

Hash (cost=0.50..0.50 rows=25 width=16) (actual time=0.009..0.009 rows=25 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 10kB
73. 0.003 0.003 ↑ 1.0 25 1

CTE Scan on datawindow (cost=0.00..0.50 rows=25 width=16) (actual time=0.001..0.003 rows=25 loops=1)

74. 0.100 0.100 ↑ 1.0 1 25

Index Scan using pk_tblinsurance on tblpolicy p (cost=0.42..0.97 rows=1 width=102) (actual time=0.004..0.004 rows=1 loops=25)

  • Index Cond: (id = pv.idpolicy)
75. 0.075 0.075 ↑ 1.0 1 25

Index Scan using tblagencyunit_pkey on tblagencyunit division (cost=0.28..0.30 rows=1 width=34) (actual time=0.003..0.003 rows=1 loops=25)

  • Index Cond: (id = p.idagencyunit)
76. 0.050 0.050 ↑ 1.0 1 25

Index Scan using tblagencyunit_pkey on tblagencyunit agency (cost=0.28..0.30 rows=1 width=36) (actual time=0.002..0.002 rows=1 loops=25)

  • Index Cond: (id = p.idagency)
77. 0.100 0.100 ↑ 1.0 1 25

Index Scan using tblemployee_pkey on tblemployee employee (cost=0.29..0.31 rows=1 width=24) (actual time=0.004..0.004 rows=1 loops=25)

  • Index Cond: (id = p.idemployee)
78. 0.050 0.050 ↑ 1.0 1 25

Index Scan using tblgeneralagreement_pkey on tblgeneralagreement ga (cost=0.14..0.16 rows=1 width=17) (actual time=0.002..0.002 rows=1 loops=25)

  • Index Cond: (id = p.idgeneralagreement)
79. 0.005 0.018 ↑ 1.0 18 1

Hash (cost=1.18..1.18 rows=18 width=32) (actual time=0.018..0.018 rows=18 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
80. 0.013 0.013 ↑ 1.0 18 1

Seq Scan on tblproductline pl (cost=0.00..1.18 rows=18 width=32) (actual time=0.011..0.013 rows=18 loops=1)

81. 0.000 0.000 ↑ 2.0 1 25

Materialize (cost=0.00..1.03 rows=2 width=40) (actual time=0.000..0.000 rows=1 loops=25)

82. 0.009 0.009 ↑ 2.0 1 1

Seq Scan on tblinsurancecompanyunit cu (cost=0.00..1.02 rows=2 width=40) (actual time=0.009..0.009 rows=1 loops=1)

83. 0.100 0.100 ↑ 1.0 1 25

Index Scan using tblpolicyclient_idpolicyversion on tblpolicyclient pc_ubezpieczony (cost=0.42..0.62 rows=1 width=49) (actual time=0.003..0.004 rows=1 loops=25)

  • Index Cond: (idpolicyversion = pv.id)
84. 0.111 0.111 ↑ 1.0 1 37

Index Only Scan using tblpolicyclientrole_role_unique on tblpolicyclientrole pcr_ubezpieczony (cost=0.42..0.54 rows=1 width=8) (actual time=0.003..0.003 rows=1 loops=37)

  • Index Cond: ((idpolicyclient = pc_ubezpieczony.id) AND (role = 'ubezpieczony'::text))
  • Heap Fetches: 25
85. 0.017 0.050 ↓ 16.0 16 25

Materialize (cost=0.00..1.48 rows=1 width=64) (actual time=0.001..0.002 rows=16 loops=25)

86. 0.033 0.033 ↓ 16.0 16 1

Seq Scan on tblproductlinelabel pl_label (cost=0.00..1.48 rows=1 width=64) (actual time=0.022..0.033 rows=16 loops=1)

  • Filter: ('pl_PL'::text ~~* (locale || '%'::text))
  • Rows Removed by Filter: 16
87. 0.075 0.075 ↑ 1.0 1 25

Index Scan using tblclient_pkey on tblclient c (cost=0.29..0.32 rows=1 width=16) (actual time=0.003..0.003 rows=1 loops=25)

  • Index Cond: (pc_ubezpieczony.idclient = id)
88. 0.040 0.325 ↑ 1.0 1 25

Nested Loop (cost=0.84..1.37 rows=1 width=16) (actual time=0.013..0.013 rows=1 loops=25)

89. 0.150 0.150 ↑ 1.0 1 25

Index Only Scan using pk_tblinsurance on tblpolicy p_1 (cost=0.42..0.48 rows=1 width=8) (actual time=0.006..0.006 rows=1 loops=25)

  • Index Cond: (id = p.idpreviouspolicy)
  • Heap Fetches: 0
90. 0.135 0.135 ↑ 1.0 1 15

Index Scan using tblpolicyversion_idpolicy on tblpolicyversion pv_1 (cost=0.42..0.88 rows=1 width=16) (actual time=0.009..0.009 rows=1 loops=15)

  • Index Cond: (idpolicy = p_1.id)
  • Filter: (policyversionstatus = 'CURRENT'::text)
91. 5.785 14.303 ↓ 1.0 53,223 1

Hash (cost=1,477.18..1,477.18 rows=53,218 width=8) (actual time=14.303..14.303 rows=53,223 loops=1)

  • Buckets: 65536 Batches: 1 Memory Usage: 2592kB
92. 8.518 8.518 ↓ 1.0 53,223 1

Seq Scan on tblmetaclient mc (cost=0.00..1,477.18 rows=53,218 width=8) (actual time=0.011..8.518 rows=53,223 loops=1)

93. 9.841 32.316 ↓ 1.0 66,384 1

Hash (cost=2,326.57..2,326.57 rows=66,381 width=48) (actual time=32.316..32.316 rows=66,384 loops=1)

  • Buckets: 131072 Batches: 1 Memory Usage: 4866kB
94. 22.475 22.475 ↓ 1.0 66,384 1

Seq Scan on tblnumber n (cost=0.00..2,326.57 rows=66,381 width=48) (actual time=0.018..22.475 rows=66,384 loops=1)

95. 0.225 0.225 ↑ 1.0 1 25

Index Scan using tblpolicycoveragedescription_unique on tblpolicycoveragedescription cd_label (cost=0.42..0.65 rows=1 width=97) (actual time=0.009..0.009 rows=1 loops=25)

  • Index Cond: (idpolicyversion = pv.id)
  • Filter: ('pl_PL'::text ~~* (locale || '%'::text))
  • Rows Removed by Filter: 1
96. 0.025 0.025 ↑ 2.0 1 25

Index Scan using tblpolicycoveragedescription_unique on tblpolicycoveragedescription cd_label_fallback (cost=0.42..0.64 rows=2 width=100) (actual time=0.001..0.001 rows=1 loops=25)

  • Index Cond: (idpolicyversion = pv.id)
97. 9.481 32.143 ↓ 1.0 66,384 1

Hash (cost=2,326.57..2,326.57 rows=66,381 width=40) (actual time=32.143..32.143 rows=66,384 loops=1)

  • Buckets: 131072 Batches: 1 Memory Usage: 4348kB
98. 22.662 22.662 ↓ 1.0 66,384 1

Seq Scan on tblnumber n_1 (cost=0.00..2,326.57 rows=66,381 width=40) (actual time=0.014..22.662 rows=66,384 loops=1)

Planning time : 11.278 ms
Execution time : 1,588.827 ms