explain.depesz.com

PostgreSQL's explain analyze made readable

Result: cC8H : Req4 # o

Settings

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 0.002 151.989 ↓ 0.0 0 1

Unique (cost=7,348.23..7,350.03 rows=360 width=4) (actual time=151.989..151.989 rows=0 loops=1)

  • Buffers: shared hit=4846
2. 0.020 151.987 ↓ 0.0 0 1

Sort (cost=7,348.23..7,349.13 rows=360 width=4) (actual time=151.987..151.987 rows=0 loops=1)

  • Sort Key: t.num_ligne
  • Sort Method: quicksort Memory: 25kB
  • Buffers: shared hit=4846
3. 147.863 151.967 ↓ 0.0 0 1

Seq Scan on iai_gestion_templates_oceane t (cost=423.11..7,332.95 rows=360 width=4) (actual time=151.967..151.967 rows=0 loops=1)

  • Filter: (((hashed SubPlan 1) OR (hashed SubPlan 2)) AND (((id_template)::character varying)::text = '859'::text))
  • Rows Removed by Filter: 96126
  • Buffers: shared hit=4846
4.          

SubPlan (forSeq Scan)

5. 0.002 0.354 ↑ 4.0 2 1

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

  • Buffers: shared hit=28
6. 0.030 0.352 ↑ 2.7 3 1

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

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

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

  • Hash Cond: (u_g_e.id_entite = o.id_entite)
  • Buffers: shared hit=28
8. 0.028 0.251 ↑ 3.0 3 1

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

  • Hash Cond: (u_g_u.id_groupe = u_g_e.id_groupe)
  • Buffers: shared hit=27
9. 0.121 0.150 ↑ 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.046..0.150 rows=32 loops=1)

  • Recheck Cond: (id_user = 63)
  • Heap Blocks: exact=24
  • Buffers: shared hit=26
10. 0.029 0.029 ↑ 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.029..0.029 rows=32 loops=1)

  • Index Cond: (id_user = 63)
  • Buffers: shared hit=2
11. 0.039 0.073 ↑ 1.0 88 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 12kB
  • Buffers: shared hit=1
12. 0.034 0.034 ↑ 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.010..0.034 rows=88 loops=1)

  • Buffers: shared hit=1
13. 0.020 0.043 ↑ 1.0 14 1

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

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

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

  • Filter: ((actif)::text = 'Actif'::text)
  • Buffers: shared hit=1
15. 0.127 3.750 ↑ 2.7 141 1

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

  • Group Key: i.eds_params
  • Buffers: shared hit=71
16. 0.095 3.623 ↑ 2.7 142 1

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

  • Hash Cond: (u_g_e_1.id_eds = i.num_param_spec)
  • Buffers: shared hit=71
17. 0.090 2.854 ↑ 2.7 144 1

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

  • Hash Cond: (u_g_u_1.id_groupe = u_g_e_1.id_groupe)
  • Buffers: shared hit=56
18. 0.054 0.080 ↑ 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.036..0.080 rows=32 loops=1)

  • Recheck Cond: (id_user = 63)
  • Heap Blocks: exact=24
  • Buffers: shared hit=26
19. 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.026..0.026 rows=32 loops=1)

  • Index Cond: (id_user = 63)
  • Buffers: shared hit=2
20. 1.389 2.684 ↑ 1.0 4,280 1

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

  • Buckets: 8192 Batches: 1 Memory Usage: 232kB
  • Buffers: shared hit=30
21. 1.295 1.295 ↑ 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.012..1.295 rows=4,280 loops=1)

  • Buffers: shared hit=30
22. 0.227 0.674 ↑ 1.0 571 1

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

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

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

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