explain.depesz.com

PostgreSQL's explain analyze made readable

Result: nX7Z

Settings
# exclusive inclusive rows x rows loops node
1. 0.002 12,564.905 ↑ 1.0 10 1

Limit (cost=637.18..637.20 rows=10 width=685) (actual time=12,564.904..12,564.905 rows=10 loops=1)

2. 0.394 12,564.903 ↑ 359.5 10 1

Sort (cost=637.18..646.16 rows=3,595 width=685) (actual time=12,564.903..12,564.903 rows=10 loops=1)

  • Sort Key: dossier.code_dossier
  • Sort Method: top-N heapsort Memory: 27kB
3. 0.501 12,564.509 ↑ 5.0 719 1

HashAggregate (cost=523.54..559.49 rows=3,595 width=685) (actual time=12,564.392..12,564.509 rows=719 loops=1)

  • Group Key: dossier.code_dossier, dossier.id, projet.nom, composante.nom, dossier.date_creation, sd.description
4. 6,688.480 12,564.008 ↑ 5.0 719 1

HashAggregate (cost=433.66..469.61 rows=3,595 width=685) (actual time=12,563.848..12,564.008 rows=719 loops=1)

  • Group Key: dossier.code_dossier, projet.nom, composante.nom, sd.description, dossier.date_creation, dossier.id
5. 1,355.797 5,875.528 ↓ 2,376.1 14,299,472 1

Hash Anti Join (cost=91.19..343.39 rows=6,018 width=685) (actual time=798.974..5,875.528 rows=14,299,472 loops=1)

  • Hash Cond: (oua.unite_administrative_id = ua.id)
6. 3,785.953 4,519.710 ↓ 1,188.0 14,299,472 1

Hash Right Join (cost=87.77..241.41 rows=12,037 width=689) (actual time=798.929..4,519.710 rows=14,299,472 loops=1)

  • Hash Cond: (question.section_id = section.id)
7. 0.063 0.213 ↑ 1.0 452 1

Hash Right Join (cost=22.17..39.06 rows=452 width=8) (actual time=0.171..0.213 rows=452 loops=1)

  • Hash Cond: (oua.question_id = question.id)
8. 0.001 0.001 ↓ 0.0 0 1

Seq Scan on objet_unite_administrative oua (cost=0.00..12.90 rows=290 width=8) (actual time=0.001..0.001 rows=0 loops=1)

9. 0.077 0.149 ↑ 1.0 452 1

Hash (cost=16.52..16.52 rows=452 width=8) (actual time=0.149..0.149 rows=452 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 18kB
10. 0.072 0.072 ↑ 1.0 452 1

Seq Scan on question (cost=0.00..16.52 rows=452 width=8) (actual time=0.008..0.072 rows=452 loops=1)

11. 371.816 733.544 ↓ 1,188.0 854,172 1

Hash (cost=56.61..56.61 rows=719 width=689) (actual time=733.544..733.544 rows=854,172 loops=1)

  • Buckets: 1024 Batches: 8 (originally 1) Memory Usage: 28176kB
12. 139.628 361.728 ↓ 1,188.0 854,172 1

Hash Join (cost=10.46..56.61 rows=719 width=689) (actual time=20.342..361.728 rows=854,172 loops=1)

  • Hash Cond: (dossier.auteur_id = utilisateur.id)
13. 201.337 222.071 ↓ 1,188.0 854,172 1

Hash Join (cost=7.26..43.53 rows=719 width=693) (actual time=20.300..222.071 rows=854,172 loops=1)

  • Hash Cond: ((dossier.composante_id = composante.id) AND (dossier.questionnaire_id = qst.id) AND (dossier.statut_dossier_id = sd.id))
14. 0.449 0.449 ↑ 1.0 719 1

Seq Scan on dossier (cost=0.00..20.99 rows=719 width=51) (actual time=0.005..0.449 rows=719 loops=1)

  • Filter: (projet_id = 13)
15. 2.994 20.285 ↓ 1,188.0 5,940 1

Hash (cost=7.18..7.18 rows=5 width=678) (actual time=20.285..20.285 rows=5,940 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 854kB
16. 5.002 17.291 ↓ 1,188.0 5,940 1

Nested Loop (cost=2.42..7.18 rows=5 width=678) (actual time=0.072..17.291 rows=5,940 loops=1)

17. 4.018 11.101 ↓ 1,188.0 1,188 1

Nested Loop (cost=2.42..6.08 rows=1 width=456) (actual time=0.064..11.101 rows=1,188 loops=1)

18. 4.361 5.895 ↓ 1,188.0 1,188 1

Nested Loop (cost=2.42..5.05 rows=1 width=234) (actual time=0.058..5.895 rows=1,188 loops=1)

19. 0.310 0.346 ↓ 1,188.0 1,188 1

Hash Join (cost=2.42..4.03 rows=1 width=12) (actual time=0.048..0.346 rows=1,188 loops=1)

  • Hash Cond: (eu.enquete_id = qst.enquete_id)
20. 0.005 0.005 ↑ 1.0 44 1

Seq Scan on enquete_utilisateur eu (cost=0.00..1.44 rows=44 width=4) (actual time=0.003..0.005 rows=44 loops=1)

21. 0.006 0.031 ↓ 27.0 27 1

Hash (cost=2.40..2.40 rows=1 width=16) (actual time=0.031..0.031 rows=27 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 2kB
22. 0.018 0.025 ↓ 27.0 27 1

Hash Join (cost=1.02..2.40 rows=1 width=16) (actual time=0.017..0.025 rows=27 loops=1)

  • Hash Cond: (section.questionnaire_id = qst.id)
23. 0.004 0.004 ↑ 1.0 27 1

Seq Scan on section (cost=0.00..1.27 rows=27 width=8) (actual time=0.003..0.004 rows=27 loops=1)

24. 0.001 0.003 ↑ 1.0 1 1

Hash (cost=1.01..1.01 rows=1 width=8) (actual time=0.003..0.003 rows=1 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
25. 0.002 0.002 ↑ 1.0 1 1

Seq Scan on questionnaire qst (cost=0.00..1.01 rows=1 width=8) (actual time=0.002..0.002 rows=1 loops=1)

26. 1.188 1.188 ↑ 1.0 1 1,188

Seq Scan on projet (cost=0.00..1.01 rows=1 width=222) (actual time=0.001..0.001 rows=1 loops=1,188)

  • Filter: (id = 13)
27. 1.188 1.188 ↑ 1.0 1 1,188

Seq Scan on composante (cost=0.00..1.01 rows=1 width=226) (actual time=0.000..0.001 rows=1 loops=1,188)

  • Filter: (projet_id = 13)
28. 1.188 1.188 ↑ 1.0 5 1,188

Seq Scan on statut_dossier sd (cost=0.00..1.05 rows=5 width=222) (actual time=0.000..0.001 rows=5 loops=1,188)

29. 0.009 0.029 ↑ 1.0 53 1

Hash (cost=2.53..2.53 rows=53 width=4) (actual time=0.029..0.029 rows=53 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 2kB
30. 0.020 0.020 ↑ 1.0 53 1

Seq Scan on utilisateur (cost=0.00..2.53 rows=53 width=4) (actual time=0.010..0.020 rows=53 loops=1)

31. 0.004 0.021 ↑ 1.0 19 1

Hash (cost=3.19..3.19 rows=19 width=4) (actual time=0.021..0.021 rows=19 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
32. 0.017 0.017 ↑ 1.0 19 1

Seq Scan on unite_administrative ua (cost=0.00..3.19 rows=19 width=4) (actual time=0.011..0.017 rows=19 loops=1)