explain.depesz.com

PostgreSQL's explain analyze made readable

Result: OHRT

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 0.376 ↑ 1.0 10 1

Limit (cost=17.75..392.65 rows=10 width=1,057) (actual time=0.083..0.376 rows=10 loops=1)

2.          

Initplan (for Limit)

3. 0.005 0.005 ↑ 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.004..0.005 rows=1 loops=1)

  • Index Cond: (id = 2)
4. 0.003 0.003 ↑ 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.003..0.003 rows=1 loops=1)

  • Index Cond: (id = 2)
5. 0.037 0.373 ↑ 11,834.5 10 1

Nested Loop (cost=1.42..4,436,733.77 rows=118,345 width=1,057) (actual time=0.083..0.373 rows=10 loops=1)

  • Join Filter: (c.contenu_type_id = t.id)
  • Rows Removed by Join Filter: 30
6. 0.010 0.266 ↑ 11,834.5 10 1

Nested Loop (cost=1.42..1,371,582.49 rows=118,345 width=950) (actual time=0.054..0.266 rows=10 loops=1)

  • Join Filter: (v.etat_courant_id = e.id)
  • Rows Removed by Join Filter: 20
7. 0.013 0.256 ↑ 11,834.5 10 1

Nested Loop Semi Join (cost=1.42..1,365,545.83 rows=118,345 width=927) (actual time=0.050..0.256 rows=10 loops=1)

  • Join Filter: (c.current_version_id = vr.contenu_version_id)
8. 0.017 0.128 ↑ 15,059.2 23 1

Nested Loop (cost=0.85..1,077,680.40 rows=346,361 width=927) (actual time=0.026..0.128 rows=23 loops=1)

9. 0.065 0.065 ↑ 15,059.2 23 1

Index Scan Backward using contenu_pkey on contenu c (cost=0.42..335,899.66 rows=346,361 width=174) (actual time=0.019..0.065 rows=23 loops=1)

  • Filter: ((deleted_at IS NULL) AND (statut_publication = 'publie'::contenu_statut_publication))
  • Rows Removed by Filter: 10
10. 0.046 0.046 ↑ 1.0 1 23

Index Scan using contenu_version_pkey on contenu_version v (cost=0.42..2.14 rows=1 width=753) (actual time=0.002..0.002 rows=1 loops=23)

  • Index Cond: (id = c.current_version_id)
11. 0.000 0.115 ↓ 0.0 0 23

Nested Loop (cost=0.57..0.82 rows=1 width=4) (actual time=0.005..0.005 rows=0 loops=23)

12. 0.069 0.069 ↑ 2.0 1 23

Index Only Scan using contenu_version_rubrique_contenu_version_id_rubrique_id_unique on contenu_version_rubrique vr (cost=0.43..0.48 rows=2 width=8) (actual time=0.003..0.003 rows=1 loops=23)

  • Index Cond: (contenu_version_id = v.id)
  • Heap Fetches: 26
13. 0.052 0.052 ↓ 0.0 0 26

Index Scan using rubrique_pkey on rubrique r (cost=0.15..0.17 rows=1 width=4) (actual time=0.002..0.002 rows=0 loops=26)

  • Index Cond: (id = vr.rubrique_id)
  • Filter: ((lft >= $3) AND (rgt <= $4))
  • Rows Removed by Filter: 1
14. 0.000 0.000 ↑ 1.3 3 10

Materialize (cost=0.00..1.06 rows=4 width=27) (actual time=0.000..0.000 rows=3 loops=10)

15. 0.002 0.002 ↑ 1.3 3 1

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

16. 0.000 0.000 ↑ 1.2 4 10

Materialize (cost=0.00..1.07 rows=5 width=18) (actual time=0.000..0.000 rows=4 loops=10)

17. 0.001 0.001 ↑ 1.2 4 1

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

18.          

SubPlan (for Nested Loop)

19. 0.010 0.010 ↓ 0.0 0 10

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=10)

  • Index Cond: (contenu_version_id = v.id)
20. 0.040 0.040 ↑ 1.0 2 10

Index Scan using contenu_version_rubrique_contenu_version_id_idx on contenu_version_rubrique cvr (cost=0.43..9.09 rows=2 width=32) (actual time=0.003..0.004 rows=2 loops=10)

  • Index Cond: (contenu_version_id = v.id)
21. 0.020 0.020 ↓ 0.0 0 10

Index Scan using contenu_version_fe_contenu_version_id_idx on contenu_version_flag_edito cvf (cost=0.42..8.44 rows=1 width=4) (actual time=0.002..0.002 rows=0 loops=10)

  • Index Cond: (contenu_version_id = v.id)
Planning time : 1.439 ms
Execution time : 0.470 ms