explain.depesz.com

PostgreSQL's explain analyze made readable

Result: RQKB

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 0.256 ↑ 10.0 1 1

Limit (cost=269,096.48..269,354.95 rows=10 width=1,057) (actual time=0.255..0.256 rows=1 loops=1)

2.          

Initplan (for Limit)

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

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

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

Result (cost=269,080.15..3,328,017.25 rows=118,345 width=1,057) (actual time=0.254..0.255 rows=1 loops=1)

6. 0.013 0.204 ↑ 118,345.0 1 1

Sort (cost=269,080.15..269,376.01 rows=118,345 width=965) (actual time=0.203..0.204 rows=1 loops=1)

  • Sort Key: v.date_publication DESC, c.id DESC
  • Sort Method: quicksort Memory: 26kB
7. 0.007 0.191 ↑ 118,345.0 1 1

Hash Join (cost=16,213.51..266,522.75 rows=118,345 width=965) (actual time=0.190..0.191 rows=1 loops=1)

  • Hash Cond: (c.contenu_type_id = t.id)
8. 0.007 0.173 ↑ 118,345.0 1 1

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

  • Hash Cond: (v.etat_courant_id = e.id)
9. 0.002 0.160 ↑ 118,345.0 1 1

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

10. 0.006 0.142 ↑ 29,795.8 4 1

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

11. 0.004 0.116 ↑ 29,795.8 4 1

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

12. 0.009 0.112 ↑ 29,795.8 4 1

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

  • Sort Key: vr.contenu_version_id
  • Sort Method: quicksort Memory: 25kB
13. 0.002 0.103 ↑ 29,795.8 4 1

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

14. 0.085 0.085 ↑ 34.0 1 1

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

  • Filter: ((lft >= $3) AND (rgt <= $4))
  • Rows Removed by Filter: 303
15. 0.016 0.016 ↑ 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.013..0.016 rows=4 loops=1)

  • Index Cond: (rubrique_id = r.id)
  • Heap Fetches: 4
16. 0.020 0.020 ↑ 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.005..0.005 rows=1 loops=4)

  • Index Cond: (id = vr.contenu_version_id)
17. 0.016 0.016 ↓ 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.004..0.004 rows=0 loops=4)

  • Index Cond: (current_version_id = v.id)
  • Filter: ((deleted_at IS NULL) AND (statut_publication = 'publie'::contenu_statut_publication))
18. 0.003 0.006 ↑ 1.0 4 1

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

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
19. 0.003 0.003 ↑ 1.0 4 1

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

20. 0.005 0.011 ↑ 1.0 5 1

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

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
21. 0.006 0.006 ↑ 1.0 5 1

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

22.          

SubPlan (for Result)

23. 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)
24. 0.022 0.022 ↑ 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.022..0.022 rows=1 loops=1)

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

  • Index Cond: (contenu_version_id = v.id)
Planning time : 2.392 ms
Execution time : 0.455 ms