explain.depesz.com

PostgreSQL's explain analyze made readable

Result: thLi

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 744.088 ↑ 1.0 20 1

Limit (cost=363,678.18..364,112.20 rows=20 width=1,053) (actual time=743.551..744.088 rows=20 loops=1)

2.          

Initplan (for Limit)

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

  • Index Cond: (id = 6)
4. 0.005 0.005 ↑ 1.0 1 1

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

  • Index Cond: (id = 6)
5. 0.138 744.071 ↑ 5,899.6 20 1

Result (cost=363,661.85..2,924,167.10 rows=117,991 width=1,053) (actual time=743.549..744.071 rows=20 loops=1)

6. 0.395 743.453 ↑ 5,899.6 20 1

Sort (cost=363,661.85..363,956.83 rows=117,991 width=961) (actual time=743.448..743.453 rows=20 loops=1)

  • Sort Key: v.date_publication, c.created_at DESC
  • Sort Method: top-N heapsort Memory: 68kB
7. 130.752 743.058 ↑ 674.2 175 1

Hash Semi Join (cost=60,145.04..360,522.15 rows=117,991 width=961) (actual time=611.244..743.058 rows=175 loops=1)

  • Hash Cond: (c.current_version_id = vr_1.contenu_version_id)
8. 0.068 1.721 ↑ 674.2 175 1

Hash Join (cost=16,081.57..270,489.69 rows=117,991 width=964) (actual time=0.203..1.721 rows=175 loops=1)

  • Hash Cond: (c.contenu_type_id = t.id)
9. 0.062 1.642 ↑ 674.2 175 1

Hash Join (cost=16,080.46..269,916.33 rows=117,991 width=950) (actual time=0.186..1.642 rows=175 loops=1)

  • Hash Cond: (v.etat_courant_id = e.id)
10. 0.172 1.574 ↑ 674.2 175 1

Nested Loop (cost=16,079.37..269,277.34 rows=117,991 width=927) (actual time=0.176..1.574 rows=175 loops=1)

11. 0.038 0.944 ↑ 518.3 229 1

Nested Loop (cost=16,078.95..169,762.70 rows=118,699 width=754) (actual time=0.165..0.944 rows=229 loops=1)

12. 0.040 0.219 ↑ 518.3 229 1

Unique (cost=16,078.52..16,672.02 rows=118,699 width=4) (actual time=0.155..0.219 rows=229 loops=1)

13. 0.047 0.179 ↑ 518.3 229 1

Sort (cost=16,078.52..16,375.27 rows=118,699 width=4) (actual time=0.153..0.179 rows=229 loops=1)

  • Sort Key: vr.contenu_version_id
  • Sort Method: quicksort Memory: 35kB
14. 0.024 0.132 ↑ 518.3 229 1

Nested Loop (cost=0.43..6,074.01 rows=118,699 width=4) (actual time=0.047..0.132 rows=229 loops=1)

15. 0.069 0.069 ↑ 34.0 1 1

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

  • Filter: ((lft >= $3) AND (rgt <= $4))
  • Rows Removed by Filter: 303
16. 0.039 0.039 ↑ 19.1 229 1

Index Only Scan using contenu_version_ru_rubrique_id_contenu_version_id_idx on contenu_version_rubrique vr (cost=0.43..134.57 rows=4,368 width=8) (actual time=0.023..0.039 rows=229 loops=1)

  • Index Cond: (rubrique_id = r.id)
  • Heap Fetches: 0
17. 0.687 0.687 ↑ 1.0 1 229

Index Scan using contenu_version_pkey on contenu_version v (cost=0.42..1.39 rows=1 width=750) (actual time=0.003..0.003 rows=1 loops=229)

  • Index Cond: (id = vr.contenu_version_id)
18. 0.458 0.458 ↑ 1.0 1 229

Index Scan using contenu_current_version_id_idx on contenu c (cost=0.42..0.84 rows=1 width=173) (actual time=0.002..0.002 rows=1 loops=229)

  • Index Cond: (current_version_id = v.id)
  • Filter: ((deleted_at IS NULL) AND (statut_publication = 'publie'::contenu_statut_publication))
19. 0.004 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
20. 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)

21. 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
22. 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.005..0.006 rows=5 loops=1)

23. 147.136 610.585 ↓ 1.0 1,061,786 1

Hash (cost=26,765.42..26,765.42 rows=1,054,324 width=4) (actual time=610.585..610.585 rows=1,061,786 loops=1)

  • Buckets: 131,072 Batches: 16 Memory Usage: 3,358kB
24. 164.430 463.449 ↓ 1.0 1,061,786 1

Hash Join (cost=32.41..26,765.42 rows=1,054,324 width=4) (actual time=0.164..463.449 rows=1,061,786 loops=1)

  • Hash Cond: (vr_1.rubrique_id = r_1.id)
25. 219.382 298.950 ↓ 1.0 1,061,786 1

Hash Join (cost=16.58..23,943.40 rows=1,054,324 width=12) (actual time=0.089..298.950 rows=1,061,786 loops=1)

  • Hash Cond: (vr_1.rubrique_id = ru.id)
26. 79.486 79.486 ↓ 1.0 1,061,807 1

Seq Scan on contenu_version_rubrique vr_1 (cost=0.00..21,102.06 rows=1,061,306 width=8) (actual time=0.002..79.486 rows=1,061,807 loops=1)

27. 0.031 0.082 ↑ 1.0 302 1

Hash (cost=12.80..12.80 rows=302 width=4) (actual time=0.082..0.082 rows=302 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 19kB
28. 0.051 0.051 ↑ 1.0 302 1

Seq Scan on rubrique ru (cost=0.00..12.80 rows=302 width=4) (actual time=0.004..0.051 rows=302 loops=1)

  • Filter: (marque_id = 1)
  • Rows Removed by Filter: 2
29. 0.036 0.069 ↑ 1.0 304 1

Hash (cost=12.04..12.04 rows=304 width=4) (actual time=0.069..0.069 rows=304 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 19kB
30. 0.033 0.033 ↑ 1.0 304 1

Seq Scan on rubrique r_1 (cost=0.00..12.04 rows=304 width=4) (actual time=0.003..0.033 rows=304 loops=1)

31.          

SubPlan (for Result)

32. 0.040 0.040 ↓ 0.0 0 20

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.002..0.002 rows=0 loops=20)

  • Index Cond: (contenu_version_id = v.id)
33. 0.380 0.380 ↓ 2.5 5 20

Index Scan using contenu_version_rubrique_contenu_version_id_idx on contenu_version_rubrique cvr (cost=0.43..8.95 rows=2 width=32) (actual time=0.013..0.019 rows=5 loops=20)

  • Index Cond: (contenu_version_id = v.id)
34. 0.060 0.060 ↓ 0.0 0 20

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.003..0.003 rows=0 loops=20)

  • Index Cond: (contenu_version_id = v.id)
  • Heap Fetches: 0
Planning time : 2.867 ms
Execution time : 745.326 ms