explain.depesz.com

PostgreSQL's explain analyze made readable

Result: wSma

Settings
# exclusive inclusive rows x rows loops node
1. 0.068 101.636 ↓ 8.3 50 1

Limit (cost=23,853.65..23,853.66 rows=6 width=3,095) (actual time=101.566..101.636 rows=50 loops=1)

2. 0.172 101.568 ↓ 8.3 50 1

Sort (cost=23,853.65..23,853.66 rows=6 width=3,095) (actual time=101.565..101.568 rows=50 loops=1)

  • Sort Key: bb.date_begin, bb.status_order, bb.last_modified_date DESC, bb.id
  • Sort Method: quicksort Memory: 169kB
3. 0.045 101.396 ↓ 13.3 80 1

Subquery Scan on bb (cost=23,853.45..23,853.57 rows=6 width=3,095) (actual time=101.283..101.396 rows=80 loops=1)

4. 0.070 101.351 ↓ 13.3 80 1

Unique (cost=23,853.45..23,853.51 rows=6 width=3,103) (actual time=101.276..101.351 rows=80 loops=1)

5. 0.457 101.281 ↓ 13.7 82 1

Sort (cost=23,853.45..23,853.46 rows=6 width=3,103) (actual time=101.275..101.281 rows=82 loops=1)

  • Sort Key: (CASE WHEN (("*SELECT* 1".intv_ent_id IS NOT NULL) OR ((entreprise_intv_exclude.real_id IS NOT NULL) AND ((v_partner_in_network.publish_mode)::text = 'false'::text)) OR ((entreprise_intv_exclude.real_id IS NULL) AND ((v_partner_in_network.publish_mode)::text = 'true'::text))) THEN true ELSE false END), (concat_ws('_'::text, "*SELECT* 1".sub_type_intv, "*SELECT* 1".real_id)), v_partner_in_network.from_entreprise_id
  • Sort Method: quicksort Memory: 173kB
6. 0.147 100.824 ↓ 13.7 82 1

Hash Left Join (cost=19,848.22..23,853.37 rows=6 width=3,103) (actual time=76.115..100.824 rows=82 loops=1)

  • Hash Cond: (("*SELECT* 1".real_id = entreprise_pin_up_intv.real_id) AND (("*SELECT* 1".type_intv)::text = (entreprise_pin_up_intv.type_intv)::text))
7. 0.195 100.612 ↓ 13.7 82 1

Nested Loop Left Join (cost=19,836.64..23,841.42 rows=6 width=3,023) (actual time=76.032..100.612 rows=82 loops=1)

  • Join Filter: (entreprise_intv_exclude.entreprise_id = v_partner_in_network.network_entreprise_id)
  • Rows Removed by Join Filter: 175
  • Filter: CASE WHEN (("*SELECT* 1".intv_ent_id IS NOT NULL) OR ((entreprise_intv_exclude.real_id IS NOT NULL) AND ((v_partner_in_network.publish_mode)::text = 'false'::text)) OR ((entreprise_intv_exclude.real_id IS NULL) AND ((v_partner_in_network.publish_mode)::text = 'true'::text))) THEN true ELSE false END
  • Rows Removed by Filter: 106
8. 0.113 100.041 ↓ 14.5 188 1

Hash Left Join (cost=19,836.36..23,741.26 rows=13 width=3,015) (actual time=76.015..100.041 rows=188 loops=1)

  • Hash Cond: ("*SELECT* 1".association_id = v_partner_in_network.association_id)
9. 0.027 27.864 ↓ 14.3 186 1

Append (cost=58.29..3,963.11 rows=13 width=2,960) (actual time=3.941..27.864 rows=186 loops=1)

10. 1.720 22.049 ↓ 15.1 166 1

Subquery Scan on *SELECT* 1 (cost=58.29..2,553.41 rows=11 width=2,661) (actual time=3.940..22.049 rows=166 loops=1)

  • Filter: (((alternatives: SubPlan 7 or hashed SubPlan 8) OR (alternatives: SubPlan 9 or hashed SubPlan 10) OR (alternatives: SubPlan 11 or hashed SubPlan 12) OR (alternatives: SubPlan 13 or hashed SubPlan 14) OR (alternatives: SubPlan 15 or hashed SubPlan 16) OR (alternatives: SubPlan 17 or hashed SubPlan 18)) AND ((alternatives: SubPlan 1 or hashed SubPlan 2) OR (alternatives: SubPlan 4 or hashed SubPlan 6)))
  • Rows Removed by Filter: 577
11. 3.506 18.112 ↓ 49.5 743 1

Hash Left Join (cost=58.29..747.07 rows=15 width=2,661) (actual time=0.702..18.112 rows=743 loops=1)

  • Hash Cond: (intv.entreprise_id = entreprise.id)
12. 0.016 14.545 ↓ 49.5 743 1

Nested Loop (cost=51.12..739.74 rows=15 width=1,573) (actual time=0.632..14.545 rows=743 loops=1)

  • Join Filter: (intv.intv_type_id = intv_type.id)
  • Rows Removed by Join Filter: 910
13. 0.205 4.870 ↓ 49.5 743 1

Nested Loop Left Join (cost=51.12..737.68 rows=15 width=1,057) (actual time=0.618..4.870 rows=743 loops=1)

14. 0.388 3.179 ↓ 49.5 743 1

Hash Left Join (cost=50.70..654.19 rows=15 width=942) (actual time=0.606..3.179 rows=743 loops=1)

  • Hash Cond: (intv.association_id = association.id)
15. 2.204 2.204 ↓ 49.5 743 1

Seq Scan on intv (cost=0.00..603.46 rows=15 width=912) (actual time=0.011..2.204 rows=743 loops=1)

  • Filter: (((entreprise_id = 27) OR (entreprise_id IS NULL)) AND (((status)::character varying(255))::text = ANY ('{OPEN,COMING_SOON}'::text[])))
  • Rows Removed by Filter: 1455
16. 0.221 0.587 ↓ 1.0 921 1

Hash (cost=39.20..39.20 rows=920 width=38) (actual time=0.587..0.587 rows=921 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 75kB
17. 0.366 0.366 ↓ 1.0 921 1

Seq Scan on association (cost=0.00..39.20 rows=920 width=38) (actual time=0.005..0.366 rows=921 loops=1)

18. 1.486 1.486 ↑ 1.0 1 743

Index Scan using pk_profile on profile (cost=0.42..5.57 rows=1 width=131) (actual time=0.002..0.002 rows=1 loops=743)

  • Index Cond: (id = association.profile_in_use_id)
19. 9.652 9.659 ↑ 2.5 2 743

Materialize (cost=0.00..1.11 rows=5 width=524) (actual time=0.000..0.013 rows=2 loops=743)

20. 0.007 0.007 ↑ 1.7 3 1

Seq Scan on intv_type (cost=0.00..1.08 rows=5 width=524) (actual time=0.006..0.007 rows=3 loops=1)

  • Filter: ((name)::text = ANY ('{EMPTY,INTV_STD,INTV_SPONSORSHIP,INTV_SKILL,INTV_DONATION}'::text[]))
  • Rows Removed by Filter: 1
21. 0.029 0.061 ↓ 1.1 149 1

Hash (cost=5.41..5.41 rows=141 width=28) (actual time=0.061..0.061 rows=149 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 18kB
22. 0.032 0.032 ↓ 1.1 149 1

Seq Scan on entreprise (cost=0.00..5.41 rows=141 width=28) (actual time=0.004..0.032 rows=149 loops=1)

23.          

SubPlan (for Subquery Scan)

24. 0.000 0.000 ↓ 0.0 0 127

Bitmap Heap Scan on intv_belong_theme (cost=4.30..10.34 rows=1 width=0) (actual time=0.000..0.000 rows=0 loops=127)

  • Recheck Cond: (intvs_id = "*SELECT* 1".intv_id)
  • Filter: (belong_themes_id = ANY ('{-1,13,11,3,9,6,12}'::bigint[]))
25. 0.000 0.000 ↓ 0.0 0 127

Bitmap Index Scan on intv_belong_theme_pkey (cost=0.00..4.29 rows=2 width=0) (actual time=0.000..0.000 rows=0 loops=127)

  • Index Cond: (intvs_id = "*SELECT* 1".intv_id)
26. 0.862 0.862 ↓ 1.0 1,492 1

Seq Scan on intv_belong_theme intv_belong_theme_1 (cost=0.00..76.39 rows=1,479 width=8) (actual time=0.007..0.862 rows=1,492 loops=1)

  • Filter: (belong_themes_id = ANY ('{-1,13,11,3,9,6,12}'::bigint[]))
  • Rows Removed by Filter: 1648
27. 0.000 0.000 ↓ 0.0 0 127

Index Only Scan using intv_belong_entreprise_theme_pkey on intv_belong_entreprise_theme (cost=0.28..8.30 rows=1 width=0) (actual time=0.000..0.000 rows=0 loops=127)

  • Index Cond: (intvs_id = "*SELECT* 1".intv_id)
  • Filter: (belong_entreprise_themes_id = ANY ('{1,2,3,4}'::bigint[]))
  • Heap Fetches: 0
28. 0.127 0.127 ↓ 1.0 458 1

Seq Scan on intv_belong_entreprise_theme intv_belong_entreprise_theme_1 (cost=0.00..13.49 rows=440 width=8) (actual time=0.010..0.127 rows=458 loops=1)

  • Filter: (belong_entreprise_themes_id = ANY ('{1,2,3,4}'::bigint[]))
  • Rows Removed by Filter: 219
29. 0.127 0.127 ↓ 0.0 0 127

Bitmap Heap Scan on intv_donation_belong_theme (cost=4.17..6.23 rows=1 width=0) (actual time=0.001..0.001 rows=0 loops=127)

  • Recheck Cond: (intv_donations_id = "*SELECT* 1".intv_donation_id)
  • Filter: (belong_themes_id = ANY ('{-1,13,11,3,9,6,12}'::bigint[]))
  • Rows Removed by Filter: 1
  • Heap Blocks: exact=49
30. 0.000 0.000 ↑ 3.0 1 127

Bitmap Index Scan on intv_donation_belong_theme_pkey (cost=0.00..4.17 rows=3 width=0) (actual time=0.000..0.000 rows=1 loops=127)

  • Index Cond: (intv_donations_id = "*SELECT* 1".intv_donation_id)
31. 0.044 0.044 ↓ 1.1 82 1

Seq Scan on intv_donation_belong_theme intv_donation_belong_theme_1 (cost=0.00..6.65 rows=76 width=8) (actual time=0.008..0.044 rows=82 loops=1)

  • Filter: (belong_themes_id = ANY ('{-1,13,11,3,9,6,12}'::bigint[]))
  • Rows Removed by Filter: 185
32. 0.000 0.000 ↓ 0.0 0 98

Index Only Scan using intv_donation_belong_entreprise_theme_pkey on intv_donation_belong_entreprise_theme (cost=0.15..8.66 rows=1 width=0) (actual time=0.000..0.000 rows=0 loops=98)

  • Index Cond: ((intv_donations_id = "*SELECT* 1".intv_donation_id) AND (belong_entreprise_themes_id = ANY ('{1,2,3,4}'::bigint[])))
  • Heap Fetches: 0
33. 0.001 0.001 ↓ 0.0 0 1

Seq Scan on intv_donation_belong_entreprise_theme intv_donation_belong_entreprise_theme_1 (cost=0.00..37.75 rows=37 width=8) (actual time=0.001..0.001 rows=0 loops=1)

  • Filter: (belong_entreprise_themes_id = ANY ('{1,2,3,4}'::bigint[]))
34. 0.000 0.000 ↓ 0.0 0

Seq Scan on intv_build_belong_theme (cost=0.00..6.23 rows=1 width=0) (never executed)

  • Filter: ((intv_builds_id = "*SELECT* 1".intv_build_id) AND (belong_themes_id = ANY ('{-1,13,11,3,9,6,12}'::bigint[])))
35. 0.093 0.093 ↓ 1.0 76 3

Seq Scan on intv_build_belong_theme intv_build_belong_theme_1 (cost=0.00..5.73 rows=75 width=8) (actual time=0.005..0.031 rows=76 loops=3)

  • Filter: (belong_themes_id = ANY ('{-1,13,11,3,9,6,12}'::bigint[]))
  • Rows Removed by Filter: 129
36. 0.000 0.000 ↓ 0.0 0 355

Index Only Scan using intv_ent_belong_entreprise_theme_pkey on intv_ent_belong_entreprise_theme (cost=0.28..8.30 rows=1 width=0) (actual time=0.000..0.000 rows=0 loops=355)

  • Index Cond: (intv_ents_id = "*SELECT* 1".intv_ent_id)
  • Filter: (belong_entreprise_themes_id = ANY ('{1,2,3,4}'::bigint[]))
  • Heap Fetches: 73
37. 0.000 0.000 ↓ 0.0 0

Seq Scan on intv_ent_belong_entreprise_theme intv_ent_belong_entreprise_theme_1 (cost=0.00..114.81 rows=206 width=8) (never executed)

  • Filter: (belong_entreprise_themes_id = ANY ('{1,2,3,4}'::bigint[]))
38. 0.000 0.000 ↓ 0.0 0

Seq Scan on partner partner_1 (cost=0.00..62.78 rows=1 width=0) (never executed)

  • Filter: (is_valid_entreprise AND is_valid_association AND (association_id = "*SELECT* 1".association_id) AND (entreprise_id = 27))
39. 0.963 0.963 ↑ 1.0 100 3

Seq Scan on partner partner_2 (cost=0.00..58.49 rows=104 width=8) (actual time=0.005..0.321 rows=100 loops=3)

  • Filter: (is_valid_entreprise AND is_valid_association AND (entreprise_id = 27))
  • Rows Removed by Filter: 1618
40. 0.000 0.000 ↓ 0.0 0 420

Index Only Scan using intv_ent_belong_template_rule_pkey on intv_ent_belong_template_rule (cost=1.55..9.57 rows=1 width=0) (actual time=0.000..0.000 rows=0 loops=420)

  • Index Cond: ((intv_ents_id = "*SELECT* 1".intv_ent_id) AND (belong_template_rules_id = $2))
  • Heap Fetches: 9
41.          

Initplan (for Index Only Scan)

42. 0.007 0.007 ↑ 1.0 1 1

Seq Scan on intv_ent_template_rule (cost=0.00..1.26 rows=1 width=8) (actual time=0.007..0.007 rows=1 loops=1)

  • Filter: ((name)::text = 'ALLOW_DISPLAY_INTV_ENT_IN_EXPLORER'::text)
  • Rows Removed by Filter: 20
43. 0.000 0.000 ↓ 0.0 0

Seq Scan on intv_ent_belong_template_rule intv_ent_belong_template_rule_1 (cost=1.26..597.30 rows=1,372 width=8) (never executed)

  • Filter: (belong_template_rules_id = $5)
44.          

Initplan (for Seq Scan)

45. 0.000 0.000 ↓ 0.0 0

Seq Scan on intv_ent_template_rule intv_ent_template_rule_1 (cost=0.00..1.26 rows=1 width=8) (never executed)

  • Filter: ((name)::text = 'ALLOW_DISPLAY_INTV_ENT_IN_EXPLORER'::text)
46. 0.674 1.127 ↓ 2.0 2 1

Subquery Scan on *SELECT* 2 (cost=21.90..295.75 rows=1 width=5,760) (actual time=0.706..1.127 rows=2 loops=1)

  • Filter: (((alternatives: SubPlan 7 or hashed SubPlan 8) OR (alternatives: SubPlan 9 or hashed SubPlan 10) OR (alternatives: SubPlan 11 or hashed SubPlan 12) OR (alternatives: SubPlan 13 or hashed SubPlan 14) OR (alternatives: SubPlan 15 or hashed SubPlan 16) OR (alternatives: SubPlan 17 or hashed SubPlan 18)) AND ((alternatives: SubPlan 1 or hashed SubPlan 2) OR (alternatives: SubPlan 4 or hashed SubPlan 6)))
  • Rows Removed by Filter: 47
47. 0.053 0.453 ↓ 24.5 49 1

Nested Loop Left Join (cost=21.90..54.90 rows=2 width=5,760) (actual time=0.188..0.453 rows=49 loops=1)

48. 0.063 0.302 ↓ 24.5 49 1

Nested Loop Left Join (cost=21.48..43.76 rows=2 width=948) (actual time=0.178..0.302 rows=49 loops=1)

49. 0.047 0.190 ↓ 24.5 49 1

Hash Right Join (cost=21.21..27.16 rows=2 width=918) (actual time=0.169..0.190 rows=49 loops=1)

  • Hash Cond: (entreprise_1.id = intv_donation.entreprise_id)
50. 0.021 0.021 ↓ 1.1 149 1

Seq Scan on entreprise entreprise_1 (cost=0.00..5.41 rows=141 width=28) (actual time=0.004..0.021 rows=149 loops=1)

51. 0.031 0.122 ↓ 24.5 49 1

Hash (cost=21.18..21.18 rows=2 width=898) (actual time=0.122..0.122 rows=49 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 54kB
52. 0.091 0.091 ↓ 24.5 49 1

Seq Scan on intv_donation (cost=0.00..21.18 rows=2 width=898) (actual time=0.014..0.091 rows=49 loops=1)

  • Filter: (((entreprise_id = 27) OR (entreprise_id IS NULL)) AND (((status)::character varying(255))::text = ANY ('{OPEN,COMING_SOON}'::text[])))
  • Rows Removed by Filter: 44
53. 0.049 0.049 ↑ 1.0 1 49

Index Scan using pk_association on association association_1 (cost=0.28..8.29 rows=1 width=38) (actual time=0.001..0.001 rows=1 loops=49)

  • Index Cond: (id = intv_donation.association_id)
54. 0.098 0.098 ↑ 1.0 1 49

Index Scan using pk_profile on profile profile_1 (cost=0.42..5.57 rows=1 width=131) (actual time=0.002..0.002 rows=1 loops=49)

  • Index Cond: (id = association_1.profile_in_use_id)
55. 0.906 4.661 ↓ 18.0 18 1

Subquery Scan on *SELECT* 4 (cost=1.53..1,113.88 rows=1 width=3,453) (actual time=0.706..4.661 rows=18 loops=1)

  • Filter: (((alternatives: SubPlan 7 or hashed SubPlan 8) OR (alternatives: SubPlan 9 or hashed SubPlan 10) OR (alternatives: SubPlan 11 or hashed SubPlan 12) OR (alternatives: SubPlan 13 or hashed SubPlan 14) OR (alternatives: SubPlan 15 or hashed SubPlan 16) OR (alternatives: SubPlan 17 or hashed SubPlan 18)) AND ((alternatives: SubPlan 1 or hashed SubPlan 2) OR (alternatives: SubPlan 4 or hashed SubPlan 6)))
  • Rows Removed by Filter: 60
56. 0.056 3.755 ↓ 39.0 78 1

Nested Loop Left Join (cost=1.53..873.04 rows=2 width=3,453) (actual time=0.063..3.755 rows=78 loops=1)

57. 0.084 3.621 ↓ 39.0 78 1

Hash Left Join (cost=1.38..872.15 rows=2 width=1,315) (actual time=0.051..3.621 rows=78 loops=1)

  • Hash Cond: (intv_ent.intv_ent_type_id = intv_ent_type.id)
  • Filter: (((intv_ent.entreprise_id = ANY ('{23,24,27}'::bigint[])) AND (intv_ent.id IS NOT NULL) AND (((intv_ent.status)::character varying(255))::text <> 'DRAFT'::text) AND (((intv_ent.status)::character varying(255))::text <> 'ARCHIVE'::text)) OR (((intv_ent_type.name)::text = ANY ('{EMPTY,INTV_STD,INTV_SPONSORSHIP,INTV_SKILL,INTV_DONATION}'::text[])) AND (((intv_ent.status)::character varying(255))::text = ANY ('{OPEN,COMING_SOON}'::text[])) AND ((intv_ent.entreprise_id = 27) OR (intv_ent.entreprise_id IS NULL))))
58. 3.523 3.523 ↑ 1.1 78 1

Seq Scan on intv_ent (cost=0.00..870.27 rows=88 width=807) (actual time=0.025..3.523 rows=78 loops=1)

  • Filter: (((entreprise_id = ANY ('{23,24,27}'::bigint[])) AND (id IS NOT NULL) AND (((status)::character varying(255))::text <> 'DRAFT'::text) AND (((status)::character varying(255))::text <> 'ARCHIVE'::text)) OR ((((status)::character varying(255))::text = ANY ('{OPEN,COMING_SOON}'::text[])) AND ((entreprise_id = 27) OR (entreprise_id IS NULL))))
  • Rows Removed by Filter: 4144
59. 0.006 0.014 ↓ 1.4 24 1

Hash (cost=1.17..1.17 rows=17 width=524) (actual time=0.014..0.014 rows=24 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 10kB
60. 0.008 0.008 ↓ 1.4 24 1

Seq Scan on intv_ent_type (cost=0.00..1.17 rows=17 width=524) (actual time=0.005..0.008 rows=24 loops=1)

61. 0.078 0.078 ↑ 1.0 1 78

Index Scan using pk_entreprise on entreprise entreprise_2 (cost=0.14..0.44 rows=1 width=28) (actual time=0.001..0.001 rows=1 loops=78)

  • Index Cond: (id = intv_ent.entreprise_id)
62. 0.026 72.064 ↓ 53.0 106 1

Hash (cost=19,778.04..19,778.04 rows=2 width=63) (actual time=72.064..72.064 rows=106 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 16kB
63. 0.019 72.038 ↓ 53.0 106 1

Subquery Scan on v_partner_in_network (cost=19,777.98..19,778.04 rows=2 width=63) (actual time=71.936..72.038 rows=106 loops=1)

64. 0.086 72.019 ↓ 53.0 106 1

WindowAgg (cost=19,777.98..19,778.02 rows=2 width=87) (actual time=71.935..72.019 rows=106 loops=1)

65. 0.032 71.933 ↓ 53.0 106 1

Sort (cost=19,777.98..19,777.99 rows=2 width=63) (actual time=71.926..71.933 rows=106 loops=1)

  • Sort Key: partner.id
  • Sort Method: quicksort Memory: 33kB
66. 0.292 71.901 ↓ 53.0 106 1

Hash Join (cost=19,717.05..19,777.97 rows=2 width=63) (actual time=71.423..71.901 rows=106 loops=1)

  • Hash Cond: (partner.entreprise_id = "*SELECT* 1_1".network_entreprise_id)
67. 0.197 0.197 ↑ 1.0 1,718 1

Seq Scan on partner (cost=0.00..54.19 rows=1,719 width=24) (actual time=0.004..0.197 rows=1,718 loops=1)

68. 0.003 71.412 ↓ 6.0 6 1

Hash (cost=19,717.04..19,717.04 rows=1 width=63) (actual time=71.411..71.412 rows=6 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
69. 0.037 71.409 ↓ 6.0 6 1

Merge Join (cost=19,716.90..19,717.04 rows=1 width=63) (actual time=71.385..71.409 rows=6 loops=1)

  • Merge Cond: ("*SELECT* 1_2".entreprise_id = "*SELECT* 1_1".network_entreprise_id)
  • Join Filter: (("*SELECT* 1_2".network_entreprise_node_left <= "*SELECT* 1_1".entreprise_node_left) AND ("*SELECT* 1_2".network_entreprise_node_right >= "*SELECT* 1_1".entreprise_node_right))
  • Rows Removed by Join Filter: 90
70. 0.086 71.248 ↓ 8.3 150 1

Sort (cost=19,688.79..19,688.83 rows=18 width=55) (actual time=71.240..71.248 rows=150 loops=1)

  • Sort Key: "*SELECT* 1_2".entreprise_id
  • Sort Method: quicksort Memory: 51kB
71. 0.122 71.162 ↓ 18.9 340 1

Hash Join (cost=19,519.05..19,688.41 rows=18 width=55) (actual time=69.256..71.162 rows=340 loops=1)

  • Hash Cond: ("*SELECT* 1_2".network_entreprise_id = v_entreprise_property.entreprise_id)
72. 0.037 2.009 ↑ 2.6 344 1

Append (cost=18.86..184.67 rows=900 width=24) (actual time=0.218..2.009 rows=344 loops=1)

73. 0.052 1.857 ↑ 2.8 318 1

Subquery Scan on *SELECT* 1_2 (cost=18.86..168.60 rows=899 width=24) (actual time=0.217..1.857 rows=318 loops=1)

74. 1.536 1.805 ↑ 2.8 318 1

Hash Join (cost=18.86..159.61 rows=899 width=1,080) (actual time=0.216..1.805 rows=318 loops=1)

  • Hash Cond: ((entreprise_network.name)::text = (entreprise_network_in_network.name)::text)
  • Join Filter: ((entreprise_network_in_network.node_left >= entreprise_network.node_left) AND (entreprise_network_in_network.node_right <= entreprise_network.node_right))
  • Rows Removed by Join Filter: 7777
75. 0.057 0.137 ↑ 1.0 123 1

Hash Join (cost=5.77..11.56 rows=123 width=23) (actual time=0.061..0.137 rows=123 loops=1)

  • Hash Cond: (entreprise_3.id = entreprise_network.entreprise_id)
76. 0.028 0.028 ↓ 1.1 149 1

Seq Scan on entreprise entreprise_3 (cost=0.00..5.41 rows=141 width=8) (actual time=0.003..0.028 rows=149 loops=1)

77. 0.023 0.052 ↑ 1.0 123 1

Hash (cost=4.23..4.23 rows=123 width=23) (actual time=0.052..0.052 rows=123 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 15kB
78. 0.029 0.029 ↑ 1.0 123 1

Seq Scan on entreprise_network (cost=0.00..4.23 rows=123 width=23) (actual time=0.007..0.029 rows=123 loops=1)

79. 0.026 0.132 ↑ 1.0 123 1

Hash (cost=11.56..11.56 rows=123 width=23) (actual time=0.132..0.132 rows=123 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 15kB
80. 0.046 0.106 ↑ 1.0 123 1

Hash Join (cost=5.77..11.56 rows=123 width=23) (actual time=0.049..0.106 rows=123 loops=1)

  • Hash Cond: (entreprise_in_network.id = entreprise_network_in_network.entreprise_id)
81. 0.018 0.018 ↓ 1.1 149 1

Seq Scan on entreprise entreprise_in_network (cost=0.00..5.41 rows=141 width=8) (actual time=0.001..0.018 rows=149 loops=1)

82. 0.020 0.042 ↑ 1.0 123 1

Hash (cost=4.23..4.23 rows=123 width=23) (actual time=0.042..0.042 rows=123 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 15kB
83. 0.022 0.022 ↑ 1.0 123 1

Seq Scan on entreprise_network entreprise_network_in_network (cost=0.00..4.23 rows=123 width=23) (actual time=0.002..0.022 rows=123 loops=1)

84. 0.006 0.115 ↓ 26.0 26 1

Subquery Scan on *SELECT* 2_2 (cost=5.77..11.57 rows=1 width=24) (actual time=0.065..0.115 rows=26 loops=1)

85. 0.042 0.109 ↓ 26.0 26 1

Hash Left Join (cost=5.77..11.56 rows=1 width=596) (actual time=0.064..0.109 rows=26 loops=1)

  • Hash Cond: (entreprise_4.id = entreprise_network_1.entreprise_id)
  • Filter: (entreprise_network_1.name IS NULL)
  • Rows Removed by Filter: 123
86. 0.020 0.020 ↓ 1.1 149 1

Seq Scan on entreprise entreprise_4 (cost=0.00..5.41 rows=141 width=8) (actual time=0.007..0.020 rows=149 loops=1)

87. 0.023 0.047 ↑ 1.0 123 1

Hash (cost=4.23..4.23 rows=123 width=15) (actual time=0.046..0.047 rows=123 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 14kB
88. 0.024 0.024 ↑ 1.0 123 1

Seq Scan on entreprise_network entreprise_network_1 (cost=0.00..4.23 rows=123 width=15) (actual time=0.005..0.024 rows=123 loops=1)

89. 0.037 69.031 ↓ 36.2 145 1

Hash (cost=19,500.14..19,500.14 rows=4 width=39) (actual time=69.031..69.031 rows=145 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 15kB
90. 5.780 68.994 ↓ 36.2 145 1

Subquery Scan on v_entreprise_property (cost=19,425.48..19,500.14 rows=4 width=39) (actual time=67.010..68.994 rows=145 loops=1)

  • Filter: ((v_entreprise_property.entreprise_property_name)::text = 'DISPLAY_GOOGLE_MAP'::text)
  • Rows Removed by Filter: 4413
91. 1.205 63.214 ↓ 5.3 4,558 1

Unique (cost=19,425.48..19,489.48 rows=853 width=2,346) (actual time=61.536..63.214 rows=4,558 loops=1)

92. 11.317 62.009 ↑ 1.3 6,430 1

Sort (cost=19,425.48..19,446.81 rows=8,533 width=2,346) (actual time=61.535..62.009 rows=6,430 loops=1)

  • Sort Key: sub_quest.entreprise_property_name, sub_quest.entreprise_id, sub_quest.prioritization
  • Sort Method: quicksort Memory: 1189kB
93. 8.069 50.692 ↑ 1.3 6,430 1

Result (cost=9,859.71..10,205.82 rows=8,533 width=2,346) (actual time=21.379..50.692 rows=6,430 loops=1)

94. 1.715 42.623 ↑ 1.3 6,430 1

Append (cost=9,859.71..10,120.49 rows=8,533 width=68) (actual time=21.373..42.623 rows=6,430 loops=1)

95. 2.395 26.735 ↑ 1.8 4,060 1

Subquery Scan on sub_quest (cost=9,859.71..9,988.78 rows=7,375 width=72) (actual time=21.372..26.735 rows=4,060 loops=1)

96. 2.002 24.340 ↑ 1.8 4,060 1

Unique (cost=9,859.71..9,915.03 rows=7,375 width=2,860) (actual time=21.368..24.340 rows=4,060 loops=1)

97. 17.747 22.338 ↑ 1.5 4,833 1

Sort (cost=9,859.71..9,878.15 rows=7,375 width=2,860) (actual time=21.366..22.338 rows=4,833 loops=1)

  • Sort Key: entreprise_property.name, entreprise_5.id, entreprise_network2.node_left DESC
  • Sort Method: quicksort Memory: 1024kB
98. 1.748 4.591 ↑ 1.5 4,833 1

Hash Join (cost=72.22..285.93 rows=7,375 width=2,860) (actual time=1.226..4.591 rows=4,833 loops=1)

  • Hash Cond: (entreprisenetwork.entreprise_param_id = entreprise_param.id)
99. 1.572 1.830 ↑ 2.8 318 1

Hash Join (cost=18.86..159.61 rows=899 width=20) (actual time=0.204..1.830 rows=318 loops=1)

  • Hash Cond: ((entreprise_network_2.name)::text = (entreprise_network2.name)::text)
  • Join Filter: ((entreprise_network2.node_left <= entreprise_network_2.node_left) AND (entreprise_network2.node_right >= entreprise_network_2.node_right))
  • Rows Removed by Join Filter: 7777
100. 0.053 0.115 ↑ 1.0 123 1

Hash Join (cost=5.77..11.56 rows=123 width=23) (actual time=0.050..0.115 rows=123 loops=1)

  • Hash Cond: (entreprise_5.id = entreprise_network_2.entreprise_id)
101. 0.019 0.019 ↓ 1.1 149 1

Seq Scan on entreprise entreprise_5 (cost=0.00..5.41 rows=141 width=8) (actual time=0.001..0.019 rows=149 loops=1)

102. 0.021 0.043 ↑ 1.0 123 1

Hash (cost=4.23..4.23 rows=123 width=23) (actual time=0.043..0.043 rows=123 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 15kB
103. 0.022 0.022 ↑ 1.0 123 1

Seq Scan on entreprise_network entreprise_network_2 (cost=0.00..4.23 rows=123 width=23) (actual time=0.003..0.022 rows=123 loops=1)

104. 0.026 0.143 ↑ 1.0 123 1

Hash (cost=11.56..11.56 rows=123 width=23) (actual time=0.143..0.143 rows=123 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 15kB
105. 0.061 0.117 ↑ 1.0 123 1

Hash Join (cost=5.77..11.56 rows=123 width=23) (actual time=0.049..0.117 rows=123 loops=1)

  • Hash Cond: (entreprisenetwork.id = entreprise_network2.entreprise_id)
106. 0.015 0.015 ↓ 1.1 149 1

Seq Scan on entreprise entreprisenetwork (cost=0.00..5.41 rows=141 width=16) (actual time=0.001..0.015 rows=149 loops=1)

107. 0.021 0.041 ↑ 1.0 123 1

Hash (cost=4.23..4.23 rows=123 width=23) (actual time=0.041..0.041 rows=123 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 16kB
108. 0.020 0.020 ↑ 1.0 123 1

Seq Scan on entreprise_network entreprise_network2 (cost=0.00..4.23 rows=123 width=23) (actual time=0.002..0.020 rows=123 loops=1)

109. 0.228 1.013 ↑ 1.0 950 1

Hash (cost=41.26..41.26 rows=968 width=76) (actual time=1.013..1.013 rows=950 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 108kB
110. 0.289 0.785 ↑ 1.0 950 1

Hash Join (cost=8.27..41.26 rows=968 width=76) (actual time=0.093..0.785 rows=950 loops=1)

  • Hash Cond: (entreprise_param_property.entreprise_property_id = entreprise_property.id)
111. 0.305 0.460 ↑ 1.0 950 1

Hash Join (cost=4.65..34.97 rows=968 width=59) (actual time=0.052..0.460 rows=950 loops=1)

  • Hash Cond: (entreprise_param_property.entreprise_param_id = entreprise_param.id)
112. 0.115 0.115 ↑ 1.0 950 1

Seq Scan on entreprise_param_property (cost=0.00..27.68 rows=968 width=51) (actual time=0.005..0.115 rows=950 loops=1)

113. 0.019 0.040 ↓ 1.3 149 1

Hash (cost=3.18..3.18 rows=118 width=8) (actual time=0.040..0.040 rows=149 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 14kB
114. 0.021 0.021 ↓ 1.3 149 1

Seq Scan on entreprise_param (cost=0.00..3.18 rows=118 width=8) (actual time=0.004..0.021 rows=149 loops=1)

115. 0.019 0.036 ↓ 1.1 81 1

Hash (cost=2.72..2.72 rows=72 width=33) (actual time=0.036..0.036 rows=81 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 14kB
116. 0.017 0.017 ↓ 1.1 81 1

Seq Scan on entreprise_property (cost=0.00..2.72 rows=72 width=33) (actual time=0.005..0.017 rows=81 loops=1)

117. 0.084 11.776 ↓ 470.0 470 1

Subquery Scan on *SELECT* 2_3 (cost=6.33..20.34 rows=1 width=72) (actual time=0.336..11.776 rows=470 loops=1)

118. 0.543 11.692 ↓ 470.0 470 1

Nested Loop (cost=6.33..20.33 rows=1 width=2,376) (actual time=0.335..11.692 rows=470 loops=1)

119. 0.197 2.689 ↓ 470.0 470 1

Nested Loop (cost=6.19..20.15 rows=1 width=51) (actual time=0.324..2.689 rows=470 loops=1)

  • Join Filter: (entreprise_6.entreprise_param_id = entreprise_param_1.id)
120. 0.129 1.552 ↓ 470.0 470 1

Nested Loop (cost=6.04..19.96 rows=1 width=67) (actual time=0.316..1.552 rows=470 loops=1)

121. 0.077 0.383 ↓ 26.0 26 1

Hash Left Join (cost=5.77..11.56 rows=1 width=16) (actual time=0.299..0.383 rows=26 loops=1)

  • Hash Cond: (entreprise_6.id = entreprise_network_3.entreprise_id)
  • Filter: (entreprise_network_3.name IS NULL)
  • Rows Removed by Filter: 123
122. 0.040 0.040 ↓ 1.1 149 1

Seq Scan on entreprise entreprise_6 (cost=0.00..5.41 rows=141 width=16) (actual time=0.017..0.040 rows=149 loops=1)

123. 0.239 0.266 ↑ 1.0 123 1

Hash (cost=4.23..4.23 rows=123 width=15) (actual time=0.266..0.266 rows=123 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 14kB
124. 0.027 0.027 ↑ 1.0 123 1

Seq Scan on entreprise_network entreprise_network_3 (cost=0.00..4.23 rows=123 width=15) (actual time=0.006..0.027 rows=123 loops=1)

125. 1.040 1.040 ↓ 2.2 18 26

Index Scan using entreprise_param_property_pkey on entreprise_param_property entreprise_param_property_1 (cost=0.28..8.32 rows=8 width=51) (actual time=0.015..0.040 rows=18 loops=26)

  • Index Cond: (entreprise_param_id = entreprise_6.entreprise_param_id)
126. 0.940 0.940 ↑ 1.0 1 470

Index Only Scan using pk_entreprise_param on entreprise_param entreprise_param_1 (cost=0.14..0.18 rows=1 width=8) (actual time=0.002..0.002 rows=1 loops=470)

  • Index Cond: (id = entreprise_param_property_1.entreprise_param_id)
  • Heap Fetches: 470
127. 8.460 8.460 ↑ 1.0 1 470

Index Scan using pk_entreprise_property on entreprise_property entreprise_property_1 (cost=0.14..0.18 rows=1 width=33) (actual time=0.018..0.018 rows=1 loops=470)

  • Index Cond: (id = entreprise_param_property_1.entreprise_property_id)
128. 0.310 2.397 ↓ 1.6 1,900 1

Subquery Scan on *SELECT* 3 (cost=11.83..68.72 rows=1,157 width=42) (actual time=0.145..2.397 rows=1,900 loops=1)

129. 0.829 2.087 ↓ 1.6 1,900 1

Hash Join (cost=11.83..57.15 rows=1,157 width=2,328) (actual time=0.144..2.087 rows=1,900 loops=1)

  • Hash Cond: (entreprise_7.entreprise_param_id = entreprise_param_2.id)
130. 0.487 1.209 ↓ 2.0 1,900 1

Hash Join (cost=7.17..49.87 rows=968 width=54) (actual time=0.081..1.209 rows=1,900 loops=1)

  • Hash Cond: (entreprise_param_property_2.entreprise_param_id = entreprise_7.entreprise_param_id)
131. 0.442 0.659 ↓ 2.0 1,900 1

Nested Loop (cost=0.00..40.08 rows=968 width=38) (actual time=0.011..0.659 rows=1,900 loops=1)

132. 0.015 0.015 ↓ 2.0 2 1

Seq Scan on entreprise_property entreprise_property_2 (cost=0.00..2.72 rows=1 width=30) (actual time=0.006..0.015 rows=2 loops=1)

  • Filter: default_setup
  • Rows Removed by Filter: 79
133. 0.202 0.202 ↑ 1.0 950 2

Seq Scan on entreprise_param_property entreprise_param_property_2 (cost=0.00..27.68 rows=968 width=8) (actual time=0.002..0.101 rows=950 loops=2)

134. 0.021 0.063 ↓ 1.1 149 1

Hash (cost=5.41..5.41 rows=141 width=16) (actual time=0.063..0.063 rows=149 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 15kB
135. 0.042 0.042 ↓ 1.1 149 1

Seq Scan on entreprise entreprise_7 (cost=0.00..5.41 rows=141 width=16) (actual time=0.006..0.042 rows=149 loops=1)

136. 0.021 0.049 ↓ 1.3 149 1

Hash (cost=3.18..3.18 rows=118 width=8) (actual time=0.048..0.049 rows=149 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 14kB
137. 0.028 0.028 ↓ 1.3 149 1

Seq Scan on entreprise_param entreprise_param_2 (cost=0.00..3.18 rows=118 width=8) (actual time=0.012..0.028 rows=149 loops=1)

138. 0.010 0.124 ↓ 12.0 96 1

Sort (cost=28.11..28.13 rows=8 width=24) (actual time=0.118..0.124 rows=96 loops=1)

  • Sort Key: "*SELECT* 1_1".network_entreprise_id
  • Sort Method: quicksort Memory: 25kB
139. 0.001 0.114 ↑ 2.7 3 1

Append (cost=4.69..27.99 rows=8 width=24) (actual time=0.060..0.114 rows=3 loops=1)

140. 0.002 0.091 ↑ 2.3 3 1

Subquery Scan on *SELECT* 1_1 (cost=4.69..17.62 rows=7 width=24) (actual time=0.059..0.091 rows=3 loops=1)

141. 0.005 0.089 ↑ 2.3 3 1

Nested Loop (cost=4.69..17.55 rows=7 width=1,080) (actual time=0.058..0.089 rows=3 loops=1)

142. 0.004 0.075 ↑ 2.3 3 1

Nested Loop (cost=4.55..15.05 rows=7 width=24) (actual time=0.047..0.075 rows=3 loops=1)

143. 0.012 0.012 ↑ 1.0 1 1

Seq Scan on entreprise entreprise_8 (cost=0.00..5.76 rows=1 width=8) (actual time=0.007..0.012 rows=1 loops=1)

  • Filter: (id = 27)
  • Rows Removed by Filter: 148
144. 0.036 0.059 ↑ 2.3 3 1

Hash Join (cost=4.55..9.22 rows=7 width=24) (actual time=0.037..0.059 rows=3 loops=1)

  • Hash Cond: ((entreprise_network_in_network_1.name)::text = (entreprise_network_4.name)::text)
  • Join Filter: ((entreprise_network_in_network_1.node_left <= entreprise_network_4.node_left) AND (entreprise_network_in_network_1.node_right >= entreprise_network_4.node_right))
  • Rows Removed by Join Filter: 83
145. 0.011 0.011 ↑ 1.0 123 1

Seq Scan on entreprise_network entreprise_network_in_network_1 (cost=0.00..4.23 rows=123 width=23) (actual time=0.001..0.011 rows=123 loops=1)

146. 0.002 0.012 ↑ 1.0 1 1

Hash (cost=4.54..4.54 rows=1 width=23) (actual time=0.012..0.012 rows=1 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
147. 0.010 0.010 ↑ 1.0 1 1

Seq Scan on entreprise_network entreprise_network_4 (cost=0.00..4.54 rows=1 width=23) (actual time=0.009..0.010 rows=1 loops=1)

  • Filter: (entreprise_id = 27)
  • Rows Removed by Filter: 122
148. 0.009 0.009 ↑ 1.0 1 3

Index Only Scan using pk_entreprise on entreprise entreprise_in_network_1 (cost=0.14..0.36 rows=1 width=8) (actual time=0.003..0.003 rows=1 loops=3)

  • Index Cond: (id = entreprise_network_in_network_1.entreprise_id)
  • Heap Fetches: 3
149. 0.001 0.022 ↓ 0.0 0 1

Subquery Scan on *SELECT* 2_1 (cost=0.00..10.32 rows=1 width=24) (actual time=0.022..0.022 rows=0 loops=1)

150. 0.002 0.021 ↓ 0.0 0 1

Nested Loop Left Join (cost=0.00..10.31 rows=1 width=596) (actual time=0.021..0.021 rows=0 loops=1)

  • Join Filter: (entreprise_9.id = entreprise_network_5.entreprise_id)
  • Filter: (entreprise_network_5.name IS NULL)
  • Rows Removed by Filter: 1
151. 0.011 0.011 ↑ 1.0 1 1

Seq Scan on entreprise entreprise_9 (cost=0.00..5.76 rows=1 width=8) (actual time=0.006..0.011 rows=1 loops=1)

  • Filter: (id = 27)
  • Rows Removed by Filter: 148
152. 0.008 0.008 ↑ 1.0 1 1

Seq Scan on entreprise_network entreprise_network_5 (cost=0.00..4.54 rows=1 width=15) (actual time=0.008..0.008 rows=1 loops=1)

  • Filter: (entreprise_id = 27)
  • Rows Removed by Filter: 94
153. 0.376 0.376 ↑ 1.0 1 188

Index Only Scan using entreprise_intv_exclude_pkey on entreprise_intv_exclude (cost=0.28..7.69 rows=1 width=24) (actual time=0.002..0.002 rows=1 loops=188)

  • Index Cond: ((real_id = "*SELECT* 1".real_id) AND (intv_type_id = "*SELECT* 1".intv_type_id))
  • Heap Fetches: 281
154. 0.006 0.065 ↑ 1.1 13 1

Hash (cost=11.37..11.37 rows=14 width=82) (actual time=0.065..0.065 rows=13 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 10kB
155. 0.059 0.059 ↑ 1.1 13 1

Seq Scan on entreprise_pin_up_intv (cost=0.00..11.37 rows=14 width=82) (actual time=0.014..0.059 rows=13 loops=1)

  • Filter: ((entreprise_id = ANY ('{23,24,27}'::bigint[])) AND ((date_end IS NULL) OR (date_end >= CURRENT_DATE)) AND (date_begin <= CURRENT_DATE))
  • Rows Removed by Filter: 238
Planning time : 15.593 ms
Execution time : 102.475 ms