explain.depesz.com

PostgreSQL's explain analyze made readable

Result: AsGn0

Settings
# exclusive inclusive rows x rows loops node
1. 0.012 0.190 ↑ 118,345.0 1 1

Sort (cost=3,443,699.14..3,443,995.00 rows=118,345 width=1,057) (actual time=0.190..0.190 rows=1 loops=1)

  • Sort Key: v.date_publication DESC
  • Sort Method: quicksort Memory: 26kB
2.          

Initplan (for Sort)

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 = 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.006..0.006 rows=1 loops=1)

  • Index Cond: (id = 280)
5. 0.012 0.167 ↑ 118,345.0 1 1

Hash Join (cost=16,213.51..3,323,684.68 rows=118,345 width=1,057) (actual time=0.166..0.167 rows=1 loops=1)

  • Hash Cond: (c.contenu_type_id = t.id)
6. 0.006 0.119 ↑ 118,345.0 1 1

Hash Join (cost=16,212.40..265,651.80 rows=118,345 width=950) (actual time=0.118..0.119 rows=1 loops=1)

  • Hash Cond: (v.etat_courant_id = e.id)
7. 0.001 0.109 ↑ 118,345.0 1 1

Nested Loop (cost=16,211.31..265,010.91 rows=118,345 width=927) (actual time=0.109..0.109 rows=1 loops=1)

8. 0.003 0.096 ↑ 29,795.8 4 1

Nested Loop (cost=16,210.89..165,200.43 rows=119,183 width=757) (actual time=0.086..0.096 rows=4 loops=1)

9. 0.004 0.081 ↑ 29,795.8 4 1

Unique (cost=16,210.46..16,806.38 rows=119,183 width=4) (actual time=0.078..0.081 rows=4 loops=1)

10. 0.011 0.077 ↑ 29,795.8 4 1

Sort (cost=16,210.46..16,508.42 rows=119,183 width=4) (actual time=0.077..0.077 rows=4 loops=1)

  • Sort Key: vr.contenu_version_id
  • Sort Method: quicksort Memory: 25kB
11. 0.001 0.066 ↑ 29,795.8 4 1

Nested Loop (cost=0.43..6,161.66 rows=119,183 width=4) (actual time=0.049..0.066 rows=4 loops=1)

12. 0.053 0.053 ↑ 34.0 1 1

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

  • Filter: ((lft >= $3) AND (rgt <= $4))
  • Rows Removed by Filter: 303
13. 0.012 0.012 ↑ 1,053.0 4 1

Index Only Scan using contenu_version_ru_rubrique_id_contenu_version_id_idx on contenu_version_rubrique vr (cost=0.43..138.71 rows=4,212 width=8) (actual time=0.010..0.012 rows=4 loops=1)

  • Index Cond: (rubrique_id = r.id)
  • Heap Fetches: 4
14. 0.012 0.012 ↑ 1.0 1 4

Index Scan using contenu_version_pkey on contenu_version v (cost=0.42..1.34 rows=1 width=753) (actual time=0.003..0.003 rows=1 loops=4)

  • Index Cond: (id = vr.contenu_version_id)
15. 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))
16. 0.002 0.004 ↑ 1.0 4 1

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

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
17. 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)

18. 0.004 0.008 ↑ 1.0 5 1

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

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
19. 0.004 0.004 ↑ 1.0 5 1

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

20.          

SubPlan (for Hash Join)

21. 0.006 0.006 ↓ 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.006..0.006 rows=0 loops=1)

  • Index Cond: (contenu_version_id = v.id)
22. 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.012..0.013 rows=1 loops=1)

  • Index Cond: (contenu_version_id = v.id)
23. 0.009 0.009 ↓ 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.009..0.009 rows=0 loops=1)

  • Index Cond: (contenu_version_id = v.id)
Planning time : 1.339 ms
Execution time : 0.313 ms