explain.depesz.com

PostgreSQL's explain analyze made readable

Result: pRUO

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 3,375.126 ↑ 10.0 1 1

Limit (cost=17.75..387.40 rows=10 width=1,057) (actual time=14.074..3,375.126 rows=1 loops=1)

2.          

Initplan (for Limit)

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

  • Index Cond: (id = 280)
4. 0.006 0.006 ↑ 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.006 rows=1 loops=1)

  • Index Cond: (id = 280)
5. 0.009 3,375.124 ↑ 118,345.0 1 1

Nested Loop (cost=1.42..4,374,575.61 rows=118,345 width=1,057) (actual time=14.074..3,375.124 rows=1 loops=1)

  • Join Filter: (c.contenu_type_id = t.id)
  • Rows Removed by Join Filter: 3
6. 0.002 3,375.084 ↑ 118,345.0 1 1

Nested Loop (cost=1.42..1,309,424.33 rows=118,345 width=950) (actual time=14.034..3,375.084 rows=1 loops=1)

  • Join Filter: (v.etat_courant_id = e.id)
  • Rows Removed by Join Filter: 2
7. 0.002 3,375.077 ↑ 118,345.0 1 1

Nested Loop (cost=1.42..1,303,387.68 rows=118,345 width=927) (actual time=14.027..3,375.077 rows=1 loops=1)

8. 134.067 3,375.063 ↑ 29,795.8 4 1

Nested Loop Semi Join (cost=1.00..1,203,577.19 rows=119,183 width=757) (actual time=14.003..3,375.063 rows=4 loops=1)

9. 694.989 694.989 ↓ 1.0 848,669 1

Index Scan Backward using contenu_version_date_publication_idx on contenu_version v (cost=0.42..502,612.94 rows=845,948 width=753) (actual time=0.018..694.989 rows=848,669 loops=1)

10. 626.700 2,546.007 ↓ 0.0 0 848,669

Nested Loop (cost=0.57..0.82 rows=1 width=4) (actual time=0.003..0.003 rows=0 loops=848,669)

11. 848.669 848.669 ↑ 2.0 1 848,669

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.001..0.001 rows=1 loops=848,669)

  • Index Cond: (contenu_version_id = v.id)
  • Heap Fetches: 24,014
12. 1,070.638 1,070.638 ↓ 0.0 0 1,070,638

Index Scan using rubrique_pkey on rubrique r (cost=0.15..0.17 rows=1 width=4) (actual time=0.001..0.001 rows=0 loops=1,070,638)

  • Index Cond: (id = vr.rubrique_id)
  • Filter: ((lft >= $3) AND (rgt <= $4))
  • Rows Removed by Filter: 1
13. 0.012 0.012 ↓ 0.0 0 4

Index Scan using contenu_current_version_id_idx on contenu c (cost=0.42..0.84 rows=1 width=174) (actual time=0.003..0.003 rows=0 loops=4)

  • Index Cond: (current_version_id = v.id)
  • Filter: ((deleted_at IS NULL) AND (statut_publication = 'publie'::contenu_statut_publication))
14. 0.002 0.005 ↑ 1.3 3 1

Materialize (cost=0.00..1.06 rows=4 width=27) (actual time=0.004..0.005 rows=3 loops=1)

15. 0.003 0.003 ↑ 1.3 3 1

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

16. 0.001 0.004 ↑ 1.2 4 1

Materialize (cost=0.00..1.07 rows=5 width=18) (actual time=0.003..0.004 rows=4 loops=1)

17. 0.003 0.003 ↑ 1.2 4 1

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

18.          

SubPlan (for Nested Loop)

19. 0.007 0.007 ↓ 0.0 0 1

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.007..0.007 rows=0 loops=1)

  • Index Cond: (contenu_version_id = v.id)
20. 0.013 0.013 ↑ 2.0 1 1

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.013..0.013 rows=1 loops=1)

  • Index Cond: (contenu_version_id = v.id)
21. 0.007 0.007 ↓ 0.0 0 1

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.007..0.007 rows=0 loops=1)

  • Index Cond: (contenu_version_id = v.id)
Planning time : 1.507 ms
Execution time : 3,375.284 ms