explain.depesz.com

PostgreSQL's explain analyze made readable

Result: AQyt

Settings
# exclusive inclusive rows x rows loops node
1. 0.002 9.446 ↑ 2.0 1 1

Append (cost=187.83..363.01 rows=2 width=977) (actual time=9.235..9.446 rows=1 loops=1)

2. 0.003 9.235 ↑ 1.0 1 1

Subquery Scan on *SELECT* 1 (cost=187.83..187.90 rows=1 width=977) (actual time=9.234..9.235 rows=1 loops=1)

3. 0.090 9.232 ↑ 1.0 1 1

GroupAggregate (cost=187.83..187.89 rows=1 width=1,619) (actual time=9.232..9.232 rows=1 loops=1)

  • Group Key: i.t_auxiliaire, a.id, j.nom, j.ville, c.montantfpsdu, b.numeroavis, k.statutfacturation
  • Filter: (count(b.id) = 1)
4.          

Initplan (forGroupAggregate)

5. 0.031 0.031 ↑ 460.0 1 1

Seq Scan on fpsproduit (cost=0.00..14.60 rows=460 width=32) (actual time=0.030..0.031 rows=1 loops=1)

6. 0.039 9.111 ↑ 1.0 1 1

Sort (cost=173.23..173.23 rows=1 width=1,427) (actual time=9.111..9.111 rows=1 loops=1)

  • Sort Key: i.t_auxiliaire, a.id, j.nom, j.ville, c.montantfpsdu, b.numeroavis, k.statutfacturation
  • Sort Method: quicksort Memory: 25kB
7. 0.003 9.072 ↑ 1.0 1 1

Nested Loop Left Join (cost=1.29..173.22 rows=1 width=1,427) (actual time=4.149..9.072 rows=1 loops=1)

8. 0.001 9.043 ↑ 1.0 1 1

Nested Loop Left Join (cost=1.15..173.04 rows=1 width=1,229) (actual time=4.120..9.043 rows=1 loops=1)

9. 0.004 9.008 ↑ 1.0 1 1

Nested Loop Left Join (cost=0.87..172.71 rows=1 width=1,224) (actual time=4.085..9.008 rows=1 loops=1)

10. 0.002 8.987 ↑ 1.0 1 1

Nested Loop (cost=0.72..164.46 rows=1 width=810) (actual time=4.065..8.987 rows=1 loops=1)

  • Join Filter: (a.typeinfractionid = f.type_infraction_id)
11. 0.017 8.869 ↑ 1.0 1 1

Nested Loop (cost=0.72..162.94 rows=1 width=814) (actual time=3.947..8.869 rows=1 loops=1)

12. 0.022 8.726 ↓ 7.0 7 1

Nested Loop (cost=0.57..146.74 rows=1 width=818) (actual time=1.463..8.726 rows=7 loops=1)

13. 0.025 0.143 ↓ 7.0 7 1

Nested Loop (cost=0.29..19.70 rows=1 width=801) (actual time=0.061..0.143 rows=7 loops=1)

14. 0.048 0.048 ↓ 7.0 7 1

Seq Scan on amendedossiergestion c (cost=0.00..11.40 rows=1 width=32) (actual time=0.036..0.048 rows=7 loops=1)

  • Filter: (dateexportpragmatik IS NULL)
  • Rows Removed by Filter: 5
15. 0.070 0.070 ↑ 1.0 1 7

Index Scan using amende_dossier_idx on t_amende_dossier a (cost=0.29..8.30 rows=1 width=769) (actual time=0.010..0.010 rows=1 loops=7)

  • Index Cond: (id = c.amendedossierid)
16. 8.561 8.561 ↑ 1.0 1 7

Index Scan using amende_evenement_idx on t_amende_evenement b (cost=0.29..127.03 rows=1 width=29) (actual time=1.222..1.223 rows=1 loops=7)

  • Index Cond: (amendedossierid = a.id)
17. 0.126 0.126 ↓ 0.0 0 7

Index Scan using typegestion_pkey on typegestion d (cost=0.15..8.17 rows=1 width=4) (actual time=0.018..0.018 rows=0 loops=7)

  • Index Cond: (typeid = c.typeid)
  • Filter: (lower((typename)::text) ~~* '%locataire%'::text)
  • Rows Removed by Filter: 1
18. 0.116 0.116 ↑ 1.0 1 1

Seq Scan on t_type_infraction f (cost=0.00..1.51 rows=1 width=4) (actual time=0.116..0.116 rows=1 loops=1)

  • Filter: (lower((type_infraction)::text) = 'fps'::text)
  • Rows Removed by Filter: 27
19. 0.017 0.017 ↑ 1.0 1 1

Index Scan using statutfacturation_pkey on statutfacturation k (cost=0.14..8.16 rows=1 width=422) (actual time=0.017..0.017 rows=1 loops=1)

  • Index Cond: (c.statutexportpragmatik = statutfacturationid)
20. 0.034 0.034 ↑ 1.0 1 1

Index Scan using t_tiers_pkey on t_tiers i (cost=0.28..0.33 rows=1 width=17) (actual time=0.034..0.034 rows=1 loops=1)

  • Index Cond: (t_tiers_id = a.tiersid)
21. 0.026 0.026 ↑ 1.0 1 1

Index Scan using t_emetteur_pkey on t_emetteur j (cost=0.15..0.17 rows=1 width=206) (actual time=0.026..0.026 rows=1 loops=1)

  • Index Cond: (emetteur_id = b.emetteurid)
22. 0.000 0.209 ↓ 0.0 0 1

Subquery Scan on *SELECT* 2 (cost=175.05..175.12 rows=1 width=977) (actual time=0.209..0.209 rows=0 loops=1)

23. 0.002 0.209 ↓ 0.0 0 1

GroupAggregate (cost=175.05..175.11 rows=1 width=1,619) (actual time=0.209..0.209 rows=0 loops=1)

  • Group Key: i_1.t_auxiliaire, a_1.id, j_1.nom, j_1.ville, c_1.montantfpsdu, b_1.numeroavis, k_1.statutfacturation
  • Filter: (count(b_1.id) = 1)
24.          

Initplan (forGroupAggregate)

25. 0.000 0.000 ↓ 0.0 0

Seq Scan on fpsproduit fpsproduit_1 (cost=0.00..14.60 rows=460 width=32) (never executed)

26. 0.027 0.207 ↓ 0.0 0 1

Sort (cost=160.45..160.45 rows=1 width=1,427) (actual time=0.207..0.207 rows=0 loops=1)

  • Sort Key: i_1.t_auxiliaire, a_1.id, j_1.nom, j_1.ville, c_1.montantfpsdu, b_1.numeroavis, k_1.statutfacturation
  • Sort Method: quicksort Memory: 25kB
27. 0.000 0.180 ↓ 0.0 0 1

Nested Loop Left Join (cost=1.15..160.44 rows=1 width=1,427) (actual time=0.180..0.180 rows=0 loops=1)

28. 0.001 0.180 ↓ 0.0 0 1

Nested Loop Left Join (cost=1.00..160.26 rows=1 width=1,229) (actual time=0.180..0.180 rows=0 loops=1)

29. 0.000 0.179 ↓ 0.0 0 1

Nested Loop (cost=0.72..159.93 rows=1 width=1,224) (actual time=0.179..0.179 rows=0 loops=1)

  • Join Filter: (a_1.typeinfractionid = f_1.type_infraction_id)
30. 0.000 0.179 ↓ 0.0 0 1

Nested Loop (cost=0.72..158.41 rows=1 width=1,228) (actual time=0.179..0.179 rows=0 loops=1)

31. 0.000 0.179 ↓ 0.0 0 1

Nested Loop (cost=0.57..157.52 rows=1 width=1,232) (actual time=0.179..0.179 rows=0 loops=1)

32. 0.000 0.179 ↓ 0.0 0 1

Nested Loop (cost=0.29..30.49 rows=1 width=1,215) (actual time=0.179..0.179 rows=0 loops=1)

33. 0.003 0.179 ↓ 0.0 0 1

Nested Loop (cost=0.00..25.84 rows=1 width=446) (actual time=0.179..0.179 rows=0 loops=1)

  • Join Filter: (c_1.statutexportpragmatik = k_1.statutfacturationid)
  • Rows Removed by Join Filter: 5
34. 0.153 0.153 ↑ 1.0 1 1

Seq Scan on statutfacturation k_1 (cost=0.00..12.70 rows=1 width=422) (actual time=0.147..0.153 rows=1 loops=1)

  • Filter: (lower((statutfacturation)::text) = 'annulable'::text)
  • Rows Removed by Filter: 5
35. 0.023 0.023 ↑ 27.8 5 1

Seq Scan on amendedossiergestion c_1 (cost=0.00..11.40 rows=139 width=32) (actual time=0.018..0.023 rows=5 loops=1)

  • Filter: (dateexportpragmatik IS NOT NULL)
  • Rows Removed by Filter: 7
36. 0.000 0.000 ↓ 0.0 0

Index Scan using t_amende_dossier_pkey on t_amende_dossier a_1 (cost=0.29..4.65 rows=1 width=769) (never executed)

  • Index Cond: (id = c_1.amendedossierid)
37. 0.000 0.000 ↓ 0.0 0

Index Scan using amende_evenement_idx on t_amende_evenement b_1 (cost=0.29..127.03 rows=1 width=29) (never executed)

  • Index Cond: (amendedossierid = a_1.id)
38. 0.000 0.000 ↓ 0.0 0

Index Scan using typegestion_pkey on typegestion d_1 (cost=0.15..0.52 rows=1 width=4) (never executed)

  • Index Cond: (typeid = c_1.typeid)
  • Filter: (lower((typename)::text) ~~* '%locataire%'::text)
39. 0.000 0.000 ↓ 0.0 0

Seq Scan on t_type_infraction f_1 (cost=0.00..1.51 rows=1 width=4) (never executed)

  • Filter: (lower((type_infraction)::text) = 'fps'::text)
40. 0.000 0.000 ↓ 0.0 0

Index Scan using t_tiers_pkey on t_tiers i_1 (cost=0.28..0.33 rows=1 width=17) (never executed)

  • Index Cond: (t_tiers_id = a_1.tiersid)
41. 0.000 0.000 ↓ 0.0 0

Index Scan using t_emetteur_pkey on t_emetteur j_1 (cost=0.15..0.17 rows=1 width=206) (never executed)

  • Index Cond: (emetteur_id = b_1.emetteurid)