explain.depesz.com

PostgreSQL's explain analyze made readable

Result: oxlM

Settings
# exclusive inclusive rows x rows loops node
1. 0.003 10,761.379 ↑ 17.0 1 1

Limit (cost=1,225,096.11..1,225,096.15 rows=17 width=571) (actual time=10,761.378..10,761.379 rows=1 loops=1)

2. 0.018 10,761.376 ↑ 17.0 1 1

Sort (cost=1,225,096.11..1,225,096.15 rows=17 width=571) (actual time=10,761.376..10,761.376 rows=1 loops=1)

  • Sort Key: "*SELECT* 1".visit_date DESC
  • Sort Method: quicksort Memory: 25kB
3. 0.004 10,761.358 ↑ 17.0 1 1

Append (cost=1,923.76..1,225,095.76 rows=17 width=571) (actual time=260.406..10,761.358 rows=1 loops=1)

4. 0.002 4,253.598 ↑ 9.0 1 1

Subquery Scan on *SELECT* 1 (cost=1,923.76..9,759.03 rows=9 width=560) (actual time=260.405..4,253.598 rows=1 loops=1)

5. 0.164 4,253.596 ↑ 9.0 1 1

Nested Loop (cost=1,923.76..9,758.94 rows=9 width=564) (actual time=260.404..4,253.596 rows=1 loops=1)

6. 0.007 4,253.421 ↑ 9.0 1 1

Nested Loop (cost=1,923.62..9,750.66 rows=9 width=275) (actual time=260.230..4,253.421 rows=1 loops=1)

7. 0.008 4,253.401 ↑ 9.0 1 1

Nested Loop (cost=1,923.48..9,749.20 rows=9 width=260) (actual time=260.211..4,253.401 rows=1 loops=1)

8. 0.007 4,253.115 ↑ 9.0 1 1

Nested Loop (cost=1,923.20..9,745.09 rows=9 width=229) (actual time=259.925..4,253.115 rows=1 loops=1)

9. 5.457 4,253.081 ↑ 9.0 1 1

Nested Loop (cost=1,922.77..9,688.98 rows=9 width=145) (actual time=259.892..4,253.081 rows=1 loops=1)

10. 5.554 50.943 ↓ 137.4 2,473 1

Hash Right Join (cost=1,922.21..2,739.22 rows=18 width=118) (actual time=46.876..50.943 rows=2,473 loops=1)

  • Hash Cond: ((psr.visit_id)::text = (pr.patient_id)::text)
  • Filter: ((COALESCE(psr.reporting_status, 'O'::character varying))::text = 'O'::text)
  • Rows Removed by Filter: 13
11. 3.274 3.274 ↑ 1.0 13,505 1

Seq Scan on patient_special_reporting psr (cost=0.00..781.56 rows=13,505 width=18) (actual time=0.034..3.274 rows=13,505 loops=1)

  • Filter: (prescription_id IS NULL)
  • Rows Removed by Filter: 3051
12. 1.134 42.115 ↑ 1.4 2,486 1

Hash (cost=1,877.94..1,877.94 rows=3,542 width=116) (actual time=42.115..42.115 rows=2,486 loops=1)

  • Buckets: 4096 Batches: 1 Memory Usage: 404kB
13. 40.981 40.981 ↑ 1.4 2,486 1

Index Scan using patient_registration_status_idx on patient_registration pr (cost=0.43..1,877.94 rows=3,542 width=116) (actual time=0.035..40.981 rows=2,486 loops=1)

  • Index Cond: ((status)::text = 'A'::text)
  • Filter: (center_id = 9)
  • Rows Removed by Filter: 28900
14. 4,104.683 4,196.681 ↓ 0.0 0 2,473

Index Scan using mrd_diagnosis_visit_index on mrd_diagnosis md (cost=0.56..386.06 rows=4 width=43) (actual time=1.697..1.697 rows=0 loops=2,473)

  • Index Cond: ((visit_id)::text = (pr.patient_id)::text)
  • Filter: ((diag_type = 'P'::bpchar) AND (SubPlan 1))
  • Rows Removed by Filter: 4
15.          

SubPlan (for Index Scan)

16. 2.135 91.998 ↓ 0.0 0 2,421

Nested Loop (cost=8.18..29.89 rows=5 width=0) (actual time=0.038..0.038 rows=0 loops=2,421)

  • Join Filter: (sr1.sr_id = cg.codegroup_id)
17. 2.411 89.577 ↓ 0.0 0 2,421

Hash Join (cost=8.04..29.00 rows=5 width=36) (actual time=0.037..0.037 rows=0 loops=2,421)

  • Hash Cond: (((regexp_split_to_table(mcm.codegroup_id, ','::text)))::integer = sr1.sr_id)
18. 9.684 87.156 ↓ 0.0 0 2,421

ProjectSet (cost=6.86..14.89 rows=1,000 width=368) (actual time=0.036..0.036 rows=0 loops=2,421)

19. 9.684 77.472 ↑ 1.0 1 2,421

Bitmap Heap Scan on mrd_codes_master mcm (cost=6.86..9.88 rows=1 width=2) (actual time=0.032..0.032 rows=1 loops=2,421)

  • Recheck Cond: ((((md.code_type)::text = (code_type)::text) AND ((md.icd_code)::text = (code)::text)) OR (((md.code_type)::text = (code_type)::text) AND ((md.changed_icd_code)::text = (code)::text)))
  • Heap Blocks: exact=2421
20. 7.263 67.788 ↓ 0.0 0 2,421

BitmapOr (cost=6.86..6.86 rows=1 width=0) (actual time=0.028..0.028 rows=0 loops=2,421)

21. 45.999 45.999 ↑ 1.0 1 2,421

Bitmap Index Scan on pkey (cost=0.00..3.43 rows=1 width=0) (actual time=0.019..0.019 rows=1 loops=2,421)

  • Index Cond: (((md.code_type)::text = (code_type)::text) AND ((md.icd_code)::text = (code)::text))
22. 14.526 14.526 ↑ 1.0 1 2,421

Bitmap Index Scan on pkey (cost=0.00..3.43 rows=1 width=0) (actual time=0.006..0.006 rows=1 loops=2,421)

  • Index Cond: (((md.code_type)::text = (code_type)::text) AND ((md.changed_icd_code)::text = (code)::text))
23. 0.003 0.010 ↑ 1.0 1 1

Hash (cost=1.16..1.16 rows=1 width=4) (actual time=0.010..0.010 rows=1 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
24. 0.007 0.007 ↑ 1.0 1 1

Seq Scan on special_reporting sr1 (cost=0.00..1.16 rows=1 width=4) (actual time=0.004..0.007 rows=1 loops=1)

  • Filter: ((type)::text = 'R'::text)
  • Rows Removed by Filter: 12
25. 0.286 0.286 ↑ 1.0 1 1

Index Only Scan using codegroup_id_pkey on code_group cg (cost=0.14..0.17 rows=1 width=4) (actual time=0.286..0.286 rows=1 loops=1)

  • Index Cond: (codegroup_id = ((regexp_split_to_table(mcm.codegroup_id, ','::text)))::integer)
  • Heap Fetches: 0
26. 0.027 0.027 ↑ 1.0 1 1

Index Scan using patient_details_pkey on patient_details pd (cost=0.43..6.23 rows=1 width=99) (actual time=0.027..0.027 rows=1 loops=1)

  • Index Cond: ((mr_no)::text = (pr.mr_no)::text)
27. 0.278 0.278 ↑ 1.0 1 1

Index Scan using doctors_pkey on doctors doc (cost=0.28..0.46 rows=1 width=39) (actual time=0.278..0.278 rows=1 loops=1)

  • Index Cond: ((doctor_id)::text = (pr.doctor)::text)
28. 0.013 0.013 ↑ 1.0 1 1

Index Scan using department_pkey on department dept (cost=0.14..0.16 rows=1 width=23) (actual time=0.012..0.013 rows=1 loops=1)

  • Index Cond: ((dept_id)::text = (doc.dept_id)::text)
29. 0.011 0.011 ↑ 1.0 1 1

Index Scan using salutation_master_pkey on salutation_master s (cost=0.14..0.16 rows=1 width=14) (actual time=0.011..0.011 rows=1 loops=1)

  • Index Cond: ((salutation_id)::text = (pd.salutation)::text)
30. 0.001 3,777.003 ↓ 0.0 0 1

Subquery Scan on *SELECT* 2 (cost=2.54..872,513.36 rows=6 width=580) (actual time=3,777.003..3,777.003 rows=0 loops=1)

31. 0.013 3,777.002 ↓ 0.0 0 1

Nested Loop (cost=2.54..872,513.30 rows=6 width=584) (actual time=3,777.002..3,777.002 rows=0 loops=1)

  • Join Filter: ((diag.ddept_id)::text = (dd.ddept_id)::text)
32. 0.013 0.013 ↑ 1.0 12 1

Seq Scan on diagnostics_departments dd (cost=0.00..1.12 rows=12 width=18) (actual time=0.009..0.013 rows=12 loops=1)

33. 0.009 3,776.976 ↓ 0.0 0 12

Materialize (cost=2.54..872,506.53 rows=6 width=329) (actual time=314.748..314.748 rows=0 loops=12)

34. 0.001 3,776.967 ↓ 0.0 0 1

Nested Loop Left Join (cost=2.54..872,506.50 rows=6 width=329) (actual time=3,776.967..3,776.967 rows=0 loops=1)

  • Join Filter: ((tp.prescribed_id = psr_1.prescription_id) AND (((psr_1.visit_id)::text = (pr_1.patient_id)::text) OR ((pr_1.original_visit_id IS NOT NULL) AND ((psr_1.visit_id)::text = (pr_1.original_visit_id)::text))))
  • Filter: ((COALESCE(psr_1.reporting_status, 'O'::character varying))::text = 'O'::text)
35. 0.001 3,776.966 ↓ 0.0 0 1

Nested Loop (cost=2.54..871,655.19 rows=1,260 width=343) (actual time=3,776.966..3,776.966 rows=0 loops=1)

36. 0.001 3,776.965 ↓ 0.0 0 1

Nested Loop (cost=2.27..871,283.44 rows=1,260 width=270) (actual time=3,776.965..3,776.965 rows=0 loops=1)

  • Join Filter: ((doc_1.dept_id)::text = (dept_1.dept_id)::text)
37. 0.001 3,776.964 ↓ 0.0 0 1

Nested Loop (cost=2.27..870,165.97 rows=1,260 width=255) (actual time=3,776.964..3,776.964 rows=0 loops=1)

  • Join Filter: ((pd_1.salutation)::text = (s_1.salutation_id)::text)
38. 0.001 3,776.963 ↓ 0.0 0 1

Nested Loop (cost=2.27..869,784.99 rows=1,260 width=259) (actual time=3,776.963..3,776.963 rows=0 loops=1)

39. 0.000 3,776.962 ↓ 0.0 0 1

Nested Loop (cost=1.84..861,929.01 rows=1,260 width=175) (actual time=3,776.962..3,776.962 rows=0 loops=1)

40. 0.001 3,776.962 ↓ 0.0 0 1

Nested Loop (cost=1.56..861,353.24 rows=1,261 width=144) (actual time=3,776.962..3,776.962 rows=0 loops=1)

  • Join Filter: ((pr_1.patient_id)::text = (md_1.visit_id)::text)
41. 4.006 3,776.961 ↓ 0.0 0 1

Nested Loop (cost=1.00..276,910.53 rows=2,626 width=159) (actual time=3,776.960..3,776.961 rows=0 loops=1)

42. 101.133 101.133 ↑ 1.4 2,486 1

Index Scan using patient_registration_status_idx on patient_registration pr_1 (cost=0.43..1,877.94 rows=3,542 width=132) (actual time=0.052..101.133 rows=2,486 loops=1)

  • Index Cond: ((status)::text = 'A'::text)
  • Filter: (center_id = 9)
  • Rows Removed by Filter: 28900
43. 3,483.361 3,671.822 ↓ 0.0 0 2,486

Index Scan using pat_id_index on tests_prescribed tp (cost=0.56..77.53 rows=12 width=27) (actual time=1.477..1.477 rows=0 loops=2,486)

  • Index Cond: ((pat_id)::text = (pr_1.patient_id)::text)
  • Filter: (((conducted)::text <> 'X'::text) AND (SubPlan 2))
  • Rows Removed by Filter: 6
44.          

SubPlan (for Index Scan)

45. 14.497 188.461 ↓ 0.0 0 14,497

Result (cost=0.28..8.80 rows=100 width=43) (actual time=0.013..0.013 rows=0 loops=14,497)

46. 14.497 173.964 ↓ 0.0 0 14,497

ProjectSet (cost=0.28..6.80 rows=100 width=71) (actual time=0.012..0.012 rows=0 loops=14,497)

47. 159.467 159.467 ↓ 0.0 0 14,497

Index Scan using diagnostics_pkey on diagnostics (cost=0.28..6.29 rows=1 width=71) (actual time=0.011..0.011 rows=0 loops=14,497)

  • Index Cond: ((tp.test_id)::text = (test_id)::text)
  • Filter: (cancer_screening_id IS NOT NULL)
  • Rows Removed by Filter: 1
48. 0.000 0.000 ↓ 0.0 0

Index Scan using mrd_diagnosis_visit_index on mrd_diagnosis md_1 (cost=0.56..222.51 rows=4 width=16) (never executed)

  • Index Cond: ((visit_id)::text = (tp.pat_id)::text)
  • Filter: ((diag_type = 'P'::bpchar) AND (SubPlan 3))
49.          

SubPlan (for Index Scan)

50. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=8.17..44.75 rows=60 width=0) (never executed)

  • Join Filter: (sr1_1.sr_id = cg_1.codegroup_id)
51. 0.000 0.000 ↓ 0.0 0

Hash Join (cost=8.17..29.14 rows=60 width=36) (never executed)

  • Hash Cond: (((regexp_split_to_table(mcm_1.codegroup_id, ','::text)))::integer = sr1_1.sr_id)
52. 0.000 0.000 ↓ 0.0 0

ProjectSet (cost=6.86..14.89 rows=1,000 width=368) (never executed)

53. 0.000 0.000 ↓ 0.0 0

Bitmap Heap Scan on mrd_codes_master mcm_1 (cost=6.86..9.88 rows=1 width=2) (never executed)

  • Recheck Cond: ((((md_1.code_type)::text = (code_type)::text) AND ((md_1.icd_code)::text = (code)::text)) OR (((md_1.code_type)::text = (code_type)::text) AND ((md_1.changed_icd_code)::text = (code)::text)))
54. 0.000 0.000 ↓ 0.0 0

BitmapOr (cost=6.86..6.86 rows=1 width=0) (never executed)

55. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on pkey (cost=0.00..3.43 rows=1 width=0) (never executed)

  • Index Cond: (((md_1.code_type)::text = (code_type)::text) AND ((md_1.icd_code)::text = (code)::text))
56. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on pkey (cost=0.00..3.43 rows=1 width=0) (never executed)

  • Index Cond: (((md_1.code_type)::text = (code_type)::text) AND ((md_1.changed_icd_code)::text = (code)::text))
57. 0.000 0.000 ↓ 0.0 0

Hash (cost=1.16..1.16 rows=12 width=4) (never executed)

58. 0.000 0.000 ↓ 0.0 0

Seq Scan on special_reporting sr1_1 (cost=0.00..1.16 rows=12 width=4) (never executed)

  • Filter: ((type)::text = 'S'::text)
59. 0.000 0.000 ↓ 0.0 0

Materialize (cost=0.00..1.25 rows=17 width=4) (never executed)

60. 0.000 0.000 ↓ 0.0 0

Seq Scan on code_group cg_1 (cost=0.00..1.17 rows=17 width=4) (never executed)

61. 0.000 0.000 ↓ 0.0 0

Index Scan using doctors_pkey on doctors doc_1 (cost=0.28..0.46 rows=1 width=39) (never executed)

  • Index Cond: ((doctor_id)::text = (pr_1.doctor)::text)
62. 0.000 0.000 ↓ 0.0 0

Index Scan using patient_details_pkey on patient_details pd_1 (cost=0.43..6.23 rows=1 width=99) (never executed)

  • Index Cond: ((mr_no)::text = (pr_1.mr_no)::text)
63. 0.000 0.000 ↓ 0.0 0

Materialize (cost=0.00..1.31 rows=21 width=14) (never executed)

64. 0.000 0.000 ↓ 0.0 0

Seq Scan on salutation_master s_1 (cost=0.00..1.21 rows=21 width=14) (never executed)

65. 0.000 0.000 ↓ 0.0 0

Materialize (cost=0.00..1.90 rows=60 width=23) (never executed)

66. 0.000 0.000 ↓ 0.0 0

Seq Scan on department dept_1 (cost=0.00..1.60 rows=60 width=23) (never executed)

67. 0.000 0.000 ↓ 0.0 0

Index Scan using diagnostics_pkey on diagnostics diag (cost=0.28..0.30 rows=1 width=81) (never executed)

  • Index Cond: ((test_id)::text = (tp.test_id)::text)
68. 0.000 0.000 ↓ 0.0 0

Materialize (cost=0.00..822.96 rows=1 width=26) (never executed)

69. 0.000 0.000 ↓ 0.0 0

Seq Scan on patient_special_reporting psr_1 (cost=0.00..822.95 rows=1 width=26) (never executed)

  • Filter: ((presc_type)::text = 'D'::text)
70. 0.002 2,730.753 ↓ 0.0 0 1

Subquery Scan on *SELECT* 3 (cost=1,032.32..342,823.37 rows=2 width=598) (actual time=2,730.753..2,730.753 rows=0 loops=1)

71. 0.002 2,730.751 ↓ 0.0 0 1

Hash Left Join (cost=1,032.32..342,823.35 rows=2 width=602) (actual time=2,730.751..2,730.751 rows=0 loops=1)

  • Hash Cond: (sp.prescription_id = psr_2.prescription_id)
  • Join Filter: (((psr_2.visit_id)::text = (pr_2.patient_id)::text) OR ((pr_2.original_visit_id IS NOT NULL) AND ((psr_2.visit_id)::text = (pr_2.original_visit_id)::text)))
  • Filter: ((COALESCE(psr_2.reporting_status, 'O'::character varying))::text = 'O'::text)
72. 0.001 2,730.749 ↓ 0.0 0 1

Nested Loop (cost=2.42..341,781.64 rows=456 width=327) (actual time=2,730.749..2,730.749 rows=0 loops=1)

73. 0.001 2,730.748 ↓ 0.0 0 1

Nested Loop (cost=2.14..341,644.76 rows=456 width=271) (actual time=2,730.748..2,730.748 rows=0 loops=1)

  • Join Filter: ((doc_2.dept_id)::text = (dept_2.dept_id)::text)
74. 0.001 2,730.747 ↓ 0.0 0 1

Nested Loop (cost=2.14..341,239.58 rows=456 width=256) (actual time=2,730.747..2,730.747 rows=0 loops=1)

  • Join Filter: ((pd_2.salutation)::text = (s_2.salutation_id)::text)
75. 0.001 2,730.746 ↓ 0.0 0 1

Nested Loop (cost=2.14..341,100.97 rows=456 width=260) (actual time=2,730.746..2,730.746 rows=0 loops=1)

76. 0.001 2,730.745 ↓ 0.0 0 1

Nested Loop (cost=1.71..338,257.86 rows=456 width=176) (actual time=2,730.745..2,730.745 rows=0 loops=1)

77. 0.130 2,730.744 ↓ 0.0 0 1

Nested Loop (cost=1.43..338,049.13 rows=457 width=145) (actual time=2,730.744..2,730.744 rows=0 loops=1)

  • Join Filter: ((pr_2.patient_id)::text = (md_2.visit_id)::text)
78. 3.993 2,726.934 ↑ 20.7 46 1

Nested Loop (cost=0.87..127,423.38 rows=951 width=161) (actual time=367.270..2,726.934 rows=46 loops=1)

79. 90.267 90.267 ↑ 1.4 2,486 1

Index Scan using patient_registration_status_idx on patient_registration pr_2 (cost=0.43..1,877.94 rows=3,542 width=132) (actual time=0.048..90.267 rows=2,486 loops=1)

  • Index Cond: ((status)::text = 'A'::text)
  • Filter: (center_id = 9)
  • Rows Removed by Filter: 28900
80. 2,551.542 2,632.674 ↓ 0.0 0 2,486

Index Scan using services_prescribed_patient_id_idx on services_prescribed sp (cost=0.43..35.39 rows=5 width=29) (actual time=1.046..1.059 rows=0 loops=2,486)

  • Index Cond: ((patient_id)::text = (pr_2.patient_id)::text)
  • Filter: (((conducted)::text <> 'X'::text) AND (SubPlan 4))
  • Rows Removed by Filter: 3
81.          

SubPlan (for Index Scan)

82. 0.000 81.132 ↓ 0.0 0 6,761

Result (cost=0.28..8.81 rows=100 width=4) (actual time=0.012..0.012 rows=0 loops=6,761)

83. 6.761 81.132 ↓ 0.0 0 6,761

ProjectSet (cost=0.28..6.81 rows=100 width=32) (actual time=0.012..0.012 rows=0 loops=6,761)

84. 74.371 74.371 ↓ 0.0 0 6,761

Index Scan using services_pkey on services serv (cost=0.28..6.30 rows=1 width=2) (actual time=0.011..0.011 rows=0 loops=6,761)

  • Index Cond: ((sp.service_id)::text = (service_id)::text)
  • Filter: (cancer_screening_id IS NOT NULL)
  • Rows Removed by Filter: 1
85. 1.840 3.680 ↓ 0.0 0 46

Index Scan using mrd_diagnosis_visit_index on mrd_diagnosis md_2 (cost=0.56..221.43 rows=4 width=16) (actual time=0.080..0.080 rows=0 loops=46)

  • Index Cond: ((visit_id)::text = (sp.patient_id)::text)
  • Filter: ((diag_type = 'P'::bpchar) AND (SubPlan 5))
  • Rows Removed by Filter: 4
86.          

SubPlan (for Index Scan)

87. 0.092 1.840 ↓ 0.0 0 46

Nested Loop (cost=8.17..44.75 rows=60 width=0) (actual time=0.040..0.040 rows=0 loops=46)

  • Join Filter: (sr1_2.sr_id = cg_2.codegroup_id)
88. 0.107 1.748 ↓ 0.0 0 46

Hash Join (cost=8.17..29.14 rows=60 width=36) (actual time=0.038..0.038 rows=0 loops=46)

  • Hash Cond: (((regexp_split_to_table(mcm_2.codegroup_id, ','::text)))::integer = sr1_2.sr_id)
89. 0.276 1.610 ↓ 0.0 0 46

ProjectSet (cost=6.86..14.89 rows=1,000 width=368) (actual time=0.035..0.035 rows=0 loops=46)

90. 0.230 1.334 ↑ 1.0 1 46

Bitmap Heap Scan on mrd_codes_master mcm_2 (cost=6.86..9.88 rows=1 width=2) (actual time=0.029..0.029 rows=1 loops=46)

  • Recheck Cond: ((((md_2.code_type)::text = (code_type)::text) AND ((md_2.icd_code)::text = (code)::text)) OR (((md_2.code_type)::text = (code_type)::text) AND ((md_2.changed_icd_code)::text = (code)::text)))
  • Heap Blocks: exact=46
91. 0.184 1.104 ↓ 0.0 0 46

BitmapOr (cost=6.86..6.86 rows=1 width=0) (actual time=0.024..0.024 rows=0 loops=46)

92. 0.920 0.920 ↑ 1.0 1 46

Bitmap Index Scan on pkey (cost=0.00..3.43 rows=1 width=0) (actual time=0.020..0.020 rows=1 loops=46)

  • Index Cond: (((md_2.code_type)::text = (code_type)::text) AND ((md_2.icd_code)::text = (code)::text))
93. 0.000 0.000 ↓ 0.0 0 46

Bitmap Index Scan on pkey (cost=0.00..3.43 rows=1 width=0) (actual time=0.000..0.000 rows=0 loops=46)

  • Index Cond: (((md_2.code_type)::text = (code_type)::text) AND ((md_2.changed_icd_code)::text = (code)::text))
94. 0.012 0.031 ↑ 1.0 12 1

Hash (cost=1.16..1.16 rows=12 width=4) (actual time=0.031..0.031 rows=12 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
95. 0.019 0.019 ↑ 1.0 12 1

Seq Scan on special_reporting sr1_2 (cost=0.00..1.16 rows=12 width=4) (actual time=0.013..0.019 rows=12 loops=1)

  • Filter: ((type)::text = 'S'::text)
  • Rows Removed by Filter: 1
96. 0.000 0.000 ↓ 0.0 0

Materialize (cost=0.00..1.25 rows=17 width=4) (never executed)

97. 0.000 0.000 ↓ 0.0 0

Seq Scan on code_group cg_2 (cost=0.00..1.17 rows=17 width=4) (never executed)

98. 0.000 0.000 ↓ 0.0 0

Index Scan using doctors_pkey on doctors doc_2 (cost=0.28..0.46 rows=1 width=39) (never executed)

  • Index Cond: ((doctor_id)::text = (pr_2.doctor)::text)
99. 0.000 0.000 ↓ 0.0 0

Index Scan using patient_details_pkey on patient_details pd_2 (cost=0.43..6.23 rows=1 width=99) (never executed)

  • Index Cond: ((mr_no)::text = (pr_2.mr_no)::text)
100. 0.000 0.000 ↓ 0.0 0

Materialize (cost=0.00..1.31 rows=21 width=14) (never executed)

101. 0.000 0.000 ↓ 0.0 0

Seq Scan on salutation_master s_2 (cost=0.00..1.21 rows=21 width=14) (never executed)

102. 0.000 0.000 ↓ 0.0 0

Materialize (cost=0.00..1.90 rows=60 width=23) (never executed)

103. 0.000 0.000 ↓ 0.0 0

Seq Scan on department dept_2 (cost=0.00..1.60 rows=60 width=23) (never executed)

104. 0.000 0.000 ↓ 0.0 0

Index Scan using services_pkey on services ser (cost=0.28..0.30 rows=1 width=65) (never executed)

  • Index Cond: ((service_id)::text = (sp.service_id)::text)
105. 0.000 0.000 ↓ 0.0 0

Hash (cost=822.95..822.95 rows=16,556 width=26) (never executed)

106. 0.000 0.000 ↓ 0.0 0

Seq Scan on patient_special_reporting psr_2 (cost=0.00..822.95 rows=16,556 width=26) (never executed)

  • Filter: ((presc_type)::text = 'S'::text)
Planning time : 15.091 ms
Execution time : 10,762.249 ms