explain.depesz.com

PostgreSQL's explain analyze made readable

Result: swOX

Settings
# exclusive inclusive rows x rows loops node
1. 91.475 92.941 ↓ 0.0 0 1

Limit (cost=264,511.42..264,511.48 rows=25 width=541) (actual time=92.941..92.941 rows=0 loops=1)

  • Buffers: shared hit=301
  • JIT:
  • Functions: 120
  • Options: Inlining false, Optimization false, Expressions true, Deforming true
  • Timing: Generation 11.765 ms, Inlining 0.000 ms, Optimization 3.850 ms, Emission 86.574 ms, Total 102.189 ms
  • Execution Time: 142.431 ms(80 строк)
2. 0.063 1.466 ↓ 0.0 0 1

Sort (cost=264,511.42..264,511.48 rows=25 width=541) (actual time=1.466..1.466 rows=0 loops=1)

  • Sort Key: reg.id
  • Sort Method: quicksort Memory: 25kB
  • Buffers: shared hit=301
3. 1.403 1.403 ↓ 0.0 0 1

Result (cost=143,875.63..264,510.83 rows=25 width=541) (actual time=1.403..1.403 rows=0 loops=1)

  • One-Time Filter: (nfc.f4role_unitprivs8check('cvd.reg'::character varying) AND nfc.f4role_unitprivs8check('pers.person'::character varying) AND nfc.f4role_unitprivs8check('cvd.cvdreg'::character varying) AND nfc.f4role_unitprivs8check('cvd.cvdreg'::character varying))
  • Buffers: shared hit=298
4. 0.000 0.000 ↓ 0.0 0

Hash Semi Join (cost=143,875.63..264,509.93 rows=25 width=607) (never executed)

  • Hash Cond: (denorm.id = cvdreg_1.pid)
5. 0.000 0.000 ↓ 0.0 0

Hash Left Join (cost=141,963.52..261,276.51 rows=503,248 width=615) (never executed)

  • Hash Cond: (denorm_1.diagnosis_postmortem = cr_diagnosis_postmortem.id)
6. 0.000 0.000 ↓ 0.0 0

Hash Left Join (cost=140,901.62..258,893.57 rows=503,248 width=489) (never executed)

  • Hash Cond: (cvdreg.disease_outcome = cr_disease_outcome.id)
7. 0.000 0.000 ↓ 0.0 0

Hash Join (cost=140,900.46..257,182.15 rows=503,248 width=441) (never executed)

  • Hash Cond: ((cvdreg.diagnosis_main)::text = (cr_diagnosis_main.mkb)::text)
8. 0.000 0.000 ↓ 0.0 0

Hash Right Join (cost=140,898.60..255,711.94 rows=503,248 width=327) (never executed)

  • Hash Cond: (main_1.id = denorm_1.last_daily)
9. 0.000 0.000 ↓ 0.0 0

Result (cost=1.39..55,366.44 rows=1,644,320 width=42) (never executed)

  • One-Time Filter: nfc.f4role_unitprivs8check('cvd.cvdreg_daily'::character varying)
10. 0.000 0.000 ↓ 0.0 0

Hash Left Join (cost=1.39..55,366.44 rows=1,644,320 width=42) (never executed)

  • Hash Cond: (main_1.disease_severity = ref_disease_severity.id)
11. 0.000 0.000 ↓ 0.0 0

Seq Scan on cvdreg_daily main_1 (cost=0.00..48,020.20 rows=1,644,320 width=14) (never executed)

12. 0.000 0.000 ↓ 0.0 0

Hash (cost=1.06..1.06 rows=6 width=32) (never executed)

13. 0.000 0.000 ↓ 0.0 0

Seq Scan on fnsi_1_2_643_5_1_13_13_11_1006 ref_disease_severity (cost=0.00..1.06 rows=6 width=32) (never executed)

14. 0.000 0.000 ↓ 0.0 0

Hash (cost=114,456.62..114,456.62 rows=503,248 width=301) (never executed)

15. 0.000 0.000 ↓ 0.0 0

Hash Left Join (cost=82,588.50..114,456.62 rows=503,248 width=301) (never executed)

  • Hash Cond: (cvdreg.id = denorm_1.id)
16. 0.000 0.000 ↓ 0.0 0

Hash Join (cost=67,823.98..98,371.06 rows=503,248 width=297) (never executed)

  • Hash Cond: (denorm.last_cvdreg = cvdreg.id)
17. 0.000 0.000 ↓ 0.0 0

Hash Join (cost=40,868.84..70,094.88 rows=503,248 width=279) (never executed)

  • Hash Cond: (reg.id = denorm.id)
18. 0.000 0.000 ↓ 0.0 0

Hash Join (cost=26,638.76..54,597.13 rows=482,920 width=263) (never executed)

  • Hash Cond: (main.gender = p_gender.id)
19. 0.000 0.000 ↓ 0.0 0

Hash Join (cost=26,637.69..51,537.57 rows=482,920 width=244) (never executed)

  • Hash Cond: (reg.person = main.id)
20. 0.000 0.000 ↓ 0.0 0

Hash Join (cost=4,849.68..28,481.88 rows=482,920 width=150) (never executed)

  • Hash Cond: (r_mo.regionid = r_reg.id)
21. 0.000 0.000 ↓ 0.0 0

Hash Join (cost=4,845.61..27,151.75 rows=482,920 width=110) (never executed)

  • Hash Cond: (reg.mo = r_mo.id)
22. 0.000 0.000 ↓ 0.0 0

Seq Scan on reg (cost=0.00..21,038.20 rows=482,920 width=52) (never executed)

23. 0.000 0.000 ↓ 0.0 0

Hash (cost=4,600.27..4,600.27 rows=19,627 width=62) (never executed)

24. 0.000 0.000 ↓ 0.0 0

Seq Scan on fnsi_1_2_643_5_1_13_13_11_1461 r_mo (cost=0.00..4,600.27 rows=19,627 width=62) (never executed)

25. 0.000 0.000 ↓ 0.0 0

Hash (cost=2.92..2.92 rows=92 width=44) (never executed)

26. 0.000 0.000 ↓ 0.0 0

Seq Scan on fnsi_1_2_643_5_1_13_13_99_2_206 r_reg (cost=0.00..2.92 rows=92 width=44) (never executed)

27. 0.000 0.000 ↓ 0.0 0

Hash (cost=15,527.45..15,527.45 rows=500,845 width=102) (never executed)

28. 0.000 0.000 ↓ 0.0 0

Seq Scan on person main (cost=0.00..15,527.45 rows=500,845 width=102) (never executed)

29. 0.000 0.000 ↓ 0.0 0

Hash (cost=1.03..1.03 rows=3 width=23) (never executed)

30. 0.000 0.000 ↓ 0.0 0

Seq Scan on fnsi_1_2_643_5_1_13_13_11_1040 p_gender (cost=0.00..1.03 rows=3 width=23) (never executed)

31. 0.000 0.000 ↓ 0.0 0

Hash (cost=7,939.48..7,939.48 rows=503,248 width=16) (never executed)

32. 0.000 0.000 ↓ 0.0 0

Seq Scan on reg0denorm denorm (cost=0.00..7,939.48 rows=503,248 width=16) (never executed)

33. 0.000 0.000 ↓ 0.0 0

Hash (cost=20,216.73..20,216.73 rows=539,073 width=26) (never executed)

34. 0.000 0.000 ↓ 0.0 0

Seq Scan on cvdreg (cost=0.00..20,216.73 rows=539,073 width=26) (never executed)

35. 0.000 0.000 ↓ 0.0 0

Hash (cost=8,483.12..8,483.12 rows=502,512 width=20) (never executed)

36. 0.000 0.000 ↓ 0.0 0

Seq Scan on cvdreg0denorm denorm_1 (cost=0.00..8,483.12 rows=502,512 width=20) (never executed)

37. 0.000 0.000 ↓ 0.0 0

Hash (cost=1.38..1.38 rows=38 width=119) (never executed)

38. 0.000 0.000 ↓ 0.0 0

Seq Scan on fnsi_1_2_643_5_1_13_13_99_2_568 cr_diagnosis_main (cost=0.00..1.38 rows=38 width=119) (never executed)

39. 0.000 0.000 ↓ 0.0 0

Hash (cost=1.07..1.07 rows=7 width=52) (never executed)

40. 0.000 0.000 ↓ 0.0 0

Seq Scan on fnsi_1_2_643_5_1_13_13_99_2_558 cr_disease_outcome (cost=0.00..1.07 rows=7 width=52) (never executed)

41. 0.000 0.000 ↓ 0.0 0

Hash (cost=875.29..875.29 rows=14,929 width=130) (never executed)

42. 0.000 0.000 ↓ 0.0 0

Seq Scan on fnsi_1_2_643_5_1_13_13_11_1005 cr_diagnosis_postmortem (cost=0.00..875.29 rows=14,929 width=130) (never executed)

43. 0.000 0.000 ↓ 0.0 0

Hash (cost=1,910.77..1,910.77 rows=27 width=8) (never executed)

44. 0.000 0.000 ↓ 0.0 0

Nested Loop Left Join (cost=23.82..1,910.77 rows=27 width=8) (never executed)

45. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=23.40..1,898.44 rows=27 width=16) (never executed)

46. 0.000 0.000 ↓ 0.0 0

Index Scan using i4fnsi_1_2_643_5_1_13_13_11_14618oid on fnsi_1_2_643_5_1_13_13_11_1461 mo (cost=0.41..4.43 rows=1 width=4) (never executed)

  • Index Cond: ((oid)::text = ANY ('{1.2.643.5.1.13.13.12.2.25.2293}'::text[]))
47. 0.000 0.000 ↓ 0.0 0

Bitmap Heap Scan on cvdreg cvdreg_1 (cost=22.99..1,882.96 rows=1,105 width=20) (never executed)

  • Recheck Cond: (mo = mo.id)
48. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on i4cvdreg8mo (cost=0.00..22.71 rows=1,105 width=0) (never executed)

  • Index Cond: (mo = mo.id)
49. 0.000 0.000 ↓ 0.0 0

Index Only Scan using i4cvdreg0denorm8id on cvdreg0denorm denorm_2 (cost=0.42..0.46 rows=1 width=8) (never executed)

  • Index Cond: (id = cvdreg_1.id)
  • Heap Fetches: 0
Planning time : 46.245 ms