explain.depesz.com

PostgreSQL's explain analyze made readable

Result: mRU

Settings
# exclusive inclusive rows x rows loops node
1. 18,381.997 18,381.997 ↓ 33.4 367 1

Hash Left Join (cost=262,643.04..262,649.19 rows=11 width=1,147) (actual time=18,372.773..18,381.997 rows=367 loops=1)

  • Hash Cond: (portfolio_implantation.id = contacts.portfolio_implantation_id)
2.          

CTE params

3. 0.003 0.003 ↑ 1.0 1 1

Result (cost=0.00..0.01 rows=1 width=36) (actual time=0.003..0.003 rows=1 loops=1)

4.          

CTE culture

5. 0.006 0.070 ↑ 1.0 1 1

Aggregate (cost=1.26..1.27 rows=1 width=32) (actual time=0.069..0.070 rows=1 loops=1)

6. 0.064 0.064 ↓ 0.0 0 1

Function Scan on unnest culture (cost=0.00..1.25 rows=1 width=32) (actual time=0.064..0.064 rows=0 loops=1)

  • Filter: (culture ~ '^fr_FR_'::text)
  • Rows Removed by Filter: 2
7.          

CTE portfolio_implantation_match_data

8. 0.942 1,348.478 ↓ 33.4 367 1

GroupAggregate (cost=285.70..285.95 rows=11 width=16) (actual time=1,347.285..1,348.478 rows=367 loops=1)

  • Group Key: portfolio_implantation_1.id
9.          

Initplan (for GroupAggregate)

10. 0.009 0.009 ↑ 1.0 1 1

CTE Scan on params (cost=0.00..0.02 rows=1 width=4) (actual time=0.008..0.009 rows=1 loops=1)

11. 0.001 0.001 ↑ 1.0 1 1

CTE Scan on params params_1 (cost=0.00..0.02 rows=1 width=32) (actual time=0.001..0.001 rows=1 loops=1)

12. 0.892 1,347.526 ↓ 33.4 367 1

Sort (cost=285.66..285.69 rows=11 width=32) (actual time=1,347.270..1,347.526 rows=367 loops=1)

  • Sort Key: portfolio_implantation_1.id
  • Sort Method: quicksort Memory: 45kB
13. 0.944 1,346.634 ↓ 33.4 367 1

Nested Loop Left Join (cost=4.38..285.47 rows=11 width=32) (actual time=0.148..1,346.634 rows=367 loops=1)

14. 0.763 872.260 ↓ 33.4 367 1

Nested Loop Left Join (cost=3.95..192.49 rows=11 width=28) (actual time=0.138..872.260 rows=367 loops=1)

15. 1.863 4.643 ↓ 33.4 367 1

Hash Left Join (cost=3.51..99.41 rows=11 width=20) (actual time=0.127..4.643 rows=367 loops=1)

  • Hash Cond: ((portfolio_implantation_1.user_company_id = company_branch_1.user_company_id) AND (portfolio_implantation_1.company_branch_id = company_branch_1.id))
  • Filter: ((company_branch_1.deleted_at IS NULL) AND ((portfolio_implantation_1.company_branch_id IS NULL) OR (array_remove(ARRAY[company_branch_1.user_community_id], NULL::integer) && $3)))
16. 2.731 2.731 ↓ 6.3 367 1

Seq Scan on portfolio_implantation portfolio_implantation_1 (cost=0.00..95.59 rows=58 width=28) (actual time=0.032..2.731 rows=367 loops=1)

  • Filter: ((deleted_at IS NULL) AND (user_company_id = $2))
  • Rows Removed by Filter: 1603
17. 0.006 0.049 ↑ 1.2 5 1

Hash (cost=3.42..3.42 rows=6 width=20) (actual time=0.049..0.049 rows=5 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
18. 0.043 0.043 ↑ 1.2 5 1

Seq Scan on company_branch company_branch_1 (cost=0.00..3.42 rows=6 width=20) (actual time=0.010..0.043 rows=5 loops=1)

  • Filter: (user_company_id = $2)
  • Rows Removed by Filter: 77
19. 866.854 866.854 ↓ 0.0 0 367

Index Scan using gen_establishment_search_establishment_id on gen_establishment_search (cost=0.43..8.45 rows=1 width=16) (actual time=2.361..2.362 rows=0 loops=367)

  • Index Cond: (establishment_id = portfolio_implantation_1.establishment_id)
20. 473.430 473.430 ↓ 0.0 0 367

Index Scan using gen_match_cap_address_pkey on gen_match_cap_address (cost=0.43..8.45 rows=1 width=8) (actual time=1.290..1.290 rows=0 loops=367)

  • Index Cond: (address_id = portfolio_implantation_1.main_address_id)
21.          

CTE implantation_lpdi

22. 0.698 10,501.181 ↓ 33.4 367 1

Unique (cost=259,563.01..259,667.57 rows=11 width=32) (actual time=5,789.460..10,501.181 rows=367 loops=1)

23. 2.920 10,500.483 ↓ 34.0 374 1

Nested Loop Left Join (cost=259,563.01..259,667.54 rows=11 width=32) (actual time=5,789.457..10,500.483 rows=374 loops=1)

  • Join Filter: (building.id = building_address.building_id)
  • Rows Removed by Join Filter: 416
24. 1.171 5,764.364 ↓ 33.4 367 1

Merge Join (cost=259,562.45..259,572.45 rows=11 width=36) (actual time=5,762.495..5,764.364 rows=367 loops=1)

  • Merge Cond: (portfolio_implantation_match_data.portfolio_implantation_id = portfolio_implantation_2.id)
25. 0.395 5,761.439 ↓ 33.4 367 1

Sort (cost=259,364.17..259,364.19 rows=11 width=20) (actual time=5,761.172..5,761.439 rows=367 loops=1)

  • Sort Key: portfolio_implantation_match_data.portfolio_implantation_id
  • Sort Method: quicksort Memory: 45kB
26. 0.106 5,761.044 ↓ 33.4 367 1

Hash Right Join (cost=259,212.64..259,363.98 rows=11 width=20) (actual time=5,757.891..5,761.044 rows=367 loops=1)

  • Hash Cond: ((first(portfolio_implantation_match_data_1.match_building_id)) = portfolio_implantation_match_data.match_building_id)
27. 3.355 3,064.344 ↑ 1.4 108 1

GroupAggregate (cost=259,119.28..259,268.48 rows=147 width=12) (actual time=3,061.270..3,064.344 rows=108 loops=1)

  • Group Key: gen_match_cap_address_1.building_id
28. 0.669 3,060.989 ↓ 5.3 781 1

Sort (cost=259,119.28..259,119.65 rows=147 width=16) (actual time=3,060.939..3,060.989 rows=781 loops=1)

  • Sort Key: gen_match_cap_address_1.building_id
  • Sort Method: quicksort Memory: 57kB
29. 1.095 3,060.320 ↓ 5.3 781 1

Nested Loop (cost=0.64..259,113.99 rows=147 width=16) (actual time=5.377..3,060.320 rows=781 loops=1)

30. 1,195.166 3,056.101 ↓ 5.3 781 1

Hash Right Join (cost=0.36..258,161.89 rows=147 width=20) (actual time=5.304..3,056.101 rows=781 loops=1)

  • Hash Cond: (gen_match_cap_address_1.building_id = portfolio_implantation_match_data_1.match_building_id)
31. 1,860.825 1,860.825 ↓ 1.0 8,937,205 1

Seq Scan on gen_match_cap_address gen_match_cap_address_1 (cost=0.00..224,663.68 rows=8,932,368 width=8) (actual time=0.017..1,860.825 rows=8,937,205 loops=1)

32. 0.058 0.110 ↓ 33.4 367 1

Hash (cost=0.22..0.22 rows=11 width=12) (actual time=0.110..0.110 rows=367 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 22kB
33. 0.052 0.052 ↓ 33.4 367 1

CTE Scan on portfolio_implantation_match_data portfolio_implantation_match_data_1 (cost=0.00..0.22 rows=11 width=12) (actual time=0.005..0.052 rows=367 loops=1)

34. 3.124 3.124 ↑ 1.0 1 781

Index Only Scan using portfolio_implantation_pkey on portfolio_implantation portfolio_implantation_3 (cost=0.28..6.48 rows=1 width=4) (actual time=0.004..0.004 rows=1 loops=781)

  • Index Cond: (id = portfolio_implantation_match_data_1.portfolio_implantation_id)
  • Heap Fetches: 369
35. 0.592 2,696.594 ↓ 33.4 367 1

Hash (cost=93.23..93.23 rows=11 width=20) (actual time=2,696.594..2,696.594 rows=367 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 23kB
36. 0.983 2,696.002 ↓ 33.4 367 1

Nested Loop Left Join (cost=0.44..93.23 rows=11 width=20) (actual time=1,361.834..2,696.002 rows=367 loops=1)

37. 1,348.863 1,348.863 ↓ 33.4 367 1

CTE Scan on portfolio_implantation_match_data (cost=0.00..0.22 rows=11 width=16) (actual time=1,347.289..1,348.863 rows=367 loops=1)

38. 1,346.156 1,346.156 ↓ 0.0 0 367

Index Only Scan using building_pkey on building (cost=0.44..8.46 rows=1 width=4) (actual time=3.668..3.668 rows=0 loops=367)

  • Index Cond: (id = portfolio_implantation_match_data.match_building_id)
  • Heap Fetches: 114
39. 1.038 1.754 ↑ 1.1 1,823 1

Sort (cost=198.28..203.20 rows=1,967 width=20) (actual time=1.311..1.754 rows=1,823 loops=1)

  • Sort Key: portfolio_implantation_2.id
  • Sort Method: quicksort Memory: 145kB
40. 0.716 0.716 ↓ 1.0 1,970 1

Seq Scan on portfolio_implantation portfolio_implantation_2 (cost=0.00..90.67 rows=1,967 width=20) (actual time=0.017..0.716 rows=1,970 loops=1)

41. 4,733.199 4,733.199 ↑ 1.0 1 367

Index Scan using building_address_address_id on building_address (cost=0.56..8.58 rows=1 width=8) (actual time=7.818..12.897 rows=1 loops=367)

  • Index Cond: ((portfolio_implantation_match_data.match_main_address_id = address_id) AND (address_id = portfolio_implantation_match_data.match_main_address_id))
42.          

CTE data_implantation

43. 0.043 10,726.114 ↓ 33.4 367 1

Unique (cost=1,224.46..1,226.02 rows=11 width=252) (actual time=10,725.942..10,726.114 rows=367 loops=1)

44.          

Initplan (for Unique)

45. 0.072 0.072 ↑ 1.0 1 1

CTE Scan on culture culture_1 (cost=0.00..0.02 rows=1 width=32) (actual time=0.072..0.072 rows=1 loops=1)

46. 0.003 0.003 ↑ 1.0 1 1

CTE Scan on culture culture_2 (cost=0.00..0.02 rows=1 width=32) (actual time=0.002..0.003 rows=1 loops=1)

47. 0.001 0.001 ↑ 1.0 1 1

CTE Scan on culture culture_3 (cost=0.00..0.02 rows=1 width=32) (actual time=0.001..0.001 rows=1 loops=1)

48. 1.737 10,725.995 ↓ 2.0 632 1

Sort (cost=1,224.40..1,225.18 rows=311 width=252) (actual time=10,725.939..10,725.995 rows=632 loops=1)

  • Sort Key: implantation_lpdi_1.portfolio_implantation_id
  • Sort Method: quicksort Memory: 185kB
49. 6.483 10,724.258 ↓ 2.0 632 1

Hash Left Join (cost=12.03..1,211.53 rows=311 width=252) (actual time=67.498..10,724.258 rows=632 loops=1)

  • Hash Cond: (ref_tranche_effectif_i18n.id = ref_tranche_effectif.id)
50. 1.708 10,713.109 ↓ 2.0 632 1

Nested Loop Left Join (cost=10.62..1,199.79 rows=311 width=291) (actual time=62.692..10,713.109 rows=632 loops=1)

51. 0.499 7,441.431 ↓ 33.4 367 1

Nested Loop Left Join (cost=10.06..373.65 rows=11 width=235) (actual time=51.792..7,441.431 rows=367 loops=1)

  • Join Filter: (ref_contract_type_i18n.id = portfolio_implantation_4.lease_ref_contract_type_id)
  • Rows Removed by Join Filter: 545
52. 0.623 7,440.565 ↓ 33.4 367 1

Nested Loop Left Join (cost=10.06..372.29 rows=11 width=231) (actual time=51.742..7,440.565 rows=367 loops=1)

  • Join Filter: (ref_lease_type_i18n.id = portfolio_implantation_4.ref_lease_type_id)
  • Rows Removed by Join Filter: 150
53. 1.169 7,439.575 ↓ 33.4 367 1

Nested Loop Left Join (cost=10.06..369.49 rows=11 width=213) (actual time=51.701..7,439.575 rows=367 loops=1)

54. 1.635 7,437.672 ↓ 33.4 367 1

Nested Loop Left Join (cost=9.62..296.47 rows=11 width=199) (actual time=51.657..7,437.672 rows=367 loops=1)

55. 1.339 6,618.361 ↓ 33.4 367 1

Nested Loop Left Join (cost=9.18..203.47 rows=11 width=185) (actual time=40.048..6,618.361 rows=367 loops=1)

56. 2.814 4,728.440 ↓ 33.4 367 1

Nested Loop Left Join (cost=8.62..108.98 rows=11 width=168) (actual time=0.193..4,728.440 rows=367 loops=1)

57. 1.196 4,717.552 ↓ 33.4 367 1

Nested Loop Left Join (cost=0.28..83.47 rows=11 width=135) (actual time=0.019..4,717.552 rows=367 loops=1)

58. 4,712.319 4,712.319 ↓ 33.4 367 1

CTE Scan on implantation_lpdi implantation_lpdi_1 (cost=0.00..0.22 rows=11 width=16) (actual time=0.001..4,712.319 rows=367 loops=1)

59. 4.037 4.037 ↑ 1.0 1 367

Index Scan using portfolio_implantation_pkey on portfolio_implantation portfolio_implantation_4 (cost=0.28..7.57 rows=1 width=123) (actual time=0.011..0.011 rows=1 loops=367)

  • Index Cond: (id = implantation_lpdi_1.portfolio_implantation_id)
60. 4.179 8.074 ↓ 0.0 0 367

Hash Right Join (cost=8.34..9.89 rows=1 width=37) (actual time=0.017..0.022 rows=0 loops=367)

  • Hash Cond: ((ref_tranche_effectif_i18n.id)::text = gen_establishment_search_1.ref_tranche_effectif_id)
61. 1.326 1.326 ↑ 1.0 18 102

Seq Scan on ref_tranche_effectif_i18n (cost=0.00..1.45 rows=18 width=13) (actual time=0.006..0.013 rows=18 loops=102)

  • Filter: ((culture)::text = $11)
  • Rows Removed by Filter: 18
62. 0.734 2.569 ↓ 0.0 0 367

Hash (cost=8.33..8.33 rows=1 width=27) (actual time=0.007..0.007 rows=0 loops=367)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
63. 1.835 1.835 ↓ 0.0 0 367

Index Scan using gen_establishment_search_establishment_id on gen_establishment_search gen_establishment_search_1 (cost=0.43..8.33 rows=1 width=27) (actual time=0.005..0.005 rows=0 loops=367)

  • Index Cond: (establishment_id = portfolio_implantation_4.establishment_id)
64. 1,888.582 1,888.582 ↓ 0.0 0 367

Index Scan using gen_building_building_id on gen_building (cost=0.56..8.58 rows=1 width=21) (actual time=5.146..5.146 rows=0 loops=367)

  • Index Cond: (implantation_lpdi_1.building_id = building_id)
65. 817.676 817.676 ↓ 0.0 0 367

Index Scan using company_pkey on company (cost=0.44..8.46 rows=1 width=22) (actual time=2.228..2.228 rows=0 loops=367)

  • Index Cond: (implantation_lpdi_1.company_id = id)
66. 0.734 0.734 ↓ 0.0 0 367

Index Scan using company_pkey on company establishment_company (cost=0.44..6.64 rows=1 width=22) (actual time=0.002..0.002 rows=0 loops=367)

  • Index Cond: (id = gen_establishment_search_1.company_id)
67. 0.329 0.367 ↑ 10.0 1 367

Materialize (cost=0.00..1.30 rows=10 width=22) (actual time=0.001..0.001 rows=1 loops=367)

68. 0.038 0.038 ↓ 1.1 11 1

Seq Scan on ref_lease_type_i18n (cost=0.00..1.25 rows=10 width=22) (actual time=0.028..0.038 rows=11 loops=1)

  • Filter: ((culture)::text = $12)
  • Rows Removed by Filter: 10
69. 0.326 0.367 ↑ 1.0 2 367

Materialize (cost=0.00..1.06 rows=2 width=12) (actual time=0.000..0.001 rows=2 loops=367)

70. 0.041 0.041 ↑ 1.0 2 1

Seq Scan on ref_contract_type_i18n (cost=0.00..1.05 rows=2 width=12) (actual time=0.036..0.041 rows=2 loops=1)

  • Filter: ((culture)::text = $13)
  • Rows Removed by Filter: 2
71. 3,269.970 3,269.970 ↑ 28.0 1 367

Index Scan using gen_address_address_id on gen_address (cost=0.56..74.82 rows=28 width=60) (actual time=6.158..8.910 rows=1 loops=367)

  • Index Cond: (address_id = implantation_lpdi_1.main_address_id)
72. 0.016 4.666 ↑ 1.0 18 1

Hash (cost=1.18..1.18 rows=18 width=7) (actual time=4.666..4.666 rows=18 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
73. 4.650 4.650 ↑ 1.0 18 1

Seq Scan on ref_tranche_effectif (cost=0.00..1.18 rows=18 width=7) (actual time=4.645..4.650 rows=18 loops=1)

74.          

CTE list_lots

75. 0.393 20.976 ↓ 27.6 387 1

Hash Right Join (cost=79.61..151.68 rows=14 width=37) (actual time=8.949..20.976 rows=387 loops=1)

  • Hash Cond: (lot.portfolio_implantation_id = portfolio_implantation_5.id)
76. 19.848 19.848 ↓ 1.0 2,572 1

Seq Scan on portfolio_implantation_lot lot (cost=0.00..62.22 rows=2,571 width=36) (actual time=8.174..19.848 rows=2,572 loops=1)

  • Filter: (deleted_at IS NULL)
  • Rows Removed by Filter: 53
77. 0.076 0.735 ↓ 33.4 367 1

Hash (cost=79.47..79.47 rows=11 width=4) (actual time=0.735..0.735 rows=367 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 21kB
78. 0.237 0.659 ↓ 33.4 367 1

Nested Loop Left Join (cost=0.28..79.47 rows=11 width=4) (actual time=0.015..0.659 rows=367 loops=1)

79. 0.055 0.055 ↓ 33.4 367 1

CTE Scan on implantation_lpdi implantation_lpdi_2 (cost=0.00..0.22 rows=11 width=4) (actual time=0.001..0.055 rows=367 loops=1)

80. 0.367 0.367 ↑ 1.0 1 367

Index Scan using portfolio_implantation_pkey on portfolio_implantation portfolio_implantation_5 (cost=0.28..7.20 rows=1 width=4) (actual time=0.001..0.001 rows=1 loops=367)

  • Index Cond: (id = implantation_lpdi_2.portfolio_implantation_id)
  • Filter: (deleted_at IS NULL)
81.          

CTE lot_grouped

82. 0.620 1.547 ↓ 33.4 367 1

GroupAggregate (cost=72.83..73.24 rows=11 width=12) (actual time=1.003..1.547 rows=367 loops=1)

  • Group Key: implantation_lpdi_3.portfolio_implantation_id
83. 0.138 0.927 ↓ 27.6 387 1

Sort (cost=72.83..72.86 rows=14 width=32) (actual time=0.905..0.927 rows=387 loops=1)

  • Sort Key: implantation_lpdi_3.portfolio_implantation_id
  • Sort Method: quicksort Memory: 55kB
84. 0.384 0.789 ↓ 27.6 387 1

Hash Right Join (cost=0.36..72.56 rows=14 width=32) (actual time=0.141..0.789 rows=387 loops=1)

  • Hash Cond: (portfolio_implantation_lot.portfolio_implantation_id = implantation_lpdi_3.portfolio_implantation_id)
  • Filter: (portfolio_implantation_lot.deleted_at IS NULL)
  • Rows Removed by Filter: 5
85. 0.298 0.298 ↓ 1.0 2,625 1

Seq Scan on portfolio_implantation_lot (cost=0.00..62.22 rows=2,622 width=40) (actual time=0.013..0.298 rows=2,625 loops=1)

86. 0.059 0.107 ↓ 33.4 367 1

Hash (cost=0.22..0.22 rows=11 width=4) (actual time=0.107..0.107 rows=367 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 21kB
87. 0.048 0.048 ↓ 33.4 367 1

CTE Scan on implantation_lpdi implantation_lpdi_3 (cost=0.00..0.22 rows=11 width=4) (actual time=0.002..0.048 rows=367 loops=1)

88.          

CTE implantation_lot_properties_unnest

89. 0.776 22.748 ↑ 3.7 383 1

HashAggregate (cost=57.65..71.65 rows=1,400 width=16) (actual time=22.224..22.748 rows=383 loops=1)

  • Group Key: list_lots.portfolio_implantation_id, list_lots.portfolio_implantation_lot_id, ref_property_nature_id.ref_property_nature_id
90. 0.157 21.972 ↑ 1.8 766 1

Hash Left Join (cost=10.01..43.65 rows=1,400 width=16) (actual time=9.204..21.972 rows=766 loops=1)

  • Hash Cond: (ref_property_nature_id.ref_property_nature_id = ref_property_nature_i18n.id)
91. 0.081 21.622 ↑ 3.7 383 1

Nested Loop (cost=0.00..28.28 rows=1,400 width=16) (actual time=8.975..21.622 rows=383 loops=1)

92. 21.154 21.154 ↓ 27.6 387 1

CTE Scan on list_lots (cost=0.00..0.28 rows=14 width=44) (actual time=8.953..21.154 rows=387 loops=1)

93. 0.387 0.387 ↑ 100.0 1 387

Function Scan on unnest ref_property_nature_id (cost=0.00..1.00 rows=100 width=4) (actual time=0.001..0.001 rows=1 loops=387)

94. 0.037 0.193 ↓ 248.0 248 1

Hash (cost=10.00..10.00 rows=1 width=4) (actual time=0.193..0.193 rows=248 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 17kB
95. 0.156 0.156 ↓ 248.0 248 1

Seq Scan on ref_property_nature_i18n (cost=0.00..10.00 rows=1 width=4) (actual time=0.032..0.156 rows=248 loops=1)

  • Filter: ((culture)::text = ((SubPlan 13))::text)
96.          

SubPlan (for Seq Scan)

97. 0.000 0.000 ↑ 1.0 1 248

CTE Scan on params params_2 (cost=0.00..0.02 rows=1 width=32) (actual time=0.000..0.000 rows=1 loops=248)

98.          

CTE natures

99. 1.525 2.929 ↓ 33.2 365 1

GroupAggregate (cost=192.40..232.03 rows=11 width=69) (actual time=1.510..2.929 rows=365 loops=1)

  • Group Key: implantation_lpdi_4.portfolio_implantation_id
100.          

Initplan (for GroupAggregate)

101. 0.002 0.002 ↑ 1.0 1 1

CTE Scan on culture culture_4 (cost=0.00..0.02 rows=1 width=32) (actual time=0.002..0.002 rows=1 loops=1)

102. 0.151 1.402 ↑ 3.9 386 1

Sort (cost=192.38..196.13 rows=1,500 width=29) (actual time=1.375..1.402 rows=386 loops=1)

  • Sort Key: implantation_lpdi_4.portfolio_implantation_id
  • Sort Method: quicksort Memory: 51kB
103. 0.090 1.251 ↑ 3.9 386 1

Hash Left Join (cost=6.97..113.25 rows=1,500 width=29) (actual time=0.231..1.251 rows=386 loops=1)

  • Hash Cond: (ref_property_nature_id_1.ref_property_nature_id = ref_property_nature_i18n_1.id)
104. 0.000 1.083 ↑ 3.9 386 1

Nested Loop (cost=0.36..102.56 rows=1,500 width=12) (actual time=0.135..1.083 rows=386 loops=1)

105. 0.383 0.691 ↓ 26.1 392 1

Hash Join (cost=0.36..72.56 rows=15 width=32) (actual time=0.116..0.691 rows=392 loops=1)

  • Hash Cond: (portfolio_implantation_lot_1.portfolio_implantation_id = implantation_lpdi_4.portfolio_implantation_id)
106. 0.218 0.218 ↓ 1.0 2,625 1

Seq Scan on portfolio_implantation_lot portfolio_implantation_lot_1 (cost=0.00..62.22 rows=2,622 width=32) (actual time=0.006..0.218 rows=2,625 loops=1)

107. 0.050 0.090 ↓ 33.4 367 1

Hash (cost=0.22..0.22 rows=11 width=4) (actual time=0.090..0.090 rows=367 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 21kB
108. 0.040 0.040 ↓ 33.4 367 1

CTE Scan on implantation_lpdi implantation_lpdi_4 (cost=0.00..0.22 rows=11 width=4) (actual time=0.001..0.040 rows=367 loops=1)

109. 0.392 0.392 ↑ 100.0 1 392

Function Scan on unnest ref_property_nature_id_1 (cost=0.00..1.00 rows=100 width=4) (actual time=0.001..0.001 rows=1 loops=392)

110. 0.027 0.078 ↓ 1.0 124 1

Hash (cost=5.08..5.08 rows=123 width=21) (actual time=0.078..0.078 rows=124 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 15kB
111. 0.051 0.051 ↓ 1.0 124 1

Seq Scan on ref_property_nature_i18n ref_property_nature_i18n_1 (cost=0.00..5.08 rows=123 width=21) (actual time=0.017..0.051 rows=124 loops=1)

  • Filter: ((culture)::text = $27)
  • Rows Removed by Filter: 124
112.          

CTE calcul_lots

113. 1,821.527 12,572.468 ↓ 5.5 385 1

Nested Loop Left Join (cost=80.03..705.22 rows=70 width=12) (actual time=10,749.465..12,572.468 rows=385 loops=1)

114. 10,750.941 10,750.941 ↓ 5.5 385 1

Hash Right Join (cost=79.60..113.55 rows=70 width=20) (actual time=10,749.443..10,750.941 rows=385 loops=1)

  • Hash Cond: (implantation_lot_properties_unnest.portfolio_implantation_id = data_implantation_1.portfolio_implantation_id)