explain.depesz.com

PostgreSQL's explain analyze made readable

Result: VGhw

Settings
# exclusive inclusive rows x rows loops node
1. 0.151 5,555.366 ↓ 12.4 62 1

Sort (cost=1,247.18..1,247.18 rows=5 width=36) (actual time=5,555.360..5,555.366 rows=62 loops=1)

  • Sort Key: a.nom
  • Sort Method: quicksort Memory: 29kB
2. 0.024 5,555.215 ↓ 12.4 62 1

Unique (cost=1,247.15..1,247.15 rows=5 width=36) (actual time=5,555.182..5,555.215 rows=62 loops=1)

3. 0.106 5,555.191 ↓ 12.6 63 1

Sort (cost=1,247.15..1,247.15 rows=5 width=36) (actual time=5,555.181..5,555.191 rows=63 loops=1)

  • Sort Key: a.id_partenaire_moral, a.nom
  • Sort Method: quicksort Memory: 29kB
4. 0.012 5,555.085 ↓ 12.6 63 1

Append (cost=1,242.08..1,247.13 rows=5 width=36) (actual time=5,548.088..5,555.085 rows=63 loops=1)

5. 0.355 5,548.717 ↓ 20.3 61 1

Unique (cost=1,242.08..1,242.08 rows=3 width=17) (actual time=5,548.088..5,548.717 rows=61 loops=1)

6. 3.322 5,548.362 ↓ 813.0 2,439 1

Sort (cost=1,242.08..1,242.08 rows=3 width=17) (actual time=5,548.086..5,548.362 rows=2,439 loops=1)

  • Sort Key: a.id_partenaire_moral
  • Sort Method: quicksort Memory: 266kB
7. 2.455 5,545.040 ↓ 813.0 2,439 1

Nested Loop Left Join (cost=0.51..1,242.08 rows=3 width=17) (actual time=40.819..5,545.040 rows=2,439 loops=1)

8. 104.567 5,215.759 ↓ 813.0 2,439 1

Nested Loop (cost=0.43..1,241.57 rows=3 width=17) (actual time=34.463..5,215.759 rows=2,439 loops=1)

9. 77.595 1,935.745 ↓ 24,056.4 288,677 1

Nested Loop (cost=0.34..1,239.27 rows=12 width=21) (actual time=26.472..1,935.745 rows=288,677 loops=1)

  • Join Filter: (a.id_partenaire_moral = b.fk_partenaire_moral)
10. 4.477 1,068.670 ↓ 153.0 1,836 1

Nested Loop (cost=0.26..1,237.93 rows=12 width=21) (actual time=26.373..1,068.670 rows=1,836 loops=1)

11. 3.483 787.293 ↓ 36.1 2,130 1

Nested Loop (cost=0.17..1,231.47 rows=59 width=4) (actual time=12.965..787.293 rows=2,130 loops=1)

12. 123.510 123.510 ↓ 7.6 2,130 1

Index Only Scan using idx_conteneurs_types on conteneurs e (cost=0.09..398.57 rows=280 width=4) (actual time=7.726..123.510 rows=2,130 loops=1)

  • Index Cond: ((fk_type = 688) AND (id_conteneur IS NOT NULL))
  • Heap Fetches: 2130
13. 660.300 660.300 ↑ 1.0 1 2,130

Index Only Scan using idx_partenaires_contacts_conteneur_contact on partenaires_contacts cb (cost=0.08..2.97 rows=1 width=8) (actual time=0.307..0.310 rows=1 loops=2,130)

  • Index Cond: (fk_conteneur_contact = e.id_conteneur)
  • Heap Fetches: 2130
14. 276.900 276.900 ↑ 1.0 1 2,130

Index Scan using idx_partenaires_moraux_types on partenaires_moraux a (cost=0.08..0.11 rows=1 width=17) (actual time=0.130..0.130 rows=1 loops=2,130)

  • Index Cond: ((fk_type = 5) AND (id_partenaire_moral = cb.fk_partenaire_moral))
  • Filter: (id_partenaire_moral <> 8146)
  • Rows Removed by Filter: 0
15. 789.480 789.480 ↓ 157.0 157 1,836

Index Only Scan using idx_partenaires_contacts_moraux_conteneurs on partenaires_contacts b (cost=0.08..0.11 rows=1 width=8) (actual time=0.154..0.430 rows=157 loops=1,836)

  • Index Cond: (fk_partenaire_moral = cb.fk_partenaire_moral)
  • Heap Fetches: 288677
16. 3,175.447 3,175.447 ↓ 0.0 0 288,677

Index Scan using conteneurs_pkey on conteneurs c (cost=0.09..0.19 rows=1 width=4) (actual time=0.011..0.011 rows=0 loops=288,677)

  • Index Cond: (id_conteneur = b.fk_conteneur_contact)
  • Filter: (fk_type = ANY ('{6,14,691}'::integer[]))
  • Rows Removed by Filter: 1
17. 326.826 326.826 ↑ 1.0 1 2,439

Index Only Scan using partenaires_groupes_entrees_pkey on partenaires_groupes_entrees d (cost=0.08..0.17 rows=1 width=4) (actual time=0.133..0.134 rows=1 loops=2,439)

  • Index Cond: (fk_partenaire_moral = a.id_partenaire_moral)
  • Heap Fetches: 2439
18. 0.003 6.356 ↑ 1.0 2 1

Subquery Scan on *SELECT* 2 (cost=0.08..5.04 rows=2 width=36) (actual time=0.124..6.356 rows=2 loops=1)

19. 6.353 6.353 ↑ 1.0 2 1

Index Only Scan using partenaires_moraux_pkey on partenaires_moraux a_1 (cost=0.08..5.03 rows=2 width=36) (actual time=0.123..6.353 rows=2 loops=1)

  • Index Cond: (id_partenaire_moral = ANY ('{822,295784}'::integer[]))
  • Heap Fetches: 2