explain.depesz.com

PostgreSQL's explain analyze made readable

Result: PEn2

Settings
# exclusive inclusive rows x rows loops node
1. 148.050 719.758 ↑ 1.0 99,909 1

Sort (cost=71,160.24..71,410.01 rows=99,909 width=322) (actual time=701.132..719.758 rows=99,909 loops=1)

  • Sort Key: (CASE WHEN (s.fk_salarie IS NOT NULL) THEN (((ss.sa_nom)::text || ' '::text) || (ss.sa_prenom)::text) WHEN (c.fk_client IS NOT NULL) THEN (((cc.cl_nom)::text || ' '::text) || (cc.cl_prenom)::text) WHEN (f.fk_famille IS NOT NULL) THEN (((ff.fam_ (...)
  • Sort Method: external sort Disk: 19728kB
2. 26.161 571.708 ↑ 1.0 99,909 1

Hash Left Join (cost=14,272.13..32,812.63 rows=99,909 width=322) (actual time=94.939..571.708 rows=99,909 loops=1)

  • Hash Cond: (i.fk_ctc_interl = ii.id_ctcint)
3. 15.564 545.406 ↑ 1.0 99,909 1

Hash Left Join (cost=14,256.94..28,426.42 rows=99,909 width=304) (actual time=94.791..545.406 rows=99,909 loops=1)

  • Hash Cond: (ll.id_log_sms = i.fk_log_sms)
4. 15.818 529.842 ↑ 1.0 99,909 1

Hash Left Join (cost=14,198.79..27,847.33 rows=99,909 width=300) (actual time=94.788..529.842 rows=99,909 loops=1)

  • Hash Cond: (ll.id_log_sms = m.fk_log_sms)
5. 15.740 514.023 ↑ 1.0 99,909 1

Hash Left Join (cost=13,953.64..27,081.24 rows=99,909 width=280) (actual time=94.784..514.023 rows=99,909 loops=1)

  • Hash Cond: (ll.id_log_sms = d.fk_log_sms)
6. 14.330 498.282 ↑ 1.0 99,909 1

Hash Left Join (cost=13,886.33..26,492.98 rows=99,909 width=269) (actual time=94.781..498.282 rows=99,909 loops=1)

  • Hash Cond: (ll.id_log_sms = o.fk_log_sms)
7. 18.599 483.951 ↑ 1.0 99,909 1

Hash Join (cost=13,764.18..25,849.88 rows=99,909 width=238) (actual time=94.776..483.951 rows=99,909 loops=1)

  • Hash Cond: (ll.fk_utilisateur = u.id_utilisateur)
8. 12.713 465.093 ↑ 1.0 99,909 1

Hash Left Join (cost=13,708.85..24,420.81 rows=99,909 width=222) (actual time=94.498..465.093 rows=99,909 loops=1)

  • Hash Cond: (ll.id_log_sms = s.fk_log_sms)
9. 12.517 452.361 ↑ 1.0 99,909 1

Hash Left Join (cost=13,699.51..24,036.80 rows=99,909 width=202) (actual time=94.470..452.361 rows=99,909 loops=1)

  • Hash Cond: (ll.id_log_sms = f.fk_log_sms)
10. 311.344 427.650 ↑ 1.0 99,909 1

Hash Right Join (cost=11,903.72..21,720.07 rows=99,909 width=182) (actual time=82.266..427.650 rows=99,909 loops=1)

  • Hash Cond: (c.fk_log_sms = ll.id_log_sms)
11. 26.342 54.400 ↑ 1.0 99,902 1

Hash Left Join (cost=4,066.45..8,745.39 rows=99,902 width=24) (actual time=19.393..54.400 rows=99,902 loops=1)

  • Hash Cond: (c.fk_client = cc.id_client)
12. 8.738 8.738 ↑ 1.0 99,902 1

Seq Scan on t_log_sms_cl c (cost=0.00..1,442.02 rows=99,902 width=8) (actual time=0.005..8.738 rows=99,902 loops=1)

13. 10.173 19.320 ↑ 1.0 56,139 1

Hash (cost=3,026.98..3,026.98 rows=56,598 width=20) (actual time=19.320..19.320 rows=56,139 loops=1)

  • Buckets: 2048 Batches: 4 Memory Usage: 746kB
14. 9.147 9.147 ↑ 1.0 56,139 1

Seq Scan on t_client cc (cost=0.00..3,026.98 rows=56,598 width=20) (actual time=0.004..9.147 rows=56,139 loops=1)

15. 37.580 61.906 ↑ 1.0 99,909 1

Hash (cost=4,246.41..4,246.41 rows=99,909 width=162) (actual time=61.906..61.906 rows=99,909 loops=1)

  • Buckets: 1024 Batches: 32 Memory Usage: 625kB
16. 24.326 24.326 ↑ 1.0 99,909 1

Seq Scan on t_log_sms ll (cost=0.00..4,246.41 rows=99,909 width=162) (actual time=0.009..24.326 rows=99,909 loops=1)

  • Filter: ((ls_sms_date >= '2019-01-01 00:00:00'::timestamp without time zone) AND (ls_sms_date <= '2019-01-31 23:59:59'::timestamp without time zone) AND (fk_agence = 4))
17. 0.002 12.194 ↑ 1,070.0 2 1

Hash (cost=1,769.04..1,769.04 rows=2,140 width=24) (actual time=12.194..12.194 rows=2 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
18. 4.065 12.192 ↑ 1,070.0 2 1

Hash Left Join (cost=1,501.16..1,769.04 rows=2,140 width=24) (actual time=8.141..12.192 rows=2 loops=1)

  • Hash Cond: (f.fk_famille = ff.id_famille)
19. 0.003 0.003 ↑ 1,070.0 2 1

Seq Scan on t_log_sms_fa f (cost=0.00..31.40 rows=2,140 width=8) (actual time=0.002..0.003 rows=2 loops=1)

20. 4.726 8.124 ↑ 1.0 29,339 1

Hash (cost=960.85..960.85 rows=29,385 width=20) (actual time=8.124..8.124 rows=29,339 loops=1)

  • Buckets: 2048 Batches: 2 Memory Usage: 782kB
21. 3.398 3.398 ↑ 1.0 29,339 1

Seq Scan on t_famille ff (cost=0.00..960.85 rows=29,385 width=20) (actual time=0.002..3.398 rows=29,339 loops=1)

22. 0.002 0.019 ↑ 1.0 1 1

Hash (cost=9.32..9.32 rows=1 width=24) (actual time=0.019..0.019 rows=1 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
23. 0.004 0.017 ↑ 1.0 1 1

Nested Loop Left Join (cost=0.29..9.32 rows=1 width=24) (actual time=0.016..0.017 rows=1 loops=1)

24. 0.003 0.003 ↑ 1.0 1 1

Seq Scan on t_log_sms_sa s (cost=0.00..1.01 rows=1 width=8) (actual time=0.003..0.003 rows=1 loops=1)

25. 0.010 0.010 ↑ 1.0 1 1

Index Scan using pk_t_salarie on t_salarie ss (cost=0.29..8.30 rows=1 width=20) (actual time=0.009..0.010 rows=1 loops=1)

  • Index Cond: (s.fk_salarie = id_salarie)
26. 0.106 0.259 ↑ 1.0 948 1

Hash (cost=43.48..43.48 rows=948 width=20) (actual time=0.259..0.259 rows=948 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 51kB
27. 0.153 0.153 ↑ 1.0 948 1

Seq Scan on t_utilisateur u (cost=0.00..43.48 rows=948 width=20) (actual time=0.004..0.153 rows=948 loops=1)

28. 0.000 0.001 ↓ 0.0 0 1

Hash (cost=95.41..95.41 rows=2,140 width=35) (actual time=0.001..0.001 rows=0 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 0kB
29. 0.001 0.001 ↓ 0.0 0 1

Hash Left Join (cost=34.58..95.41 rows=2,140 width=35) (actual time=0.001..0.001 rows=0 loops=1)

  • Hash Cond: (o.fk_organisme = oo.id_organisme)
30. 0.000 0.000 ↓ 0.0 0 1

Seq Scan on t_log_sms_or o (cost=0.00..31.40 rows=2,140 width=8) (actual time=0.000..0.000 rows=0 loops=1)

31. 0.000 0.000 ↓ 0.0 0

Hash (cost=26.48..26.48 rows=648 width=31) (never executed)

32. 0.000 0.000 ↓ 0.0 0

Seq Scan on t_organisme oo (cost=0.00..26.48 rows=648 width=31) (never executed)

33. 0.001 0.001 ↓ 0.0 0 1

Hash (cost=40.56..40.56 rows=2,140 width=15) (actual time=0.001..0.001 rows=0 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 0kB
34. 0.000 0.000 ↓ 0.0 0 1

Hash Left Join (cost=1.02..40.56 rows=2,140 width=15) (actual time=0.000..0.000 rows=0 loops=1)

  • Hash Cond: (d.fk_deleguetutelle = dd.id_deleguetutelle)
35. 0.000 0.000 ↓ 0.0 0 1

Seq Scan on t_log_sms_dt d (cost=0.00..31.40 rows=2,140 width=8) (actual time=0.000..0.000 rows=0 loops=1)

36. 0.000 0.000 ↓ 0.0 0

Hash (cost=1.01..1.01 rows=1 width=11) (never executed)

37. 0.000 0.000 ↓ 0.0 0

Seq Scan on t_deleguetutelle dd (cost=0.00..1.01 rows=1 width=11) (never executed)

38. 0.001 0.001 ↓ 0.0 0 1

Hash (cost=218.40..218.40 rows=2,140 width=24) (actual time=0.001..0.001 rows=0 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 0kB
39. 0.000 0.000 ↓ 0.0 0 1

Hash Left Join (cost=149.55..218.40 rows=2,140 width=24) (actual time=0.000..0.000 rows=0 loops=1)

  • Hash Cond: (m.fk_medsocial = mm.id_medsocial)
40. 0.000 0.000 ↓ 0.0 0 1

Seq Scan on t_log_sms_ms m (cost=0.00..31.40 rows=2,140 width=8) (actual time=0.000..0.000 rows=0 loops=1)

41. 0.000 0.000 ↓ 0.0 0

Hash (cost=100.91..100.91 rows=3,891 width=20) (never executed)

42. 0.000 0.000 ↓ 0.0 0

Seq Scan on t_medsocial mm (cost=0.00..100.91 rows=3,891 width=20) (never executed)

43. 0.000 0.000 ↓ 0.0 0 1

Hash (cost=31.40..31.40 rows=2,140 width=8) (actual time=0.000..0.000 rows=0 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 0kB
44. 0.000 0.000 ↓ 0.0 0 1

Seq Scan on t_log_sms_ia i (cost=0.00..31.40 rows=2,140 width=8) (actual time=0.000..0.000 rows=0 loops=1)

45. 0.084 0.141 ↑ 1.0 364 1

Hash (cost=10.64..10.64 rows=364 width=22) (actual time=0.141..0.141 rows=364 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 20kB
46. 0.057 0.057 ↑ 1.0 364 1

Seq Scan on t_ctc_interl ii (cost=0.00..10.64 rows=364 width=22) (actual time=0.007..0.057 rows=364 loops=1)