explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 8tsa

Settings
# exclusive inclusive rows x rows loops node
1. 263.604 1,824.566 ↑ 1.3 87,168 1

Hash Join (cost=37,378.26..2,881,148.81 rows=117,367 width=1,052) (actual time=329.322..1,824.566 rows=87,168 loops=1)

  • Hash Cond: (c.contenu_type_id = t.id)
2. 30.905 1,037.947 ↑ 1.3 87,168 1

Hash Join (cost=37,377.14..391,204.19 rows=117,367 width=945) (actual time=329.258..1,037.947 rows=87,168 loops=1)

  • Hash Cond: (v.etat_courant_id = e.id)
3. 100.185 1,007.039 ↑ 1.3 87,168 1

Nested Loop (cost=37,376.05..390,568.59 rows=117,367 width=922) (actual time=329.250..1,007.039 rows=87,168 loops=1)

4. 227.877 732.518 ↑ 1.3 87,168 1

Hash Join (cost=37,375.63..140,617.02 rows=117,367 width=178) (actual time=329.227..732.518 rows=87,168 loops=1)

  • Hash Cond: (c.current_version_id = vr.contenu_version_id)
5. 175.923 175.923 ↑ 1.0 347,762 1

Seq Scan on contenu c (cost=0.00..84,834.83 rows=348,783 width=174) (actual time=0.002..175.923 rows=347,762 loops=1)

  • Filter: (deleted_at IS NULL)
6. 28.041 328.718 ↓ 1.5 179,944 1

Hash (cost=35,449.54..35,449.54 rows=117,367 width=4) (actual time=328.718..328.718 rows=179,944 loops=1)

  • Buckets: 131,072 (originally 131072) Batches: 4 (originally 2) Memory Usage: 3,073kB
7. 24.835 300.677 ↓ 1.5 179,944 1

Unique (cost=33,689.04..34,275.87 rows=117,367 width=4) (actual time=257.550..300.677 rows=179,944 loops=1)

8.          

Initplan (for Unique)

9. 0.007 0.007 ↑ 1.0 1 1

Index Scan using rubrique_pkey on rubrique r_1 (cost=0.15..8.17 rows=1 width=4) (actual time=0.006..0.007 rows=1 loops=1)

  • Index Cond: (id = 2)
10. 0.005 0.005 ↑ 1.0 1 1

Index Scan using rubrique_pkey on rubrique r_2 (cost=0.15..8.17 rows=1 width=4) (actual time=0.005..0.005 rows=1 loops=1)

  • Index Cond: (id = 2)
11. 108.341 275.830 ↓ 1.7 199,277 1

Sort (cost=33,672.71..33,966.12 rows=117,367 width=4) (actual time=257.549..275.830 rows=199,277 loops=1)

  • Sort Key: vr.contenu_version_id
  • Sort Method: external merge Disk: 2,744kB
12. 104.163 167.489 ↓ 1.7 199,277 1

Hash Join (cost=13.98..23,790.01 rows=117,367 width=4) (actual time=0.071..167.489 rows=199,277 loops=1)

  • Hash Cond: (vr.rubrique_id = r.id)
13. 63.264 63.264 ↓ 1.0 1,060,080 1

Seq Scan on contenu_version_rubrique vr (cost=0.00..20,982.96 rows=1,049,396 width=8) (actual time=0.002..63.264 rows=1,060,080 loops=1)

14. 0.004 0.062 ↑ 1.5 23 1

Hash (cost=13.56..13.56 rows=34 width=4) (actual time=0.062..0.062 rows=23 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
15. 0.058 0.058 ↑ 1.5 23 1

Seq Scan on rubrique r (cost=0.00..13.56 rows=34 width=4) (actual time=0.016..0.058 rows=23 loops=1)

  • Filter: ((lft >= $3) AND (rgt <= $4))
  • Rows Removed by Filter: 281
16. 174.336 174.336 ↑ 1.0 1 87,168

Index Scan using contenu_version_pkey on contenu_version v (cost=0.42..2.13 rows=1 width=748) (actual time=0.002..0.002 rows=1 loops=87,168)

  • Index Cond: (id = c.current_version_id)
17. 0.001 0.003 ↑ 1.0 4 1

Hash (cost=1.04..1.04 rows=4 width=27) (actual time=0.003..0.003 rows=4 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
18. 0.002 0.002 ↑ 1.0 4 1

Seq Scan on contenu_etat e (cost=0.00..1.04 rows=4 width=27) (actual time=0.001..0.002 rows=4 loops=1)

19. 0.004 0.007 ↑ 1.0 5 1

Hash (cost=1.05..1.05 rows=5 width=18) (actual time=0.007..0.007 rows=5 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
20. 0.003 0.003 ↑ 1.0 5 1

Seq Scan on contenu_type t (cost=0.00..1.05 rows=5 width=18) (actual time=0.002..0.003 rows=5 loops=1)

21.          

SubPlan (for Hash Join)

22. 87.168 87.168 ↓ 0.0 0 87,168

Index Scan using auteur_contenu_version_contenu_version_id_idx on auteur_contenu_version (cost=0.29..8.30 rows=1 width=4) (actual time=0.001..0.001 rows=0 loops=87,168)

  • Index Cond: (contenu_version_id = v.id)
23. 348.672 348.672 ↑ 1.0 2 87,168

Index Scan using contenu_version_rubrique_contenu_version_id_idx on contenu_version_rubrique cvr (cost=0.43..8.47 rows=2 width=32) (actual time=0.003..0.004 rows=2 loops=87,168)

  • Index Cond: (contenu_version_id = v.id)
24. 87.168 87.168 ↓ 0.0 0 87,168

Index Only Scan using contenu_version_flag_edito_contenu_version_id_flag_edito_id_uni on contenu_version_flag_edito cvf (cost=0.42..4.44 rows=1 width=4) (actual time=0.001..0.001 rows=0 loops=87,168)

  • Index Cond: (contenu_version_id = v.id)
  • Heap Fetches: 37
Planning time : 1.047 ms
Execution time : 1,829.452 ms