explain.depesz.com

PostgreSQL's explain analyze made readable

Result: N4f1

Settings
# exclusive inclusive rows x rows loops node
1. 4.264 1,056.057 ↓ 6,028.2 30,141 1

Append (cost=0.00..11,062.49 rows=5 width=699) (actual time=80.675..1,056.057 rows=30,141 loops=1)

2. 0.001 0.002 ↓ 0.0 0 1

Subquery Scan on *SELECT* 1 (cost=0.00..0.00 rows=1 width=445) (actual time=0.002..0.002 rows=0 loops=1)

3. 0.001 0.001 ↓ 0.0 0 1

Result (cost=0.00..0.00 rows=0 width=445) (actual time=0.001..0.001 rows=0 loops=1)

  • One-Time Filter: false
4.          

SubPlan (forResult)

5. 0.000 0.000 ↓ 0.0 0

Result (cost=0.00..2.52 rows=100 width=8) (never executed)

6. 0.000 0.000 ↓ 0.0 0

ProjectSet (cost=0.00..0.52 rows=100 width=4) (never executed)

7. 0.000 0.000 ↓ 0.0 0

Result (cost=0.00..0.01 rows=1 width=0) (never executed)

8. 72.527 1,051.791 ↓ 7,535.2 30,141 1

Nested Loop Left Join (cost=30.38..11,062.42 rows=4 width=817) (actual time=80.672..1,051.791 rows=30,141 loops=1)

9. 23.556 979.264 ↓ 7,535.2 30,141 1

Nested Loop Left Join (cost=30.10..11,050.98 rows=4 width=806) (actual time=80.652..979.264 rows=30,141 loops=1)

10. 31.223 865.285 ↓ 7,535.2 30,141 1

Nested Loop Left Join (cost=29.67..11,049.19 rows=4 width=799) (actual time=80.633..865.285 rows=30,141 loops=1)

11. 21.669 773.780 ↓ 7,535.2 30,141 1

Nested Loop Left Join (cost=29.25..11,047.41 rows=4 width=741) (actual time=80.615..773.780 rows=30,141 loops=1)

12. 24.236 721.970 ↓ 7,535.2 30,141 1

Nested Loop Left Join (cost=29.12..11,046.83 rows=4 width=731) (actual time=80.603..721.970 rows=30,141 loops=1)

13. 23.793 667.593 ↓ 7,535.2 30,141 1

Nested Loop Left Join (cost=28.99..11,046.23 rows=4 width=724) (actual time=80.592..667.593 rows=30,141 loops=1)

14. 11.512 613.659 ↓ 7,535.2 30,141 1

Nested Loop Left Join (cost=28.85..11,045.61 rows=4 width=716) (actual time=80.579..613.659 rows=30,141 loops=1)

15. 9.354 541.865 ↓ 7,535.2 30,141 1

Nested Loop Left Join (cost=28.56..11,044.39 rows=4 width=712) (actual time=80.565..541.865 rows=30,141 loops=1)

16. 19.419 472.229 ↓ 7,535.2 30,141 1

Nested Loop Left Join (cost=28.27..11,043.17 rows=4 width=714) (actual time=80.550..472.229 rows=30,141 loops=1)

  • Join Filter: (g.id_pays = pays.id_pays)
17. 1.666 452.810 ↓ 7,535.2 30,141 1

Nested Loop (cost=28.13..11,039.01 rows=4 width=702) (actual time=80.515..452.810 rows=30,141 loops=1)

18. 23.704 217.264 ↓ 801.0 58,470 1

Hash Join (cost=27.70..11,006.40 rows=73 width=693) (actual time=0.235..217.264 rows=58,470 loops=1)

  • Hash Cond: (a.id_modele = m.id_modele)
19. 17.850 193.392 ↓ 30.3 58,470 1

Nested Loop (cost=0.72..10,974.34 rows=1,932 width=684) (actual time=0.059..193.392 rows=58,470 loops=1)

20. 0.020 0.020 ↓ 2.0 2 1

Index Scan using index_smodele on smodele sm (cost=0.28..2.50 rows=1 width=11) (actual time=0.017..0.020 rows=2 loops=1)

  • Index Cond: ((sous_modele)::text = '3008'::text)
21. 175.522 175.522 ↓ 5.5 29,235 2

Index Scan using annonce_id_smodele_id_geographie_idx on annonce a (cost=0.44..10,918.66 rows=5,318 width=681) (actual time=0.024..87.761 rows=29,235 loops=2)

  • Index Cond: (id_smodele = sm.id_smodele)
  • Filter: ((id_modele IS NOT NULL) AND (id_doublon IS NOT NULL) AND (id_modele <> 0) AND (id_categorie = 3) AND ((id_outlier IS NULL) OR (id_outlier <> ALL ('{7,8,9,14}'::integer[]))))
  • Rows Removed by Filter: 219
22. 0.037 0.168 ↑ 1.0 110 1

Hash (cost=25.61..25.61 rows=110 width=17) (actual time=0.167..0.168 rows=110 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 14kB
23. 0.090 0.131 ↑ 1.0 110 1

Bitmap Heap Scan on modele m (cost=2.23..25.61 rows=110 width=17) (actual time=0.054..0.131 rows=110 loops=1)

  • Recheck Cond: ((marque)::text = 'Peugeot'::text)
  • Heap Blocks: exact=21
24. 0.041 0.041 ↑ 1.0 110 1

Bitmap Index Scan on modele_marque_idx1 (cost=0.00..2.21 rows=110 width=0) (actual time=0.041..0.041 rows=110 loops=1)

  • Index Cond: ((marque)::text = 'Peugeot'::text)
25. 233.880 233.880 ↑ 1.0 1 58,470

Index Scan using geographie_id_pays_id_geographie_idx on geographie g (cost=0.42..0.45 rows=1 width=17) (actual time=0.004..0.004 rows=1 loops=58,470)

  • Index Cond: ((id_pays = 'FR'::bpchar) AND (id_geographie = a.id_geographie))
26. 0.000 0.000 ↑ 1.0 1 30,141

Materialize (cost=0.14..4.11 rows=1 width=15) (actual time=0.000..0.000 rows=1 loops=30,141)

27. 0.004 0.033 ↑ 1.0 1 1

Nested Loop Left Join (cost=0.14..4.10 rows=1 width=15) (actual time=0.027..0.033 rows=1 loops=1)

28. 0.020 0.020 ↑ 1.0 1 1

Seq Scan on pays (cost=0.00..1.71 rows=1 width=7) (actual time=0.014..0.020 rows=1 loops=1)

  • Filter: (id_pays = 'FR'::bpchar)
  • Rows Removed by Filter: 56
29. 0.009 0.009 ↑ 1.0 1 1

Index Scan using devise_pkey on devise (cost=0.14..2.36 rows=1 width=12) (actual time=0.009..0.009 rows=1 loops=1)

  • Index Cond: (pays.id_devise = id_devise)
30. 60.282 60.282 ↑ 1.0 1 30,141

Index Scan using generation_pkey on generation ge (cost=0.29..0.31 rows=1 width=6) (actual time=0.002..0.002 rows=1 loops=30,141)

  • Index Cond: (a.id_generation = id_generation)
31. 60.282 60.282 ↑ 1.0 1 30,141

Index Scan using phase_pkey on phase p (cost=0.29..0.31 rows=1 width=8) (actual time=0.002..0.002 rows=1 loops=30,141)

  • Index Cond: (a.id_phase = id_phase)
32. 30.141 30.141 ↑ 1.0 1 30,141

Index Scan using carrosserie_pkey on carrosserie c (cost=0.14..0.16 rows=1 width=12) (actual time=0.001..0.001 rows=1 loops=30,141)

  • Index Cond: (id_carrosserie = a.id_carrosserie)
33. 30.141 30.141 ↑ 1.0 1 30,141

Index Scan using energie_pkey on energie e (cost=0.13..0.15 rows=1 width=11) (actual time=0.001..0.001 rows=1 loops=30,141)

  • Index Cond: (id_energie = a.id_energie)
34. 30.141 30.141 ↑ 1.0 1 30,141

Index Scan using boite_pkey on boite b (cost=0.13..0.15 rows=1 width=14) (actual time=0.001..0.001 rows=1 loops=30,141)

  • Index Cond: (id_boite = a.id_boite)
35. 60.282 60.282 ↑ 1.0 1 30,141

Index Scan using vehicule_pkey on vehicule ve (cost=0.42..0.44 rows=1 width=62) (actual time=0.002..0.002 rows=1 loops=30,141)

  • Index Cond: (id_veh = a.id_veh)
36. 90.423 90.423 ↑ 1.0 1 30,141

Index Scan using client_pkey on vendeur v (cost=0.43..0.45 rows=1 width=15) (actual time=0.003..0.003 rows=1 loops=30,141)

  • Index Cond: (a.id_vendeur = id_vendeur)
37. 0.000 0.000 ↓ 0.0 0 30,141

Index Scan using dealer_pkey on dealer r (cost=0.28..0.30 rows=1 width=35) (actual time=0.000..0.000 rows=0 loops=30,141)

  • Index Cond: ((v.id_dealer_pro)::text = (id_dealer)::text)
38.          

SubPlan (forNested Loop Left Join)

39. 0.000 0.000 ↓ 0.0 0

Result (cost=0.00..2.52 rows=100 width=8) (never executed)

40. 0.000 0.000 ↓ 0.0 0

ProjectSet (cost=0.00..0.52 rows=100 width=4) (never executed)

41. 0.000 0.000 ↓ 0.0 0

Result (cost=0.00..0.01 rows=1 width=0) (never executed)

Planning time : 22.559 ms