explain.depesz.com

PostgreSQL's explain analyze made readable

Result: RM1p

Settings
# exclusive inclusive rows x rows loops node
1. 39.466 19,707.980 ↓ 1.0 98,049 1

Limit (cost=286,593.75..2,082,879.55 rows=95,376 width=3,765) (actual time=4,079.685..19,707.980 rows=98,049 loops=1)

2. 4,478.208 19,668.514 ↓ 1.0 98,049 1

Nested Loop Left Join (cost=286,593.75..2,082,879.55 rows=95,376 width=3,765) (actual time=4,079.683..19,668.514 rows=98,049 loops=1)

3. 1,757.041 14,994.208 ↓ 1.0 98,049 1

Nested Loop Left Join (cost=286,593.61..2,050,451.29 rows=95,376 width=3,712) (actual time=4,079.246..14,994.208 rows=98,049 loops=1)

4. 102.682 12,844.971 ↓ 1.0 98,049 1

Hash Left Join (cost=286,581.85..605,633.79 rows=95,376 width=3,631) (actual time=4,079.192..12,844.971 rows=98,049 loops=1)

  • Hash Cond: (t.id_last_follow_up = fu.id_follow_up)
5. 133.007 12,742.272 ↓ 1.0 98,049 1

Hash Left Join (cost=286,580.60..604,528.05 rows=95,376 width=1,567) (actual time=4,079.152..12,742.272 rows=98,049 loops=1)

  • Hash Cond: (v.id_utilisateur_creation = u3.id_utilisateur)
6. 114.556 12,607.235 ↓ 1.0 98,049 1

Hash Left Join (cost=286,352.62..602,511.77 rows=95,376 width=1,563) (actual time=4,077.112..12,607.235 rows=98,049 loops=1)

  • Hash Cond: (t.id_utilisateur_creation = u.id_utilisateur)
7. 86.825 12,490.473 ↓ 1.0 98,049 1

Hash Left Join (cost=286,124.63..600,495.48 rows=95,376 width=1,554) (actual time=4,074.890..12,490.473 rows=98,049 loops=1)

  • Hash Cond: (v.id_produit = p.id_produit)
8. 72.674 12,403.625 ↓ 1.0 98,049 1

Hash Left Join (cost=286,123.21..599,441.97 rows=95,376 width=1,042) (actual time=4,074.856..12,403.625 rows=98,049 loops=1)

  • Hash Cond: (t.id_ticket = cat.id_ticket)
9. 64.286 12,329.367 ↓ 1.0 98,049 1

Hash Left Join (cost=262,614.46..570,568.11 rows=95,376 width=1,034) (actual time=4,073.266..12,329.367 rows=98,049 loops=1)

  • Hash Cond: (t.id_ticketing_detail = td.id_ticketing_detail)
10. 123.407 12,265.056 ↓ 1.0 98,049 1

Hash Left Join (cost=262,612.69..570,125.29 rows=95,376 width=620) (actual time=4,073.233..12,265.056 rows=98,049 loops=1)

  • Hash Cond: (thi.id_utilisateur = thu.id_utilisateur)
11. 99.779 12,139.301 ↓ 1.0 98,049 1

Hash Join (cost=262,384.71..568,109.01 rows=95,376 width=615) (actual time=4,070.859..12,139.301 rows=98,049 loops=1)

  • Hash Cond: (tt.id_ticketing_queue = tq.id_ticketing_queue)
12. 5,719.235 12,039.472 ↓ 1.0 98,049 1

Hash Right Join (cost=262,383.44..566,796.32 rows=95,376 width=488) (actual time=4,070.793..12,039.472 rows=98,049 loops=1)

  • Hash Cond: (thi.id_ticketing_history = t.last_id_ticketing_history)
13. 2,251.533 2,251.533 ↑ 1.0 8,021,103 1

Seq Scan on ticketing_history thi (cost=0.00..139,250.94 rows=8,024,594 width=16) (actual time=0.082..2,251.533 rows=8,021,103 loops=1)

14. 127.131 4,068.704 ↓ 1.0 98,049 1

Hash (cost=255,323.24..255,323.24 rows=95,376 width=480) (actual time=4,068.704..4,068.704 rows=98,049 loops=1)

  • Buckets: 2048 Batches: 8 Memory Usage: 5020kB
15. 41.918 3,941.573 ↓ 1.0 98,049 1

Hash Join (cost=210,376.41..255,323.24 rows=95,376 width=480) (actual time=2,901.919..3,941.573 rows=98,049 loops=1)

  • Hash Cond: (t.id_ticketing_thematique = tt.id_ticketing_thematique)
16. 38.592 3,899.619 ↓ 1.0 98,049 1

Hash Join (cost=210,374.01..254,009.42 rows=95,376 width=458) (actual time=2,901.865..3,899.619 rows=98,049 loops=1)

  • Hash Cond: (t.id_ticketing_statut = ts.id_ticketing_statut)
17. 40.282 3,861.002 ↓ 1.0 98,049 1

Hash Join (cost=210,372.65..252,696.64 rows=95,376 width=335) (actual time=2,901.821..3,861.002 rows=98,049 loops=1)

  • Hash Cond: (v.id_statut_vente = sv.id_statut_vente)
18. 225.037 3,820.617 ↓ 1.0 98,049 1

Hash Join (cost=210,366.19..251,378.76 rows=95,376 width=296) (actual time=2,901.708..3,820.617 rows=98,049 loops=1)

  • Hash Cond: (v.id_client = c.id_client)
19. 469.208 2,749.844 ↓ 1.0 98,049 1

Hash Join (cost=148,228.27..177,587.32 rows=95,376 width=275) (actual time=2,055.908..2,749.844 rows=98,049 loops=1)

  • Hash Cond: (ams.id_adresse_manager = sa.id_address_manager)
20. 225.083 225.083 ↑ 1.0 552,101 1

Seq Scan on adresse_manager ams (cost=0.00..14,490.12 rows=554,712 width=37) (actual time=0.009..225.083 rows=552,101 loops=1)

21. 79.231 2,055.553 ↓ 1.0 98,049 1

Hash (cost=143,869.07..143,869.07 rows=95,376 width=246) (actual time=2,055.553..2,055.553 rows=98,049 loops=1)

  • Buckets: 4096 Batches: 4 Memory Usage: 4590kB
22. 293.534 1,976.322 ↓ 1.0 98,049 1

Hash Join (cost=128,273.42..143,869.07 rows=95,376 width=246) (actual time=1,587.889..1,976.322 rows=98,049 loops=1)

  • Hash Cond: (sa.id_sale = v.id_vente)
23. 95.313 95.313 ↑ 1.0 396,096 1

Seq Scan on sale_address sa (cost=0.00..6,879.28 rows=396,428 width=8) (actual time=0.014..95.313 rows=396,096 loops=1)

24. 77.897 1,587.475 ↓ 1.0 98,049 1

Hash (cost=123,899.27..123,899.27 rows=95,692 width=242) (actual time=1,587.475..1,587.475 rows=98,049 loops=1)

  • Buckets: 4096 Batches: 4 Memory Usage: 4543kB
25. 207.503 1,509.578 ↓ 1.0 98,049 1

Hash Join (cost=17,085.22..123,899.27 rows=95,692 width=242) (actual time=305.809..1,509.578 rows=98,049 loops=1)

  • Hash Cond: (t.id_vente = v.id_vente)
26. 996.947 996.947 ↓ 1.0 98,049 1

Seq Scan on ticket t (cost=0.00..97,131.88 rows=95,721 width=222) (actual time=0.113..996.947 rows=98,049 loops=1)

  • Filter: (id_ticketing_thematique = ANY ('{320,321,322}'::integer[]))
  • Rows Removed by Filter: 1851990
27. 136.059 305.128 ↑ 1.0 396,168 1

Hash (cost=9,782.43..9,782.43 rows=397,743 width=20) (actual time=305.128..305.128 rows=396,168 loops=1)

  • Buckets: 32768 Batches: 4 Memory Usage: 4948kB
28. 169.069 169.069 ↑ 1.0 396,168 1

Seq Scan on vente v (cost=0.00..9,782.43 rows=397,743 width=20) (actual time=0.020..169.069 rows=396,168 loops=1)

29. 178.524 845.736 ↓ 1.0 392,509 1

Hash (cost=54,598.63..54,598.63 rows=389,863 width=25) (actual time=845.736..845.736 rows=392,509 loops=1)

  • Buckets: 16384 Batches: 4 Memory Usage: 5570kB
30. 667.212 667.212 ↓ 1.0 392,509 1

Seq Scan on client c (cost=0.00..54,598.63 rows=389,863 width=25) (actual time=0.823..667.212 rows=392,509 loops=1)

31. 0.049 0.103 ↑ 1.0 154 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 12kB
32. 0.054 0.054 ↑ 1.0 154 1

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

33. 0.005 0.025 ↑ 1.0 16 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
34. 0.020 0.020 ↑ 1.0 16 1

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

35. 0.017 0.036 ↓ 1.0 63 1

Hash (cost=1.62..1.62 rows=62 width=30) (actual time=0.036..0.036 rows=63 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 4kB
36. 0.019 0.019 ↓ 1.0 63 1

Seq Scan on ticketing_thematique tt (cost=0.00..1.62 rows=62 width=30) (actual time=0.005..0.019 rows=63 loops=1)

37. 0.005 0.050 ↓ 1.1 13 1

Hash (cost=1.12..1.12 rows=12 width=135) (actual time=0.050..0.050 rows=13 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
38. 0.045 0.045 ↓ 1.1 13 1

Seq Scan on ticketing_queue tq (cost=0.00..1.12 rows=12 width=135) (actual time=0.040..0.045 rows=13 loops=1)

39. 0.942 2.348 ↑ 1.0 4,666 1

Hash (cost=169.66..169.66 rows=4,666 width=13) (actual time=2.348..2.348 rows=4,666 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 220kB
40. 1.406 1.406 ↑ 1.0 4,666 1

Seq Scan on utilisateur thu (cost=0.00..169.66 rows=4,666 width=13) (actual time=0.012..1.406 rows=4,666 loops=1)

41. 0.007 0.025 ↑ 1.0 34 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 2kB
42. 0.018 0.018 ↑ 1.0 34 1

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

43. 0.071 1.584 ↑ 2.1 209 1

Hash (cost=23,503.37..23,503.37 rows=430 width=12) (actual time=1.584..1.584 rows=209 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
44. 0.046 1.513 ↑ 2.1 209 1

Subquery Scan on cat (cost=23,494.77..23,503.37 rows=430 width=12) (actual time=1.425..1.513 rows=209 loops=1)

45. 0.209 1.467 ↑ 2.1 209 1

HashAggregate (cost=23,494.77..23,499.07 rows=430 width=4) (actual time=1.423..1.467 rows=209 loops=1)

  • Group Key: tca_1.id_ticket
46. 1.194 1.258 ↑ 34.0 220 1

Bitmap Heap Scan on ticketing_callback_action tca_1 (cost=174.43..23,457.35 rows=7,484 width=4) (actual time=0.097..1.258 rows=220 loops=1)

  • Recheck Cond: (id_callback_action = 2060)
  • Heap Blocks: exact=214
47. 0.064 0.064 ↑ 34.0 220 1

Bitmap Index Scan on ix_ticketing_callback_action_id_vw_order_error (cost=0.00..172.56 rows=7,484 width=0) (actual time=0.064..0.064 rows=220 loops=1)

  • Index Cond: (id_callback_action = 2060)
48. 0.007 0.023 ↑ 1.0 19 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 2kB
49. 0.016 0.016 ↑ 1.0 19 1

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

50. 1.011 2.206 ↑ 1.0 4,666 1

Hash (cost=169.66..169.66 rows=4,666 width=17) (actual time=2.206..2.206 rows=4,666 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 221kB
51. 1.195 1.195 ↑ 1.0 4,666 1

Seq Scan on utilisateur u (cost=0.00..169.66 rows=4,666 width=17) (actual time=0.003..1.195 rows=4,666 loops=1)

52. 0.870 2.030 ↑ 1.0 4,666 1

Hash (cost=169.66..169.66 rows=4,666 width=8) (actual time=2.030..2.030 rows=4,666 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 166kB
53. 1.160 1.160 ↑ 1.0 4,666 1

Seq Scan on utilisateur u3 (cost=0.00..169.66 rows=4,666 width=8) (actual time=0.003..1.160 rows=4,666 loops=1)

54. 0.004 0.017 ↑ 1.0 11 1

Hash (cost=1.11..1.11 rows=11 width=2,068) (actual time=0.017..0.017 rows=11 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 2kB
55. 0.013 0.013 ↑ 1.0 11 1

Seq Scan on follow_up fu (cost=0.00..1.11 rows=11 width=2,068) (actual time=0.010..0.013 rows=11 loops=1)

56. 0.000 392.196 ↓ 0.0 0 98,049

Index Scan using id_chasing_action_pkey on ticketing_callback_action tca (cost=11.76..15.14 rows=1 width=85) (actual time=0.003..0.004 rows=0 loops=98,049)

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

SubPlan (forIndex Scan)

58. 98.049 1,470.735 ↑ 1.0 1 98,049

Aggregate (cost=11.32..11.33 rows=1 width=4) (actual time=0.015..0.015 rows=1 loops=98,049)

59. 1,372.686 1,372.686 ↑ 12.0 1 98,049

Index Scan using ix_ticketing_callback_action_id_ticket on ticketing_callback_action (cost=0.43..11.29 rows=12 width=4) (actual time=0.013..0.014 rows=1 loops=98,049)

  • Index Cond: (id_ticket = t.id_ticket)
  • Filter: (id_callback_action <> ALL ('{60,62}'::integer[]))
  • Rows Removed by Filter: 1
60. 98.049 1,470.735 ↑ 1.0 1 98,049

Aggregate (cost=11.32..11.33 rows=1 width=4) (actual time=0.015..0.015 rows=1 loops=98,049)

61. 1,372.686 1,372.686 ↑ 12.0 1 98,049

Index Scan using ix_ticketing_callback_action_id_ticket on ticketing_callback_action (cost=0.43..11.29 rows=12 width=4) (actual time=0.013..0.014 rows=1 loops=98,049)

  • Index Cond: (id_ticket = t.id_ticket)
  • Filter: (id_callback_action <> ALL ('{60,62}'::integer[]))
  • Rows Removed by Filter: 1
62. 196.098 196.098 ↓ 0.0 0 98,049

Index Scan using id_action_callback_pkey on callback_action ca (cost=0.14..0.16 rows=1 width=61) (actual time=0.001..0.002 rows=0 loops=98,049)

  • Index Cond: (id_callback_action = tca.id_callback_action)