explain.depesz.com

PostgreSQL's explain analyze made readable

Result: McP4 : Optimization for: Req4 # o; plan #cC8H

Settings

Optimization path:

# exclusive inclusive rows x rows loops node
1. 0.001 6.138 ↓ 0.0 0 1

Unique (cost=2,447.41..2,450.19 rows=555 width=4) (actual time=6.138..6.138 rows=0 loops=1)

  • Buffers: shared hit=153
2. 0.023 6.137 ↓ 0.0 0 1

Sort (cost=2,447.41..2,448.80 rows=555 width=4) (actual time=6.137..6.137 rows=0 loops=1)

  • Sort Key: t.num_ligne
  • Sort Method: quicksort Memory: 25kB
  • Buffers: shared hit=153
3. 1.874 6.114 ↓ 0.0 0 1

Bitmap Heap Scan on iai_gestion_templates_oceane t (cost=445.22..2,422.11 rows=555 width=4) (actual time=6.114..6.114 rows=0 loops=1)

  • Recheck Cond: (id_template = 859)
  • Filter: ((hashed SubPlan 1) OR (hashed SubPlan 2))
  • Rows Removed by Filter: 747
  • Heap Blocks: exact=49
  • Buffers: shared hit=153
4. 0.156 0.156 ↓ 1.0 747 1

Bitmap Index Scan on iai_gestion_templates_oceane_id_template (cost=0.00..21.97 rows=740 width=0) (actual time=0.156..0.156 rows=747 loops=1)

  • Index Cond: (id_template = 859)
  • Buffers: shared hit=5
5.          

SubPlan (forBitmap Heap Scan)

6. 0.004 0.343 ↑ 4.0 2 1

Unique (cost=117.59..117.63 rows=8 width=32) (actual time=0.341..0.343 rows=2 loops=1)

  • Buffers: shared hit=28
7. 0.029 0.339 ↑ 2.7 3 1

Sort (cost=117.59..117.61 rows=8 width=32) (actual time=0.339..0.339 rows=3 loops=1)

  • Sort Key: ((o.id_entite)::character varying)
  • Sort Method: quicksort Memory: 25kB
  • Buffers: shared hit=28
8. 0.025 0.310 ↑ 2.7 3 1

Hash Join (cost=8.87..117.47 rows=8 width=32) (actual time=0.231..0.310 rows=3 loops=1)

  • Hash Cond: (u_g_e.id_entite = o.id_entite)
  • Buffers: shared hit=28
9. 0.029 0.239 ↑ 3.0 3 1

Hash Join (cost=7.52..115.96 rows=9 width=4) (actual time=0.163..0.239 rows=3 loops=1)

  • Hash Cond: (u_g_u.id_groupe = u_g_e.id_groupe)
  • Buffers: shared hit=27
10. 0.114 0.140 ↑ 1.0 32 1

Bitmap Heap Scan on users_groupes_users u_g_u (cost=4.54..112.25 rows=32 width=4) (actual time=0.035..0.140 rows=32 loops=1)

  • Recheck Cond: (id_user = 63)
  • Heap Blocks: exact=24
  • Buffers: shared hit=26
11. 0.026 0.026 ↑ 1.0 32 1

Bitmap Index Scan on users_groupes_users_id_user (cost=0.00..4.53 rows=32 width=0) (actual time=0.025..0.026 rows=32 loops=1)

  • Index Cond: (id_user = 63)
  • Buffers: shared hit=2
12. 0.024 0.070 ↑ 1.0 88 1

Hash (cost=1.88..1.88 rows=88 width=8) (actual time=0.070..0.070 rows=88 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 12kB
  • Buffers: shared hit=1
13. 0.046 0.046 ↑ 1.0 88 1

Seq Scan on users_groupes_entite u_g_e (cost=0.00..1.88 rows=88 width=8) (actual time=0.011..0.046 rows=88 loops=1)

  • Buffers: shared hit=1
14. 0.016 0.046 ↑ 1.0 14 1

Hash (cost=1.18..1.18 rows=14 width=4) (actual time=0.046..0.046 rows=14 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
  • Buffers: shared hit=1
15. 0.030 0.030 ↑ 1.0 14 1

Seq Scan on iai_gestion_organisations o (cost=0.00..1.18 rows=14 width=4) (actual time=0.019..0.030 rows=14 loops=1)

  • Filter: ((actif)::text = 'Actif'::text)
  • Buffers: shared hit=1
16. 0.114 3.741 ↑ 2.7 141 1

HashAggregate (cost=300.74..304.52 rows=378 width=7) (actual time=3.704..3.741 rows=141 loops=1)

  • Group Key: i.eds_params
  • Buffers: shared hit=71
17. 0.094 3.627 ↑ 2.7 142 1

Hash Join (cost=160.25..299.80 rows=378 width=7) (actual time=3.466..3.627 rows=142 loops=1)

  • Hash Cond: (u_g_e_1.id_eds = i.num_param_spec)
  • Buffers: shared hit=71
18. 0.083 2.866 ↑ 2.7 144 1

Hash Join (cost=130.84..265.16 rows=385 width=4) (actual time=2.787..2.866 rows=144 loops=1)

  • Hash Cond: (u_g_u_1.id_groupe = u_g_e_1.id_groupe)
  • Buffers: shared hit=56
19. 0.059 0.077 ↑ 1.0 32 1

Bitmap Heap Scan on users_groupes_users u_g_u_1 (cost=4.54..112.25 rows=32 width=4) (actual time=0.034..0.077 rows=32 loops=1)

  • Recheck Cond: (id_user = 63)
  • Heap Blocks: exact=24
  • Buffers: shared hit=26
20. 0.018 0.018 ↑ 1.0 32 1

Bitmap Index Scan on users_groupes_users_id_user (cost=0.00..4.53 rows=32 width=0) (actual time=0.018..0.018 rows=32 loops=1)

  • Index Cond: (id_user = 63)
  • Buffers: shared hit=2
21. 1.334 2.706 ↑ 1.0 4,280 1

Hash (cost=72.80..72.80 rows=4,280 width=8) (actual time=2.706..2.706 rows=4,280 loops=1)

  • Buckets: 8192 Batches: 1 Memory Usage: 232kB
  • Buffers: shared hit=30
22. 1.372 1.372 ↑ 1.0 4,280 1

Seq Scan on users_groupes_eds u_g_e_1 (cost=0.00..72.80 rows=4,280 width=8) (actual time=0.011..1.372 rows=4,280 loops=1)

  • Buffers: shared hit=30
23. 0.177 0.667 ↑ 1.0 571 1

Hash (cost=22.27..22.27 rows=571 width=11) (actual time=0.667..0.667 rows=571 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 33kB
  • Buffers: shared hit=15
24. 0.490 0.490 ↑ 1.0 571 1

Seq Scan on iai_params_specifiques_eds i (cost=0.00..22.27 rows=571 width=11) (actual time=0.012..0.490 rows=571 loops=1)

  • Filter: ((actif)::text = 'Actif'::text)
  • Rows Removed by Filter: 11
  • Buffers: shared hit=15