explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Sv7w : Optimization for: plan #MZR2

Settings

Optimization path:

# exclusive inclusive rows x rows loops node
1. 1,988.671 203,717.266 ↓ 1.0 29,505 1

Hash Left Join (cost=24,813.29..846,922.86 rows=29,241 width=3,258) (actual time=1,061.373..203,717.266 rows=29,505 loops=1)

  • Hash Cond: (tca.id_callback_action = ca.id_callback_action)
2. 84,399.214 201,728.386 ↓ 1.0 29,505 1

Nested Loop Left Join (cost=24,805.29..841,614.92 rows=29,241 width=3,204) (actual time=1,060.508..201,728.386 rows=29,505 loops=1)

3. 38.060 106,884.402 ↓ 1.0 29,505 1

Hash Left Join (cost=24,793.76..337,382.31 rows=29,241 width=3,124) (actual time=1,013.392..106,884.402 rows=29,505 loops=1)

  • Hash Cond: (t.id_last_follow_up = fu.id_follow_up)
4. 43.464 106,840.321 ↓ 1.0 29,505 1

Hash Left Join (cost=24,792.51..337,043.56 rows=29,241 width=1,576) (actual time=1,007.336..106,840.321 rows=29,505 loops=1)

  • Hash Cond: (v.id_produit = p.id_produit)
5. 32.151 106,792.476 ↓ 1.0 29,505 1

Hash Left Join (cost=24,791.08..336,717.46 rows=29,241 width=1,060) (actual time=1,002.905..106,792.476 rows=29,505 loops=1)

  • Hash Cond: (t.id_ticket = cat.id_ticket)
6. 31.280 105,816.650 ↓ 1.0 29,505 1

Hash Left Join (cost=570.67..310,779.08 rows=29,241 width=1,052) (actual time=59.211..105,816.650 rows=29,505 loops=1)

  • Hash Cond: (t.id_ticketing_detail = td.id_ticketing_detail)
7. 87.465 105,782.484 ↓ 1.0 29,505 1

Hash Left Join (cost=568.91..310,640.68 rows=29,241 width=638) (actual time=56.308..105,782.484 rows=29,505 loops=1)

  • Hash Cond: (thi.id_utilisateur = thu.id_utilisateur)
8. 72.621 105,692.705 ↓ 1.0 29,505 1

Nested Loop Left Join (cost=384.99..309,908.50 rows=29,241 width=633) (actual time=53.962..105,692.705 rows=29,505 loops=1)

9. 70.369 45,754.439 ↓ 1.0 29,505 1

Hash Join (cost=384.55..126,903.07 rows=29,241 width=625) (actual time=40.266..45,754.439 rows=29,505 loops=1)

  • Hash Cond: (v.id_utilisateur_creation = u3.id_utilisateur)
10. 70.006 45,668.992 ↓ 1.0 29,505 1

Hash Join (cost=200.64..126,170.88 rows=29,241 width=621) (actual time=25.163..45,668.992 rows=29,505 loops=1)

  • Hash Cond: (t.id_utilisateur_creation = u.id_utilisateur)
11. 37.457 45,596.214 ↓ 1.0 29,505 1

Hash Join (cost=16.72..125,438.69 rows=29,241 width=612) (actual time=22.351..45,596.214 rows=29,505 loops=1)

  • Hash Cond: (tt.id_ticketing_queue = tq.id_ticketing_queue)
12. 22.337 45,555.771 ↓ 1.0 29,505 1

Nested Loop (cost=15.43..125,035.34 rows=29,241 width=485) (actual time=19.337..45,555.771 rows=29,505 loops=1)

13. 0.354 0.354 ↑ 1.0 1 1

Seq Scan on ticketing_thematique tt (cost=0.00..1.79 rows=1 width=30) (actual time=0.322..0.354 rows=1 loops=1)

  • Filter: (id_ticketing_thematique = 360)
  • Rows Removed by Filter: 62
14. 32.878 45,533.080 ↓ 1.0 29,505 1

Hash Join (cost=15.43..124,741.14 rows=29,241 width=463) (actual time=19.011..45,533.080 rows=29,505 loops=1)

  • Hash Cond: (t.id_ticketing_statut = ts.id_ticketing_statut)
15. 58.016 45,496.938 ↓ 1.0 29,505 1

Hash Join (cost=14.07..124,337.72 rows=29,241 width=340) (actual time=15.724..45,496.938 rows=29,505 loops=1)

  • Hash Cond: (v.id_statut_vente = sv.id_statut_vente)
16. 78.577 45,438.759 ↓ 1.0 29,505 1

Nested Loop (cost=7.60..123,929.19 rows=29,241 width=301) (actual time=15.522..45,438.759 rows=29,505 loops=1)

17. 51.914 35,387.492 ↓ 1.0 29,505 1

Nested Loop (cost=7.18..102,731.80 rows=29,241 width=281) (actual time=15.508..35,387.492 rows=29,505 loops=1)

18. 84.031 30,585.273 ↓ 1.0 29,505 1

Nested Loop (cost=6.75..86,178.16 rows=29,241 width=252) (actual time=15.493..30,585.273 rows=29,505 loops=1)

  • Join Filter: (t.id_vente = v.id_vente)
19. 172.953 28,111.337 ↓ 1.0 29,505 1

Merge Join (cost=6.33..70,828.06 rows=29,246 width=236) (actual time=15.443..28,111.337 rows=29,505 loops=1)

  • Merge Cond: (t.id_vente = sa.id_sale)
20. 27,328.339 27,328.339 ↓ 1.0 29,505 1

Index Scan using pfx_thematique_360 on ticket t (cost=0.29..54,740.60 rows=29,258 width=228) (actual time=15.423..27,328.339 rows=29,505 loops=1)

21. 610.045 610.045 ↓ 1.0 438,540 1

Index Scan using pfx_sale_address_id_sale on sale_address sa (cost=0.42..14,678.37 rows=426,386 width=8) (actual time=0.014..610.045 rows=438,540 loops=1)

22. 2,389.905 2,389.905 ↑ 1.0 1 29,505

Index Scan using vente_pkey on vente v (cost=0.42..0.51 rows=1 width=20) (actual time=0.080..0.081 rows=1 loops=29,505)

  • Index Cond: (id_vente = sa.id_sale)
23. 4,750.305 4,750.305 ↑ 1.0 1 29,505

Index Scan using adresse_manager_pkey on adresse_manager ams (cost=0.42..0.56 rows=1 width=37) (actual time=0.160..0.161 rows=1 loops=29,505)

  • Index Cond: (id_adresse_manager = sa.id_address_manager)
24. 9,972.690 9,972.690 ↑ 1.0 1 29,505

Index Scan using client_pkey on client c (cost=0.42..0.71 rows=1 width=24) (actual time=0.337..0.338 rows=1 loops=29,505)

  • Index Cond: (id_client = v.id_client)
25. 0.069 0.163 ↑ 1.0 154 1

Hash (cost=4.54..4.54 rows=154 width=43) (actual time=0.163..0.163 rows=154 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 12kB
26. 0.094 0.094 ↑ 1.0 154 1

Seq Scan on statut_vente sv (cost=0.00..4.54 rows=154 width=43) (actual time=0.005..0.094 rows=154 loops=1)

27. 0.012 3.264 ↑ 1.0 16 1

Hash (cost=1.16..1.16 rows=16 width=123) (actual time=3.264..3.264 rows=16 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
28. 3.252 3.252 ↑ 1.0 16 1

Seq Scan on ticketing_statut ts (cost=0.00..1.16 rows=16 width=123) (actual time=3.250..3.252 rows=16 loops=1)

29. 0.004 2.986 ↑ 1.0 13 1

Hash (cost=1.13..1.13 rows=13 width=135) (actual time=2.986..2.986 rows=13 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
30. 2.982 2.982 ↑ 1.0 13 1

Seq Scan on ticketing_queue tq (cost=0.00..1.13 rows=13 width=135) (actual time=2.976..2.982 rows=13 loops=1)

31. 1.408 2.772 ↑ 1.0 4,663 1

Hash (cost=125.63..125.63 rows=4,663 width=17) (actual time=2.772..2.772 rows=4,663 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 221kB
32. 1.364 1.364 ↑ 1.0 4,663 1

Seq Scan on utilisateur u (cost=0.00..125.63 rows=4,663 width=17) (actual time=0.005..1.364 rows=4,663 loops=1)

33. 1.439 15.078 ↑ 1.0 4,663 1

Hash (cost=125.63..125.63 rows=4,663 width=8) (actual time=15.078..15.078 rows=4,663 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 166kB
34. 13.639 13.639 ↑ 1.0 4,663 1

Seq Scan on utilisateur u3 (cost=0.00..125.63 rows=4,663 width=8) (actual time=3.732..13.639 rows=4,663 loops=1)

35. 59,865.645 59,865.645 ↑ 1.0 1 29,505

Index Scan using ticketing_history_pkey on ticketing_history thi (cost=0.43..6.25 rows=1 width=16) (actual time=2.027..2.029 rows=1 loops=29,505)

  • Index Cond: (id_ticketing_history = t.last_id_ticketing_history)
36. 1.302 2.314 ↑ 1.0 4,663 1

Hash (cost=125.63..125.63 rows=4,663 width=13) (actual time=2.314..2.314 rows=4,663 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 219kB
37. 1.012 1.012 ↑ 1.0 4,663 1

Seq Scan on utilisateur thu (cost=0.00..125.63 rows=4,663 width=13) (actual time=0.004..1.012 rows=4,663 loops=1)

38. 0.011 2.886 ↑ 1.0 34 1

Hash (cost=1.34..1.34 rows=34 width=422) (actual time=2.886..2.886 rows=34 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 2kB
39. 2.875 2.875 ↑ 1.0 34 1

Seq Scan on ticketing_detail td (cost=0.00..1.34 rows=34 width=422) (actual time=2.866..2.875 rows=34 loops=1)

40. 0.083 943.675 ↑ 1.9 234 1

Hash (cost=24,214.74..24,214.74 rows=454 width=12) (actual time=943.675..943.675 rows=234 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 11kB
41. 0.051 943.592 ↑ 1.9 234 1

Subquery Scan on cat (cost=24,205.66..24,214.74 rows=454 width=12) (actual time=943.483..943.592 rows=234 loops=1)

42. 1.029 943.541 ↑ 1.9 234 1

HashAggregate (cost=24,205.66..24,210.20 rows=454 width=4) (actual time=943.482..943.541 rows=234 loops=1)

  • Group Key: tca_1.id_ticket
43. 919.350 942.512 ↑ 30.8 247 1

Bitmap Heap Scan on ticketing_callback_action tca_1 (cost=179.31..24,167.67 rows=7,597 width=4) (actual time=28.916..942.512 rows=247 loops=1)

  • Recheck Cond: (id_callback_action = 2060)
  • Heap Blocks: exact=240
44. 23.162 23.162 ↑ 30.8 247 1

Bitmap Index Scan on ix_ticketing_callback_action_id_vw_order_error (cost=0.00..177.41 rows=7,597 width=0) (actual time=23.162..23.162 rows=247 loops=1)

  • Index Cond: (id_callback_action = 2060)
45. 0.028 4.381 ↑ 1.0 19 1

Hash (cost=1.19..1.19 rows=19 width=520) (actual time=4.381..4.381 rows=19 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 2kB
46. 4.353 4.353 ↑ 1.0 19 1

Seq Scan on produit p (cost=0.00..1.19 rows=19 width=520) (actual time=4.349..4.353 rows=19 loops=1)

47. 0.018 6.021 ↑ 1.0 11 1

Hash (cost=1.11..1.11 rows=11 width=1,552) (actual time=6.021..6.021 rows=11 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 2kB
48. 6.003 6.003 ↑ 1.0 11 1

Seq Scan on follow_up fu (cost=0.00..1.11 rows=11 width=1,552) (actual time=6.003..6.003 rows=11 loops=1)

49. 0.000 10,444.770 ↑ 1.0 1 29,505

Index Scan using id_chasing_action_pkey on ticketing_callback_action tca (cost=11.53..17.23 rows=1 width=84) (actual time=0.352..0.354 rows=1 loops=29,505)

  • Index Cond: (id_ticketing_callback_action = (SubPlan 1))
50.          

SubPlan (forIndex Scan)

51. 118.020 84,236.775 ↑ 1.0 1 29,505

Aggregate (cost=11.09..11.10 rows=1 width=4) (actual time=2.855..2.855 rows=1 loops=29,505)

52. 84,118.755 84,118.755 ↑ 6.0 2 29,505

Index Scan using ix_ticketing_callback_action_id_ticket on ticketing_callback_action (cost=0.43..11.06 rows=12 width=4) (actual time=1.424..2.851 rows=2 loops=29,505)

  • Index Cond: (id_ticket = t.id_ticket)
  • Filter: (id_callback_action <> ALL ('{60,62}'::integer[]))
  • Rows Removed by Filter: 1
53. 118.020 84,236.775 ↑ 1.0 1 29,505

Aggregate (cost=11.09..11.10 rows=1 width=4) (actual time=2.855..2.855 rows=1 loops=29,505)

54. 84,118.755 84,118.755 ↑ 6.0 2 29,505

Index Scan using ix_ticketing_callback_action_id_ticket on ticketing_callback_action (cost=0.43..11.06 rows=12 width=4) (actual time=1.424..2.851 rows=2 loops=29,505)

  • Index Cond: (id_ticket = t.id_ticket)
  • Filter: (id_callback_action <> ALL ('{60,62}'::integer[]))
  • Rows Removed by Filter: 1
55. 0.110 0.209 ↑ 1.0 178 1

Hash (cost=5.78..5.78 rows=178 width=62) (actual time=0.209..0.209 rows=178 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 17kB
56. 0.099 0.099 ↑ 1.0 178 1

Seq Scan on callback_action ca (cost=0.00..5.78 rows=178 width=62) (actual time=0.009..0.099 rows=178 loops=1)