explain.depesz.com

PostgreSQL's explain analyze made readable

Result: U3dT

Settings
# exclusive inclusive rows x rows loops node
1. 563.621 3,249.148 ↓ 9.6 229,412 1

Gather (cost=33,109.35..68,984.45 rows=23,877 width=4,138) (actual time=1,458.571..3,249.148 rows=229,412 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
2. 444.450 2,685.527 ↓ 7.7 76,471 3

Hash Join (cost=32,109.35..65,596.75 rows=9,949 width=4,138) (actual time=1,360.043..2,685.527 rows=76,471 loops=3)

  • Hash Cond: (v.primary_location_uid = pl.id)
3. 81.669 2,241.022 ↓ 7.7 76,471 3

Hash Join (cost=32,107.90..64,892.10 rows=9,949 width=3,137) (actual time=1,359.781..2,241.022 rows=76,471 loops=3)

  • Hash Cond: (v.current_location_uid = cl.id)
4. 78.489 2,159.301 ↓ 7.7 76,471 3

Hash Join (cost=32,106.45..64,859.00 rows=9,949 width=3,088) (actual time=1,359.716..2,159.301 rows=76,471 loops=3)

  • Hash Cond: (v.attending_physician_uid = ap.id)
5. 80.464 2,080.752 ↓ 7.7 76,471 3

Hash Join (cost=32,104.55..64,828.22 rows=9,949 width=2,505) (actual time=1,359.639..2,080.752 rows=76,471 loops=3)

  • Hash Cond: (v.referring_physician_uid = rp.id)
6. 326.634 2,000.255 ↓ 7.7 76,471 3

Nested Loop (cost=32,102.65..64,797.43 rows=9,949 width=1,922) (actual time=1,359.590..2,000.255 rows=76,471 loops=3)

7. 504.863 1,673.618 ↓ 7.7 76,471 3

Parallel Hash Join (cost=32,102.23..58,298.12 rows=9,949 width=1,837) (actual time=1,359.543..1,673.618 rows=76,471 loops=3)

  • Hash Cond: (p_1.id = s_1.patient_uid)
8. 67.651 532.528 ↓ 2.4 119,372 3

Hash Join (cost=8,299.46..24,184.08 rows=49,820 width=351) (actual time=174.939..532.528 rows=119,372 loops=3)

  • Hash Cond: (p_1.site_uid = s.id)
9. 191.990 464.484 ↓ 2.4 119,372 3

Hash Left Join (cost=8,270.57..24,023.44 rows=49,820 width=245) (actual time=174.525..464.484 rows=119,372 loops=3)

  • Hash Cond: (p_1.id = p.patient_uid)
10. 98.588 98.588 ↓ 2.4 119,372 3

Parallel Seq Scan on patient p_1 (cost=0.00..11,707.52 rows=49,820 width=213) (actual time=0.051..98.588 rows=119,372 loops=3)

  • Filter: (((obsolete)::text = 'N'::text) AND ((id + 0) > 0))
  • Rows Removed by Filter: 0
11. 36.872 173.906 ↑ 1.0 101,901 3

Hash (cost=6,199.80..6,199.80 rows=101,901 width=40) (actual time=173.905..173.906 rows=101,901 loops=3)

  • Buckets: 65536 Batches: 4 Memory Usage: 1965kB
12. 137.034 137.034 ↑ 1.0 101,901 3

Seq Scan on alias_patient p (cost=0.00..6,199.80 rows=101,901 width=40) (actual time=0.068..137.034 rows=101,901 loops=3)

13. 0.224 0.393 ↑ 1.0 573 3

Hash (cost=21.73..21.73 rows=573 width=114) (actual time=0.392..0.393 rows=573 loops=3)

  • Buckets: 1024 Batches: 1 Memory Usage: 93kB
14. 0.169 0.169 ↑ 1.0 573 3

Seq Scan on site s (cost=0.00..21.73 rows=573 width=114) (actual time=0.013..0.169 rows=573 loops=3)

15. 143.560 636.227 ↓ 2.6 76,471 3

Parallel Hash (cost=17,920.69..17,920.69 rows=29,846 width=1,486) (actual time=636.226..636.227 rows=76,471 loops=3)

  • Buckets: 4096 Batches: 32 Memory Usage: 2720kB
16. 54.283 492.667 ↓ 2.6 76,471 3

Hash Left Join (cost=38.09..17,920.69 rows=29,846 width=1,486) (actual time=1.014..492.667 rows=76,471 loops=3)

  • Hash Cond: (s_1.id = li.table_uid)
17. 54.394 438.356 ↓ 2.6 76,471 3

Hash Left Join (cost=37.06..17,807.74 rows=29,846 width=1,481) (actual time=0.942..438.356 rows=76,471 loops=3)

  • Hash Cond: ((s_1.priority)::text = (p_2.code)::text)
18. 56.020 383.922 ↓ 2.6 76,471 3

Hash Join (cost=36.02..17,661.62 rows=29,846 width=1,477) (actual time=0.852..383.922 rows=76,471 loops=3)

  • Hash Cond: (pi.modality_uid = m.id)
19. 60.092 327.865 ↓ 2.6 76,471 3

Hash Join (cost=34.57..17,565.22 rows=29,846 width=1,482) (actual time=0.805..327.865 rows=76,471 loops=3)

  • Hash Cond: (s_1.procedure_info_uid = pi.id)
20. 51.723 267.702 ↓ 2.6 76,471 3

Hash Join (cost=32.02..17,479.51 rows=29,846 width=1,432) (actual time=0.724..267.702 rows=76,471 loops=3)

  • Hash Cond: (s_1.local_ae_uid = lae.id)
21. 50.995 215.952 ↓ 2.6 76,471 3

Hash Join (cost=30.79..17,366.73 rows=29,846 width=1,419) (actual time=0.687..215.952 rows=76,471 loops=3)

  • Hash Cond: (s_1.site_uid = si.id)
22. 65.013 164.445 ↓ 2.6 76,471 3

Hash Join (cost=1.90..17,258.91 rows=29,846 width=1,366) (actual time=0.163..164.445 rows=76,471 loops=3)

  • Hash Cond: (s_1.requesting_physician_uid = rp_1.id)
23. 99.391 99.391 ↓ 2.6 76,471 3

Parallel Seq Scan on study s_1 (cost=0.00..17,170.37 rows=29,846 width=783) (actual time=0.065..99.391 rows=76,471 loops=3)

  • Filter: (((obsolete)::text = 'N'::text) AND (status = 40) AND ((id + 0) > 0))
  • Rows Removed by Filter: 51266
24. 0.018 0.041 ↑ 1.0 40 3

Hash (cost=1.40..1.40 rows=40 width=591) (actual time=0.041..0.041 rows=40 loops=3)

  • Buckets: 1024 Batches: 1 Memory Usage: 13kB
25. 0.023 0.023 ↑ 1.0 40 3

Seq Scan on user_info rp_1 (cost=0.00..1.40 rows=40 width=591) (actual time=0.005..0.023 rows=40 loops=3)

26. 0.242 0.512 ↑ 1.0 573 3

Hash (cost=21.73..21.73 rows=573 width=61) (actual time=0.512..0.512 rows=573 loops=3)

  • Buckets: 1024 Batches: 1 Memory Usage: 63kB
27. 0.270 0.270 ↑ 1.0 573 3

Seq Scan on site si (cost=0.00..21.73 rows=573 width=61) (actual time=0.051..0.270 rows=573 loops=3)

28. 0.007 0.027 ↑ 1.0 10 3

Hash (cost=1.10..1.10 rows=10 width=21) (actual time=0.026..0.027 rows=10 loops=3)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
29. 0.020 0.020 ↑ 1.0 10 3

Seq Scan on local_ae lae (cost=0.00..1.10 rows=10 width=21) (actual time=0.018..0.020 rows=10 loops=3)

30. 0.030 0.071 ↑ 1.0 69 3

Hash (cost=1.69..1.69 rows=69 width=58) (actual time=0.071..0.071 rows=69 loops=3)

  • Buckets: 1024 Batches: 1 Memory Usage: 15kB
31. 0.041 0.041 ↑ 1.0 69 3

Seq Scan on procedure_info pi (cost=0.00..1.69 rows=69 width=58) (actual time=0.026..0.041 rows=69 loops=3)

32. 0.010 0.037 ↑ 1.0 20 3

Hash (cost=1.20..1.20 rows=20 width=11) (actual time=0.036..0.037 rows=20 loops=3)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
33. 0.027 0.027 ↑ 1.0 20 3

Seq Scan on modality m (cost=0.00..1.20 rows=20 width=11) (actual time=0.023..0.027 rows=20 loops=3)

34. 0.007 0.040 ↑ 1.0 2 3

Hash (cost=1.02..1.02 rows=2 width=4) (actual time=0.040..0.040 rows=2 loops=3)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
35. 0.033 0.033 ↑ 1.0 2 3

Seq Scan on priority p_2 (cost=0.00..1.02 rows=2 width=4) (actual time=0.032..0.033 rows=2 loops=3)

36. 0.005 0.028 ↑ 1.0 1 3

Hash (cost=1.01..1.01 rows=1 width=13) (actual time=0.028..0.028 rows=1 loops=3)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
37. 0.023 0.023 ↑ 1.0 1 3

Seq Scan on lock_info li (cost=0.00..1.01 rows=1 width=13) (actual time=0.023..0.023 rows=1 loops=3)

  • Filter: ((table_name)::text = 'STUDY'::text)
38. 0.003 0.003 ↑ 1.0 1 229,412

Index Scan using visit_pk on visit v (cost=0.42..0.65 rows=1 width=85) (actual time=0.003..0.003 rows=1 loops=229,412)

  • Index Cond: (id = s_1.visit_uid)
  • Filter: (obsolete = 'N'::bpchar)
39. 0.019 0.033 ↑ 1.0 40 3

Hash (cost=1.40..1.40 rows=40 width=591) (actual time=0.033..0.033 rows=40 loops=3)

  • Buckets: 1024 Batches: 1 Memory Usage: 13kB
40. 0.014 0.014 ↑ 1.0 40 3

Seq Scan on user_info rp (cost=0.00..1.40 rows=40 width=591) (actual time=0.004..0.014 rows=40 loops=3)

41. 0.023 0.060 ↑ 1.0 40 3

Hash (cost=1.40..1.40 rows=40 width=591) (actual time=0.059..0.060 rows=40 loops=3)

  • Buckets: 1024 Batches: 1 Memory Usage: 13kB
42. 0.037 0.037 ↑ 1.0 40 3

Seq Scan on user_info ap (cost=0.00..1.40 rows=40 width=591) (actual time=0.025..0.037 rows=40 loops=3)

43. 0.013 0.052 ↑ 1.0 20 3

Hash (cost=1.20..1.20 rows=20 width=57) (actual time=0.050..0.052 rows=20 loops=3)

  • Buckets: 1024 Batches: 1 Memory Usage: 10kB
44. 0.039 0.039 ↑ 1.0 20 3

Seq Scan on location cl (cost=0.00..1.20 rows=20 width=57) (actual time=0.022..0.039 rows=20 loops=3)

45. 0.014 0.055 ↑ 1.0 20 3

Hash (cost=1.20..1.20 rows=20 width=57) (actual time=0.055..0.055 rows=20 loops=3)

  • Buckets: 1024 Batches: 1 Memory Usage: 10kB
46. 0.041 0.041 ↑ 1.0 20 3

Seq Scan on location pl (cost=0.00..1.20 rows=20 width=57) (actual time=0.036..0.041 rows=20 loops=3)