explain.depesz.com

PostgreSQL's explain analyze made readable

Result: k8Ca

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 0.000 ↓ 0.0

Limit (cost=0.25..239,718.03 rows=30 width=832) (actual rows= loops=)

2. 0.000 0.000 ↓ 0.0

Function Scan on search_accessions __local_0__ (cost=0.25..7,990,592.79 rows=1,000 width=832) (actual rows= loops=)

3.          

SubPlan (for Function Scan)

4. 0.000 0.000 ↓ 0.0

Result (cost=13.67..13.68 rows=1 width=32) (actual rows= loops=)

5.          

Initplan (for Result)

6. 0.000 0.000 ↓ 0.0

Aggregate (cost=13.66..13.67 rows=1 width=32) (actual rows= loops=)

7. 0.000 0.000 ↓ 0.0

Sort (cost=13.63..13.64 rows=1 width=245) (actual rows= loops=)

  • Sort Key: __local_2__.id
8. 0.000 0.000 ↓ 0.0

Seq Scan on accessions __local_2__ (cost=0.00..13.62 rows=1 width=245) (actual rows= loops=)

  • Filter: (cloned_from_id = __local_0__.id)
9. 0.000 0.000 ↓ 0.0

Index Scan using orgs_pkey on orgs __local_3__ (cost=0.15..8.17 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (id = __local_0__.org_id)
10. 0.000 0.000 ↓ 0.0

Result (cost=96.81..96.82 rows=1 width=32) (actual rows= loops=)

11.          

Initplan (for Result)

12. 0.000 0.000 ↓ 0.0

Aggregate (cost=96.80..96.81 rows=1 width=32) (actual rows= loops=)

13. 0.000 0.000 ↓ 0.0

Sort (cost=14.95..14.98 rows=10 width=12) (actual rows= loops=)

  • Sort Key: __local_5__.id
14. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on accession_orgs __local_5__ (cost=4.23..14.79 rows=10 width=12) (actual rows= loops=)

  • Recheck Cond: (accession_id = __local_0__.id)
15. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on accession_orgs_accession_id_idx (cost=0.00..4.23 rows=10 width=0) (actual rows= loops=)

  • Index Cond: (accession_id = __local_0__.id)
16.          

SubPlan (for Aggregate)

17. 0.000 0.000 ↓ 0.0

Index Scan using orgs_pkey on orgs __local_6__ (cost=0.15..8.17 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (id = __local_5__.org_id)
18. 0.000 0.000 ↓ 0.0

Result (cost=74.92..74.93 rows=1 width=32) (actual rows= loops=)

19.          

Initplan (for Result)

20. 0.000 0.000 ↓ 0.0

Aggregate (cost=74.91..74.92 rows=1 width=32) (actual rows= loops=)

21. 0.000 0.000 ↓ 0.0

Sort (cost=9.51..9.52 rows=2 width=176) (actual rows= loops=)

  • Sort Key: __local_8__.id
22. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on samples __local_8__ (cost=4.16..9.50 rows=2 width=176) (actual rows= loops=)

  • Recheck Cond: (accession_id = __local_0__.id)
23. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on samples_accession_id_idx (cost=0.00..4.16 rows=2 width=0) (actual rows= loops=)

  • Index Cond: (accession_id = __local_0__.id)
24.          

SubPlan (for Aggregate)

25. 0.000 0.000 ↓ 0.0

Index Scan using tube_types_pkey on tube_types __local_9__ (cost=0.15..8.17 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (value = __local_8__.type_id)
26. 0.000 0.000 ↓ 0.0

Index Scan using tubes_pkey on tubes __local_10__ (cost=0.15..16.34 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (id = __local_8__.tube_id)
27.          

SubPlan (for Index Scan)

28. 0.000 0.000 ↓ 0.0

Index Scan using specimen_types_pkey on specimen_types __local_11__ (cost=0.15..8.17 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (value = __local_10__.specimen_type_id)
29. 0.000 0.000 ↓ 0.0

Index Scan using transfusion_pkey on transfusion __local_12__ (cost=0.15..8.17 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (value = __local_8__.transfusion_id)
30. 0.000 0.000 ↓ 0.0

Index Scan using users_pkey on users __local_13__ (cost=0.15..16.34 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (id = __local_0__.created_by_id)
31.          

SubPlan (for Index Scan)

32. 0.000 0.000 ↓ 0.0

Index Scan using orgs_pkey on orgs __local_14__ (cost=0.15..8.17 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (id = __local_13__.org_id)
33. 0.000 0.000 ↓ 0.0

Index Scan using users_pkey on users __local_15__ (cost=0.15..16.34 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (id = __local_0__.received_by_id)
34.          

SubPlan (for Index Scan)

35. 0.000 0.000 ↓ 0.0

Index Scan using orgs_pkey on orgs __local_16__ (cost=0.15..8.17 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (id = __local_15__.org_id)
36. 0.000 0.000 ↓ 0.0

Index Scan using panels_pkey on panels __local_17__ (cost=0.15..571.69 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (id = __local_0__.panel_id)
37.          

SubPlan (for Index Scan)

38. 0.000 0.000 ↓ 0.0

Result (cost=563.51..563.52 rows=1 width=32) (actual rows= loops=)

39.          

Initplan (for Result)

40. 0.000 0.000 ↓ 0.0

Aggregate (cost=563.50..563.51 rows=1 width=32) (actual rows= loops=)

41. 0.000 0.000 ↓ 0.0

Sort (cost=1.85..1.88 rows=11 width=12) (actual rows= loops=)

  • Sort Key: __local_26__.id
42. 0.000 0.000 ↓ 0.0

Seq Scan on panels_tests __local_26__ (cost=0.00..1.66 rows=11 width=12) (actual rows= loops=)

  • Filter: (panel_id = __local_17__.id)
43.          

SubPlan (for Aggregate)

44. 0.000 0.000 ↓ 0.0

Index Scan using tests_pkey on tests __local_19__ (cost=0.14..51.04 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (id = __local_26__.test_id)
45.          

SubPlan (for Index Scan)

46. 0.000 0.000 ↓ 0.0

Index Scan using labs_pkey on labs __local_20__ (cost=0.14..8.16 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (id = __local_19__.reference_lab_id)
47. 0.000 0.000 ↓ 0.0

Result (cost=8.21..8.21 rows=1 width=32) (actual rows= loops=)

48.          

Initplan (for Result)

49. 0.000 0.000 ↓ 0.0

Aggregate (cost=8.20..8.21 rows=1 width=32) (actual rows= loops=)

50. 0.000 0.000 ↓ 0.0

Sort (cost=8.17..8.18 rows=1 width=314) (actual rows= loops=)

  • Sort Key: __local_22__.id
51. 0.000 0.000 ↓ 0.0

Index Scan using tests_parent_id_idx on tests __local_22__ (cost=0.14..8.16 rows=1 width=314) (actual rows= loops=)

  • Index Cond: (parent_id = __local_19__.id)
52. 0.000 0.000 ↓ 0.0

Result (cost=26.49..26.50 rows=1 width=32) (actual rows= loops=)

53.          

Initplan (for Result)

54. 0.000 0.000 ↓ 0.0

Aggregate (cost=26.48..26.49 rows=1 width=32) (actual rows= loops=)

55. 0.000 0.000 ↓ 0.0

Sort (cost=1.91..1.92 rows=3 width=11) (actual rows= loops=)

  • Sort Key: __local_25__.id
56. 0.000 0.000 ↓ 0.0

Seq Scan on tests_test_results __local_25__ (cost=0.00..1.89 rows=3 width=11) (actual rows= loops=)

  • Filter: (test_id = __local_19__.id)
57.          

SubPlan (for Aggregate)

58. 0.000 0.000 ↓ 0.0

Index Scan using test_results_pkey on test_results __local_24__ (cost=0.15..8.17 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (value = __local_25__.result)
59. 0.000 0.000 ↓ 0.0

Result (cost=6,921.52..6,921.53 rows=1 width=32) (actual rows= loops=)

60.          

Initplan (for Result)

61. 0.000 0.000 ↓ 0.0

Aggregate (cost=6,921.51..6,921.52 rows=1 width=32) (actual rows= loops=)

62. 0.000 0.000 ↓ 0.0

Sort (cost=28.15..28.16 rows=3 width=125) (actual rows= loops=)

  • Sort Key: ((SubPlan 264)), __local_28__.id
63. 0.000 0.000 ↓ 0.0

Seq Scan on test_orders __local_28__ (cost=0.00..28.12 rows=3 width=125) (actual rows= loops=)

  • Filter: (accession_id = __local_0__.id)
64.          

SubPlan (for Seq Scan)

65. 0.000 0.000 ↓ 0.0

Index Scan using tests_pkey on tests (cost=0.14..8.16 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (id = __local_28__.test_id)
66.          

SubPlan (for Aggregate)

67. 0.000 0.000 ↓ 0.0

Index Scan using test_results_pkey on test_results __local_29__ (cost=0.15..8.17 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (value = __local_28__.initial_result_value)
68. 0.000 0.000 ↓ 0.0

Index Scan using test_results_pkey on test_results __local_30__ (cost=0.15..8.17 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (value = __local_28__.final_result_value)
69. 0.000 0.000 ↓ 0.0

Index Scan using users_pkey on users __local_31__ (cost=0.15..16.34 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (id = __local_28__.entered_by_id)
70.          

SubPlan (for Index Scan)

71. 0.000 0.000 ↓ 0.0

Index Scan using orgs_pkey on orgs __local_32__ (cost=0.15..8.17 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (id = __local_31__.org_id)
72. 0.000 0.000 ↓ 0.0

Index Scan using users_pkey on users __local_33__ (cost=0.15..16.34 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (id = __local_28__.validated_by_id)
73.          

SubPlan (for Index Scan)

74. 0.000 0.000 ↓ 0.0

Index Scan using orgs_pkey on orgs __local_34__ (cost=0.15..8.17 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (id = __local_33__.org_id)
75. 0.000 0.000 ↓ 0.0

Index Scan using tests_pkey on tests __local_35__ (cost=0.14..51.04 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (id = __local_28__.test_id)
76.          

SubPlan (for Index Scan)

77. 0.000 0.000 ↓ 0.0

Index Scan using labs_pkey on labs __local_36__ (cost=0.14..8.16 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (id = __local_35__.reference_lab_id)
78. 0.000 0.000 ↓ 0.0

Result (cost=8.21..8.21 rows=1 width=32) (actual rows= loops=)

79.          

Initplan (for Result)

80. 0.000 0.000 ↓ 0.0

Aggregate (cost=8.20..8.21 rows=1 width=32) (actual rows= loops=)

81. 0.000 0.000 ↓ 0.0

Sort (cost=8.17..8.18 rows=1 width=314) (actual rows= loops=)

  • Sort Key: __local_38__.id
82. 0.000 0.000 ↓ 0.0

Index Scan using tests_parent_id_idx on tests __local_38__ (cost=0.14..8.16 rows=1 width=314) (actual rows= loops=)

  • Index Cond: (parent_id = __local_35__.id)
83. 0.000 0.000 ↓ 0.0

Result (cost=26.49..26.50 rows=1 width=32) (actual rows= loops=)

84.          

Initplan (for Result)

85. 0.000 0.000 ↓ 0.0

Aggregate (cost=26.48..26.49 rows=1 width=32) (actual rows= loops=)

86. 0.000 0.000 ↓ 0.0

Sort (cost=1.91..1.92 rows=3 width=11) (actual rows= loops=)

  • Sort Key: __local_41__.id
87. 0.000 0.000 ↓ 0.0

Seq Scan on tests_test_results __local_41__ (cost=0.00..1.89 rows=3 width=11) (actual rows= loops=)

  • Filter: (test_id = __local_35__.id)
88.          

SubPlan (for Aggregate)

89. 0.000 0.000 ↓ 0.0

Index Scan using test_results_pkey on test_results __local_40__ (cost=0.15..8.17 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (value = __local_41__.result)
90. 0.000 0.000 ↓ 0.0

Index Scan using samples_pkey on samples __local_42__ (cost=0.15..40.85 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (id = __local_28__.sample_id)
91.          

SubPlan (for Index Scan)

92. 0.000 0.000 ↓ 0.0

Index Scan using tube_types_pkey on tube_types __local_43__ (cost=0.15..8.17 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (value = __local_42__.type_id)
93. 0.000 0.000 ↓ 0.0

Index Scan using tubes_pkey on tubes __local_44__ (cost=0.15..16.34 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (id = __local_42__.tube_id)
94.          

SubPlan (for Index Scan)

95. 0.000 0.000 ↓ 0.0

Index Scan using specimen_types_pkey on specimen_types __local_45__ (cost=0.15..8.17 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (value = __local_44__.specimen_type_id)
96. 0.000 0.000 ↓ 0.0

Index Scan using transfusion_pkey on transfusion __local_46__ (cost=0.15..8.17 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (value = __local_42__.transfusion_id)
97. 0.000 0.000 ↓ 0.0

Result (cost=430.78..430.79 rows=1 width=32) (actual rows= loops=)

98.          

Initplan (for Result)

99. 0.000 0.000 ↓ 0.0

Aggregate (cost=430.77..430.78 rows=1 width=32) (actual rows= loops=)

100. 0.000 0.000 ↓ 0.0

Sort (cost=3.98..3.99 rows=1 width=91) (actual rows= loops=)

  • Sort Key: __local_48__.id
101. 0.000 0.000 ↓ 0.0

Seq Scan on test_order_results __local_48__ (cost=0.00..3.98 rows=1 width=91) (actual rows= loops=)

  • Filter: ((NOT is_reflex) AND (test_order_id = __local_28__.id))
102.          

SubPlan (for Aggregate)

103. 0.000 0.000 ↓ 0.0

Index Scan using test_result_sets_pkey on test_result_sets __local_49__ (cost=0.15..59.21 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (id = __local_48__.test_result_set_id)
104.          

SubPlan (for Index Scan)

105. 0.000 0.000 ↓ 0.0

Index Scan using tests_pkey on tests __local_50__ (cost=0.14..51.04 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (id = __local_49__.test_id)
106.          

SubPlan (for Index Scan)

107. 0.000 0.000 ↓ 0.0

Index Scan using labs_pkey on labs __local_51__ (cost=0.14..8.16 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (id = __local_50__.reference_lab_id)
108. 0.000 0.000 ↓ 0.0

Result (cost=8.21..8.21 rows=1 width=32) (actual rows= loops=)

109.          

Initplan (for Result)

110. 0.000 0.000 ↓ 0.0

Aggregate (cost=8.20..8.21 rows=1 width=32) (actual rows= loops=)

111. 0.000 0.000 ↓ 0.0

Sort (cost=8.17..8.18 rows=1 width=314) (actual rows= loops=)

  • Sort Key: __local_53__.id
112. 0.000 0.000 ↓ 0.0

Index Scan using tests_parent_id_idx on tests __local_53__ (cost=0.14..8.16 rows=1 width=314) (actual rows= loops=)

  • Index Cond: (parent_id = __local_50__.id)
113. 0.000 0.000 ↓ 0.0

Result (cost=26.49..26.50 rows=1 width=32) (actual rows= loops=)

114.          

Initplan (for Result)

115. 0.000 0.000 ↓ 0.0

Aggregate (cost=26.48..26.49 rows=1 width=32) (actual rows= loops=)

116. 0.000 0.000 ↓ 0.0

Sort (cost=1.91..1.92 rows=3 width=11) (actual rows= loops=)

  • Sort Key: __local_56__.id
117. 0.000 0.000 ↓ 0.0

Seq Scan on tests_test_results __local_56__ (cost=0.00..1.89 rows=3 width=11) (actual rows= loops=)

  • Filter: (test_id = __local_50__.id)
118.          

SubPlan (for Aggregate)

119. 0.000 0.000 ↓ 0.0

Index Scan using test_results_pkey on test_results __local_55__ (cost=0.15..8.17 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (value = __local_56__.result)
120. 0.000 0.000 ↓ 0.0

Index Scan using test_results_pkey on test_results __local_57__ (cost=0.15..8.17 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (value = __local_48__.result_1_id)
121. 0.000 0.000 ↓ 0.0

Index Scan using users_pkey on users __local_58__ (cost=0.15..8.17 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (id = __local_48__.result_1_by_id)
122. 0.000 0.000 ↓ 0.0

Index Scan using test_results_pkey on test_results __local_59__ (cost=0.15..8.17 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (value = __local_48__.result_2_id)
123. 0.000 0.000 ↓ 0.0

Index Scan using users_pkey on users __local_60__ (cost=0.15..8.17 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (id = __local_48__.result_2_by_id)
124. 0.000 0.000 ↓ 0.0

Index Scan using test_results_pkey on test_results __local_61__ (cost=0.15..8.17 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (value = __local_48__.result_final_id)
125. 0.000 0.000 ↓ 0.0

Index Scan using samples_pkey on samples __local_62__ (cost=0.15..40.85 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (id = __local_48__.sample_id)
126.          

SubPlan (for Index Scan)

127. 0.000 0.000 ↓ 0.0

Index Scan using tube_types_pkey on tube_types __local_63__ (cost=0.15..8.17 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (value = __local_62__.type_id)
128. 0.000 0.000 ↓ 0.0

Index Scan using tubes_pkey on tubes __local_64__ (cost=0.15..16.34 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (id = __local_62__.tube_id)
129.          

SubPlan (for Index Scan)

130. 0.000 0.000 ↓ 0.0

Index Scan using specimen_types_pkey on specimen_types __local_65__ (cost=0.15..8.17 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (value = __local_64__.specimen_type_id)
131. 0.000 0.000 ↓ 0.0

Index Scan using transfusion_pkey on transfusion __local_66__ (cost=0.15..8.17 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (value = __local_62__.transfusion_id)
132. 0.000 0.000 ↓ 0.0

Result (cost=285.85..285.86 rows=1 width=32) (actual rows= loops=)

133.          

Initplan (for Result)

134. 0.000 0.000 ↓ 0.0

Aggregate (cost=285.84..285.85 rows=1 width=32) (actual rows= loops=)

135. 0.000 0.000 ↓ 0.0

Sort (cost=3.98..3.99 rows=2 width=91) (actual rows= loops=)

  • Sort Key: __local_68__.id
136. 0.000 0.000 ↓ 0.0

Seq Scan on test_order_results __local_68__ (cost=0.00..3.98 rows=2 width=91) (actual rows= loops=)

  • Filter: (parent_result_id = __local_48__.id)
137.          

SubPlan (for Aggregate)

138. 0.000 0.000 ↓ 0.0

Index Scan using test_result_sets_pkey on test_result_sets __local_69__ (cost=0.15..59.21 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (id = __local_68__.test_result_set_id)
139.          

SubPlan (for Index Scan)

140. 0.000 0.000 ↓ 0.0

Index Scan using tests_pkey on tests __local_70__ (cost=0.14..51.04 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (id = __local_69__.test_id)
141.          

SubPlan (for Index Scan)

142. 0.000 0.000 ↓ 0.0

Index Scan using labs_pkey on labs __local_71__ (cost=0.14..8.16 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (id = __local_70__.reference_lab_id)
143. 0.000 0.000 ↓ 0.0

Result (cost=8.21..8.21 rows=1 width=32) (actual rows= loops=)

144.          

Initplan (for Result)

145. 0.000 0.000 ↓ 0.0

Aggregate (cost=8.20..8.21 rows=1 width=32) (actual rows= loops=)

146. 0.000 0.000 ↓ 0.0

Sort (cost=8.17..8.18 rows=1 width=314) (actual rows= loops=)

  • Sort Key: __local_73__.id
147. 0.000 0.000 ↓ 0.0

Index Scan using tests_parent_id_idx on tests __local_73__ (cost=0.14..8.16 rows=1 width=314) (actual rows= loops=)

  • Index Cond: (parent_id = __local_70__.id)
148. 0.000 0.000 ↓ 0.0

Result (cost=26.49..26.50 rows=1 width=32) (actual rows= loops=)

149.          

Initplan (for Result)

150. 0.000 0.000 ↓ 0.0

Aggregate (cost=26.48..26.49 rows=1 width=32) (actual rows= loops=)

151. 0.000 0.000 ↓ 0.0

Sort (cost=1.91..1.92 rows=3 width=11) (actual rows= loops=)

  • Sort Key: __local_76__.id
152. 0.000 0.000 ↓ 0.0

Seq Scan on tests_test_results __local_76__ (cost=0.00..1.89 rows=3 width=11) (actual rows= loops=)

  • Filter: (test_id = __local_70__.id)
153.          

SubPlan (for Aggregate)

154. 0.000 0.000 ↓ 0.0

Index Scan using test_results_pkey on test_results __local_75__ (cost=0.15..8.17 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (value = __local_76__.result)
155. 0.000 0.000 ↓ 0.0

Index Scan using test_results_pkey on test_results __local_77__ (cost=0.15..8.17 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (value = __local_68__.result_1_id)
156. 0.000 0.000 ↓ 0.0

Index Scan using users_pkey on users __local_78__ (cost=0.15..8.17 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (id = __local_68__.result_1_by_id)
157. 0.000 0.000 ↓ 0.0

Index Scan using test_results_pkey on test_results __local_79__ (cost=0.15..8.17 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (value = __local_68__.result_2_id)
158. 0.000 0.000 ↓ 0.0

Index Scan using users_pkey on users __local_80__ (cost=0.15..8.17 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (id = __local_68__.result_2_by_id)
159. 0.000 0.000 ↓ 0.0

Index Scan using test_results_pkey on test_results __local_81__ (cost=0.15..8.17 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (value = __local_68__.result_final_id)
160. 0.000 0.000 ↓ 0.0

Index Scan using samples_pkey on samples __local_82__ (cost=0.15..40.85 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (id = __local_68__.sample_id)
161.          

SubPlan (for Index Scan)

162. 0.000 0.000 ↓ 0.0

Index Scan using tube_types_pkey on tube_types __local_83__ (cost=0.15..8.17 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (value = __local_82__.type_id)
163. 0.000 0.000 ↓ 0.0

Index Scan using tubes_pkey on tubes __local_84__ (cost=0.15..16.34 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (id = __local_82__.tube_id)
164.          

SubPlan (for Index Scan)

165. 0.000 0.000 ↓ 0.0

Index Scan using specimen_types_pkey on specimen_types __local_85__ (cost=0.15..8.17 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (value = __local_84__.specimen_type_id)
166. 0.000 0.000 ↓ 0.0

Index Scan using transfusion_pkey on transfusion __local_86__ (cost=0.15..8.17 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (value = __local_82__.transfusion_id)
167. 0.000 0.000 ↓ 0.0

Result (cost=575.37..575.38 rows=1 width=32) (actual rows= loops=)

168.          

Initplan (for Result)

169. 0.000 0.000 ↓ 0.0

Aggregate (cost=575.36..575.37 rows=1 width=32) (actual rows= loops=)

170. 0.000 0.000 ↓ 0.0

Sort (cost=3.65..3.65 rows=1 width=93) (actual rows= loops=)

  • Sort Key: __local_88__.id
171. 0.000 0.000 ↓ 0.0

Seq Scan on test_orders __local_88__ (cost=0.00..3.64 rows=1 width=93) (actual rows= loops=)

  • Filter: (original_order_id = __local_28__.id)
172.          

SubPlan (for Aggregate)

173. 0.000 0.000 ↓ 0.0

Index Scan using test_results_pkey on test_results __local_89__ (cost=0.15..8.17 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (value = __local_88__.initial_result_value)
174. 0.000 0.000 ↓ 0.0

Index Scan using test_results_pkey on test_results __local_90__ (cost=0.15..8.17 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (value = __local_88__.final_result_value)
175. 0.000 0.000 ↓ 0.0

Index Scan using users_pkey on users __local_91__ (cost=0.15..16.34 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (id = __local_88__.entered_by_id)
176.          

SubPlan (for Index Scan)

177. 0.000 0.000 ↓ 0.0

Index Scan using orgs_pkey on orgs __local_92__ (cost=0.15..8.17 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (id = __local_91__.org_id)
178. 0.000 0.000 ↓ 0.0

Index Scan using users_pkey on users __local_93__ (cost=0.15..16.34 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (id = __local_88__.validated_by_id)
179.          

SubPlan (for Index Scan)

180. 0.000 0.000 ↓ 0.0

Index Scan using orgs_pkey on orgs __local_94__ (cost=0.15..8.17 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (id = __local_93__.org_id)
181. 0.000 0.000 ↓ 0.0

Index Scan using tests_pkey on tests __local_95__ (cost=0.14..51.04 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (id = __local_88__.test_id)
182.          

SubPlan (for Index Scan)

183. 0.000 0.000 ↓ 0.0

Index Scan using labs_pkey on labs __local_96__ (cost=0.14..8.16 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (id = __local_95__.reference_lab_id)
184. 0.000 0.000 ↓ 0.0

Result (cost=8.21..8.21 rows=1 width=32) (actual rows= loops=)

185.          

Initplan (for Result)

186. 0.000 0.000 ↓ 0.0

Aggregate (cost=8.20..8.21 rows=1 width=32) (actual rows= loops=)

187. 0.000 0.000 ↓ 0.0

Sort (cost=8.17..8.18 rows=1 width=314) (actual rows= loops=)

  • Sort Key: __local_98__.id
188. 0.000 0.000 ↓ 0.0

Index Scan using tests_parent_id_idx on tests __local_98__ (cost=0.14..8.16 rows=1 width=314) (actual rows= loops=)

  • Index Cond: (parent_id = __local_95__.id)
189. 0.000 0.000 ↓ 0.0

Result (cost=26.49..26.50 rows=1 width=32) (actual rows= loops=)

190.          

Initplan (for Result)

191. 0.000 0.000 ↓ 0.0

Aggregate (cost=26.48..26.49 rows=1 width=32) (actual rows= loops=)

192. 0.000 0.000 ↓ 0.0

Sort (cost=1.91..1.92 rows=3 width=11) (actual rows= loops=)

  • Sort Key: __local_101__.id
193. 0.000 0.000 ↓ 0.0

Seq Scan on tests_test_results __local_101__ (cost=0.00..1.89 rows=3 width=11) (actual rows= loops=)

  • Filter: (test_id = __local_95__.id)
194.          

SubPlan (for Aggregate)

195. 0.000 0.000 ↓ 0.0

Index Scan using test_results_pkey on test_results __local_100__ (cost=0.15..8.17 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (value = __local_101__.result)
196. 0.000 0.000 ↓ 0.0

Index Scan using samples_pkey on samples __local_102__ (cost=0.15..40.85 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (id = __local_88__.sample_id)
197.          

SubPlan (for Index Scan)

198. 0.000 0.000 ↓ 0.0

Index Scan using tube_types_pkey on tube_types __local_103__ (cost=0.15..8.17 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (value = __local_102__.type_id)
199. 0.000 0.000 ↓ 0.0

Index Scan using tubes_pkey on tubes __local_104__ (cost=0.15..16.34 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (id = __local_102__.tube_id)
200.          

SubPlan (for Index Scan)

201. 0.000 0.000 ↓ 0.0

Index Scan using specimen_types_pkey on specimen_types __local_105__ (cost=0.15..8.17 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (value = __local_104__.specimen_type_id)
202. 0.000 0.000 ↓ 0.0

Index Scan using transfusion_pkey on transfusion __local_106__ (cost=0.15..8.17 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (value = __local_102__.transfusion_id)
203. 0.000 0.000 ↓ 0.0

Result (cost=430.78..430.79 rows=1 width=32) (actual rows= loops=)

204.          

Initplan (for Result)

205. 0.000 0.000 ↓ 0.0

Aggregate (cost=430.77..430.78 rows=1 width=32) (actual rows= loops=)

206. 0.000 0.000 ↓ 0.0

Sort (cost=3.98..3.99 rows=1 width=91) (actual rows= loops=)

  • Sort Key: __local_108__.id
207. 0.000 0.000 ↓ 0.0

Seq Scan on test_order_results __local_108__ (cost=0.00..3.98 rows=1 width=91) (actual rows= loops=)

  • Filter: ((NOT is_reflex) AND (test_order_id = __local_88__.id))
208.          

SubPlan (for Aggregate)

209. 0.000 0.000 ↓ 0.0

Index Scan using test_result_sets_pkey on test_result_sets __local_109__ (cost=0.15..59.21 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (id = __local_108__.test_result_set_id)
210.          

SubPlan (for Index Scan)

211. 0.000 0.000 ↓ 0.0

Index Scan using tests_pkey on tests __local_110__ (cost=0.14..51.04 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (id = __local_109__.test_id)
212.          

SubPlan (for Index Scan)

213. 0.000 0.000 ↓ 0.0

Index Scan using labs_pkey on labs __local_111__ (cost=0.14..8.16 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (id = __local_110__.reference_lab_id)
214. 0.000 0.000 ↓ 0.0

Result (cost=8.21..8.21 rows=1 width=32) (actual rows= loops=)

215.          

Initplan (for Result)

216. 0.000 0.000 ↓ 0.0

Aggregate (cost=8.20..8.21 rows=1 width=32) (actual rows= loops=)

217. 0.000 0.000 ↓ 0.0

Sort (cost=8.17..8.18 rows=1 width=314) (actual rows= loops=)

  • Sort Key: __local_113__.id
218. 0.000 0.000 ↓ 0.0

Index Scan using tests_parent_id_idx on tests __local_113__ (cost=0.14..8.16 rows=1 width=314) (actual rows= loops=)

  • Index Cond: (parent_id = __local_110__.id)
219. 0.000 0.000 ↓ 0.0

Result (cost=26.49..26.50 rows=1 width=32) (actual rows= loops=)

220.          

Initplan (for Result)

221. 0.000 0.000 ↓ 0.0

Aggregate (cost=26.48..26.49 rows=1 width=32) (actual rows= loops=)

222. 0.000 0.000 ↓ 0.0

Sort (cost=1.91..1.92 rows=3 width=11) (actual rows= loops=)

  • Sort Key: __local_116__.id
223. 0.000 0.000 ↓ 0.0

Seq Scan on tests_test_results __local_116__ (cost=0.00..1.89 rows=3 width=11) (actual rows= loops=)

  • Filter: (test_id = __local_110__.id)
224.          

SubPlan (for Aggregate)

225. 0.000 0.000 ↓ 0.0

Index Scan using test_results_pkey on test_results __local_115__ (cost=0.15..8.17 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (value = __local_116__.result)
226. 0.000 0.000 ↓ 0.0

Index Scan using test_results_pkey on test_results __local_117__ (cost=0.15..8.17 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (value = __local_108__.result_1_id)
227. 0.000 0.000 ↓ 0.0

Index Scan using users_pkey on users __local_118__ (cost=0.15..8.17 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (id = __local_108__.result_1_by_id)
228. 0.000 0.000 ↓ 0.0

Index Scan using test_results_pkey on test_results __local_119__ (cost=0.15..8.17 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (value = __local_108__.result_2_id)
229. 0.000 0.000 ↓ 0.0

Index Scan using users_pkey on users __local_120__ (cost=0.15..8.17 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (id = __local_108__.result_2_by_id)
230. 0.000 0.000 ↓ 0.0

Index Scan using test_results_pkey on test_results __local_121__ (cost=0.15..8.17 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (value = __local_108__.result_final_id)
231. 0.000 0.000 ↓ 0.0

Index Scan using samples_pkey on samples __local_122__ (cost=0.15..40.85 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (id = __local_108__.sample_id)
232.          

SubPlan (for Index Scan)

233. 0.000 0.000 ↓ 0.0

Index Scan using tube_types_pkey on tube_types __local_123__ (cost=0.15..8.17 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (value = __local_122__.type_id)
234. 0.000 0.000 ↓ 0.0

Index Scan using tubes_pkey on tubes __local_124__ (cost=0.15..16.34 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (id = __local_122__.tube_id)
235.          

SubPlan (for Index Scan)

236. 0.000 0.000 ↓ 0.0

Index Scan using specimen_types_pkey on specimen_types __local_125__ (cost=0.15..8.17 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (value = __local_124__.specimen_type_id)
237. 0.000 0.000 ↓ 0.0

Index Scan using transfusion_pkey on transfusion __local_126__ (cost=0.15..8.17 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (value = __local_122__.transfusion_id)
238. 0.000 0.000 ↓ 0.0

Result (cost=285.85..285.86 rows=1 width=32) (actual rows= loops=)

239.          

Initplan (for Result)

240. 0.000 0.000 ↓ 0.0

Aggregate (cost=285.84..285.85 rows=1 width=32) (actual rows= loops=)

241. 0.000 0.000 ↓ 0.0

Sort (cost=3.98..3.99 rows=2 width=91) (actual rows= loops=)

  • Sort Key: __local_128__.id
242. 0.000 0.000 ↓ 0.0

Seq Scan on test_order_results __local_128__ (cost=0.00..3.98 rows=2 width=91) (actual rows= loops=)

  • Filter: (parent_result_id = __local_108__.id)
243.          

SubPlan (for Aggregate)

244. 0.000 0.000 ↓ 0.0

Index Scan using test_result_sets_pkey on test_result_sets __local_129__ (cost=0.15..59.21 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (id = __local_128__.test_result_set_id)
245.          

SubPlan (for Index Scan)

246. 0.000 0.000 ↓ 0.0

Index Scan using tests_pkey on tests __local_130__ (cost=0.14..51.04 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (id = __local_129__.test_id)
247.          

SubPlan (for Index Scan)

248. 0.000 0.000 ↓ 0.0

Index Scan using labs_pkey on labs __local_131__ (cost=0.14..8.16 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (id = __local_130__.reference_lab_id)
249. 0.000 0.000 ↓ 0.0

Result (cost=8.21..8.21 rows=1 width=32) (actual rows= loops=)

250.          

Initplan (for Result)

251. 0.000 0.000 ↓ 0.0

Aggregate (cost=8.20..8.21 rows=1 width=32) (actual rows= loops=)

252. 0.000 0.000 ↓ 0.0

Sort (cost=8.17..8.18 rows=1 width=314) (actual rows= loops=)

  • Sort Key: __local_133__.id
253. 0.000 0.000 ↓ 0.0

Index Scan using tests_parent_id_idx on tests __local_133__ (cost=0.14..8.16 rows=1 width=314) (actual rows= loops=)

  • Index Cond: (parent_id = __local_130__.id)
254. 0.000 0.000 ↓ 0.0

Result (cost=26.49..26.50 rows=1 width=32) (actual rows= loops=)

255.          

Initplan (for Result)

256. 0.000 0.000 ↓ 0.0

Aggregate (cost=26.48..26.49 rows=1 width=32) (actual rows= loops=)

257. 0.000 0.000 ↓ 0.0

Sort (cost=1.91..1.92 rows=3 width=11) (actual rows= loops=)

  • Sort Key: __local_136__.id
258. 0.000 0.000 ↓ 0.0

Seq Scan on tests_test_results __local_136__ (cost=0.00..1.89 rows=3 width=11) (actual rows= loops=)

  • Filter: (test_id = __local_130__.id)
259.          

SubPlan (for Aggregate)

260. 0.000 0.000 ↓ 0.0

Index Scan using test_results_pkey on test_results __local_135__ (cost=0.15..8.17 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (value = __local_136__.result)
261. 0.000 0.000 ↓ 0.0

Index Scan using test_results_pkey on test_results __local_137__ (cost=0.15..8.17 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (value = __local_128__.result_1_id)
262. 0.000 0.000 ↓ 0.0

Index Scan using users_pkey on users __local_138__ (cost=0.15..8.17 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (id = __local_128__.result_1_by_id)
263. 0.000 0.000 ↓ 0.0

Index Scan using test_results_pkey on test_results __local_139__ (cost=0.15..8.17 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (value = __local_128__.result_2_id)
264. 0.000 0.000 ↓ 0.0

Index Scan using users_pkey on users __local_140__ (cost=0.15..8.17 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (id = __local_128__.result_2_by_id)
265. 0.000 0.000 ↓ 0.0

Index Scan using test_results_pkey on test_results __local_141__ (cost=0.15..8.17 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (value = __local_128__.result_final_id)
266. 0.000 0.000 ↓ 0.0

Index Scan using samples_pkey on samples __local_142__ (cost=0.15..40.85 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (id = __local_128__.sample_id)
267.          

SubPlan (for Index Scan)

268. 0.000 0.000 ↓ 0.0

Index Scan using tube_types_pkey on tube_types __local_143__ (cost=0.15..8.17 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (value = __local_142__.type_id)
269. 0.000 0.000 ↓ 0.0

Index Scan using tubes_pkey on tubes __local_144__ (cost=0.15..16.34 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (id = __local_142__.tube_id)
270.          

SubPlan (for Index Scan)

271. 0.000 0.000 ↓ 0.0

Index Scan using specimen_types_pkey on specimen_types __local_145__ (cost=0.15..8.17 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (value = __local_144__.specimen_type_id)
272. 0.000 0.000 ↓ 0.0

Index Scan using transfusion_pkey on transfusion __local_146__ (cost=0.15..8.17 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (value = __local_142__.transfusion_id)
273. 0.000 0.000 ↓ 0.0

Seq Scan on test_orders __local_147__ (cost=0.00..1,150.71 rows=1 width=32) (actual rows= loops=)

  • Filter: (__local_28__.original_order_id = id)
274.          

SubPlan (for Seq Scan)

275. 0.000 0.000 ↓ 0.0

Index Scan using test_results_pkey on test_results __local_148__ (cost=0.15..8.17 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (value = __local_147__.initial_result_value)
276. 0.000 0.000 ↓ 0.0

Index Scan using test_results_pkey on test_results __local_149__ (cost=0.15..8.17 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (value = __local_147__.final_result_value)
277. 0.000 0.000 ↓ 0.0

Index Scan using users_pkey on users __local_150__ (cost=0.15..16.34 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (id = __local_147__.entered_by_id)
278.          

SubPlan (for Index Scan)

279. 0.000 0.000 ↓ 0.0

Index Scan using orgs_pkey on orgs __local_151__ (cost=0.15..8.17 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (id = __local_150__.org_id)
280. 0.000 0.000 ↓ 0.0

Index Scan using users_pkey on users __local_152__ (cost=0.15..16.34 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (id = __local_147__.validated_by_id)
281.          

SubPlan (for Index Scan)

282. 0.000 0.000 ↓ 0.0

Index Scan using orgs_pkey on orgs __local_153__ (cost=0.15..8.17 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (id = __local_152__.org_id)
283. 0.000 0.000 ↓ 0.0

Index Scan using tests_pkey on tests __local_154__ (cost=0.14..51.04 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (id = __local_147__.test_id)
284.          

SubPlan (for Index Scan)

285. 0.000 0.000 ↓ 0.0

Index Scan using labs_pkey on labs __local_155__ (cost=0.14..8.16 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (id = __local_154__.reference_lab_id)
286. 0.000 0.000 ↓ 0.0

Result (cost=8.21..8.21 rows=1 width=32) (actual rows= loops=)

287.          

Initplan (for Result)

288. 0.000 0.000 ↓ 0.0

Aggregate (cost=8.20..8.21 rows=1 width=32) (actual rows= loops=)

289. 0.000 0.000 ↓ 0.0

Sort (cost=8.17..8.18 rows=1 width=314) (actual rows= loops=)

  • Sort Key: __local_157__.id
290. 0.000 0.000 ↓ 0.0

Index Scan using tests_parent_id_idx on tests __local_157__ (cost=0.14..8.16 rows=1 width=314) (actual rows= loops=)

  • Index Cond: (parent_id = __local_154__.id)
291. 0.000 0.000 ↓ 0.0

Result (cost=26.49..26.50 rows=1 width=32) (actual rows= loops=)

292.          

Initplan (for Result)

293. 0.000 0.000 ↓ 0.0

Aggregate (cost=26.48..26.49 rows=1 width=32) (actual rows= loops=)

294. 0.000 0.000 ↓ 0.0

Sort (cost=1.91..1.92 rows=3 width=11) (actual rows= loops=)

  • Sort Key: __local_160__.id
295. 0.000 0.000 ↓ 0.0

Seq Scan on tests_test_results __local_160__ (cost=0.00..1.89 rows=3 width=11) (actual rows= loops=)

  • Filter: (test_id = __local_154__.id)
296.          

SubPlan (for Aggregate)

297. 0.000 0.000 ↓ 0.0

Index Scan using test_results_pkey on test_results __local_159__ (cost=0.15..8.17 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (value = __local_160__.result)
298. 0.000 0.000 ↓ 0.0

Index Scan using samples_pkey on samples __local_161__ (cost=0.15..40.85 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (id = __local_147__.sample_id)
299.          

SubPlan (for Index Scan)

300. 0.000 0.000 ↓ 0.0

Index Scan using tube_types_pkey on tube_types __local_162__ (cost=0.15..8.17 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (value = __local_161__.type_id)
301. 0.000 0.000 ↓ 0.0

Index Scan using tubes_pkey on tubes __local_163__ (cost=0.15..16.34 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (id = __local_161__.tube_id)
302.          

SubPlan (for Index Scan)

303. 0.000 0.000 ↓ 0.0

Index Scan using specimen_types_pkey on specimen_types __local_164__ (cost=0.15..8.17 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (value = __local_163__.specimen_type_id)
304. 0.000 0.000 ↓ 0.0

Index Scan using transfusion_pkey on transfusion __local_165__ (cost=0.15..8.17 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (value = __local_161__.transfusion_id)
305. 0.000 0.000 ↓ 0.0

Result (cost=430.78..430.79 rows=1 width=32) (actual rows= loops=)

306.          

Initplan (for Result)

307. 0.000 0.000 ↓ 0.0

Aggregate (cost=430.77..430.78 rows=1 width=32) (actual rows= loops=)

308. 0.000 0.000 ↓ 0.0

Sort (cost=3.98..3.99 rows=1 width=91) (actual rows= loops=)

  • Sort Key: __local_167__.id
309. 0.000 0.000 ↓ 0.0

Seq Scan on test_order_results __local_167__ (cost=0.00..3.98 rows=1 width=91) (actual rows= loops=)

  • Filter: ((NOT is_reflex) AND (test_order_id = __local_147__.id))
310.          

SubPlan (for Aggregate)

311. 0.000 0.000 ↓ 0.0

Index Scan using test_result_sets_pkey on test_result_sets __local_168__ (cost=0.15..59.21 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (id = __local_167__.test_result_set_id)
312.          

SubPlan (for Index Scan)

313. 0.000 0.000 ↓ 0.0

Index Scan using tests_pkey on tests __local_169__ (cost=0.14..51.04 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (id = __local_168__.test_id)
314.          

SubPlan (for Index Scan)

315. 0.000 0.000 ↓ 0.0

Index Scan using labs_pkey on labs __local_170__ (cost=0.14..8.16 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (id = __local_169__.reference_lab_id)
316. 0.000 0.000 ↓ 0.0

Result (cost=8.21..8.21 rows=1 width=32) (actual rows= loops=)

317.          

Initplan (for Result)

318. 0.000 0.000 ↓ 0.0

Aggregate (cost=8.20..8.21 rows=1 width=32) (actual rows= loops=)

319. 0.000 0.000 ↓ 0.0

Sort (cost=8.17..8.18 rows=1 width=314) (actual rows= loops=)

  • Sort Key: __local_172__.id
320. 0.000 0.000 ↓ 0.0

Index Scan using tests_parent_id_idx on tests __local_172__ (cost=0.14..8.16 rows=1 width=314) (actual rows= loops=)

  • Index Cond: (parent_id = __local_169__.id)
321. 0.000 0.000 ↓ 0.0

Result (cost=26.49..26.50 rows=1 width=32) (actual rows= loops=)

322.          

Initplan (for Result)

323. 0.000 0.000 ↓ 0.0

Aggregate (cost=26.48..26.49 rows=1 width=32) (actual rows= loops=)

324. 0.000 0.000 ↓ 0.0

Sort (cost=1.91..1.92 rows=3 width=11) (actual rows= loops=)

  • Sort Key: __local_175__.id
325. 0.000 0.000 ↓ 0.0

Seq Scan on tests_test_results __local_175__ (cost=0.00..1.89 rows=3 width=11) (actual rows= loops=)

  • Filter: (test_id = __local_169__.id)
326.          

SubPlan (for Aggregate)

327. 0.000 0.000 ↓ 0.0

Index Scan using test_results_pkey on test_results __local_174__ (cost=0.15..8.17 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (value = __local_175__.result)
328. 0.000 0.000 ↓ 0.0

Index Scan using test_results_pkey on test_results __local_176__ (cost=0.15..8.17 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (value = __local_167__.result_1_id)
329. 0.000 0.000 ↓ 0.0

Index Scan using users_pkey on users __local_177__ (cost=0.15..8.17 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (id = __local_167__.result_1_by_id)
330. 0.000 0.000 ↓ 0.0

Index Scan using test_results_pkey on test_results __local_178__ (cost=0.15..8.17 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (value = __local_167__.result_2_id)
331. 0.000 0.000 ↓ 0.0

Index Scan using users_pkey on users __local_179__ (cost=0.15..8.17 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (id = __local_167__.result_2_by_id)
332. 0.000 0.000 ↓ 0.0

Index Scan using test_results_pkey on test_results __local_180__ (cost=0.15..8.17 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (value = __local_167__.result_final_id)
333. 0.000 0.000 ↓ 0.0

Index Scan using samples_pkey on samples __local_181__ (cost=0.15..40.85 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (id = __local_167__.sample_id)
334.          

SubPlan (for Index Scan)

335. 0.000 0.000 ↓ 0.0

Index Scan using tube_types_pkey on tube_types __local_182__ (cost=0.15..8.17 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (value = __local_181__.type_id)
336. 0.000 0.000 ↓ 0.0

Index Scan using tubes_pkey on tubes __local_183__ (cost=0.15..16.34 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (id = __local_181__.tube_id)
337.          

SubPlan (for Index Scan)

338. 0.000 0.000 ↓ 0.0

Index Scan using specimen_types_pkey on specimen_types __local_184__ (cost=0.15..8.17 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (value = __local_183__.specimen_type_id)
339. 0.000 0.000 ↓ 0.0

Index Scan using transfusion_pkey on transfusion __local_185__ (cost=0.15..8.17 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (value = __local_181__.transfusion_id)
340. 0.000 0.000 ↓ 0.0

Result (cost=285.85..285.86 rows=1 width=32) (actual rows= loops=)

341.          

Initplan (for Result)

342. 0.000 0.000 ↓ 0.0

Aggregate (cost=285.84..285.85 rows=1 width=32) (actual rows= loops=)

343. 0.000 0.000 ↓ 0.0

Sort (cost=3.98..3.99 rows=2 width=91) (actual rows= loops=)

  • Sort Key: __local_187__.id
344. 0.000 0.000 ↓ 0.0

Seq Scan on test_order_results __local_187__ (cost=0.00..3.98 rows=2 width=91) (actual rows= loops=)

  • Filter: (parent_result_id = __local_167__.id)
345.          

SubPlan (for Aggregate)

346. 0.000 0.000 ↓ 0.0

Index Scan using test_result_sets_pkey on test_result_sets __local_188__ (cost=0.15..59.21 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (id = __local_187__.test_result_set_id)
347.          

SubPlan (for Index Scan)

348. 0.000 0.000 ↓ 0.0

Index Scan using tests_pkey on tests __local_189__ (cost=0.14..51.04 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (id = __local_188__.test_id)
349.          

SubPlan (for Index Scan)

350. 0.000 0.000 ↓ 0.0

Index Scan using labs_pkey on labs __local_190__ (cost=0.14..8.16 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (id = __local_189__.reference_lab_id)
351. 0.000 0.000 ↓ 0.0

Result (cost=8.21..8.21 rows=1 width=32) (actual rows= loops=)

352.          

Initplan (for Result)

353. 0.000 0.000 ↓ 0.0

Aggregate (cost=8.20..8.21 rows=1 width=32) (actual rows= loops=)

354. 0.000 0.000 ↓ 0.0

Sort (cost=8.17..8.18 rows=1 width=314) (actual rows= loops=)

  • Sort Key: __local_192__.id
355. 0.000 0.000 ↓ 0.0

Index Scan using tests_parent_id_idx on tests __local_192__ (cost=0.14..8.16 rows=1 width=314) (actual rows= loops=)

  • Index Cond: (parent_id = __local_189__.id)
356. 0.000 0.000 ↓ 0.0

Result (cost=26.49..26.50 rows=1 width=32) (actual rows= loops=)

357.          

Initplan (for Result)

358. 0.000 0.000 ↓ 0.0

Aggregate (cost=26.48..26.49 rows=1 width=32) (actual rows= loops=)

359. 0.000 0.000 ↓ 0.0

Sort (cost=1.91..1.92 rows=3 width=11) (actual rows= loops=)

  • Sort Key: __local_195__.id
360. 0.000 0.000 ↓ 0.0

Seq Scan on tests_test_results __local_195__ (cost=0.00..1.89 rows=3 width=11) (actual rows= loops=)

  • Filter: (test_id = __local_189__.id)
361.          

SubPlan (for Aggregate)

362. 0.000 0.000 ↓ 0.0

Index Scan using test_results_pkey on test_results __local_194__ (cost=0.15..8.17 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (value = __local_195__.result)
363. 0.000 0.000 ↓ 0.0

Index Scan using test_results_pkey on test_results __local_196__ (cost=0.15..8.17 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (value = __local_187__.result_1_id)
364. 0.000 0.000 ↓ 0.0

Index Scan using users_pkey on users __local_197__ (cost=0.15..8.17 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (id = __local_187__.result_1_by_id)
365. 0.000 0.000 ↓ 0.0

Index Scan using test_results_pkey on test_results __local_198__ (cost=0.15..8.17 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (value = __local_187__.result_2_id)
366. 0.000 0.000 ↓ 0.0

Index Scan using users_pkey on users __local_199__ (cost=0.15..8.17 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (id = __local_187__.result_2_by_id)
367. 0.000 0.000 ↓ 0.0

Index Scan using test_results_pkey on test_results __local_200__ (cost=0.15..8.17 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (value = __local_187__.result_final_id)
368. 0.000 0.000 ↓ 0.0

Index Scan using samples_pkey on samples __local_201__ (cost=0.15..40.85 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (id = __local_187__.sample_id)
369.          

SubPlan (for Index Scan)

370. 0.000 0.000 ↓ 0.0

Index Scan using tube_types_pkey on tube_types __local_202__ (cost=0.15..8.17 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (value = __local_201__.type_id)
371. 0.000 0.000 ↓ 0.0

Index Scan using tubes_pkey on tubes __local_203__ (cost=0.15..16.34 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (id = __local_201__.tube_id)
372.          

SubPlan (for Index Scan)

373. 0.000 0.000 ↓ 0.0

Index Scan using specimen_types_pkey on specimen_types __local_204__ (cost=0.15..8.17 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (value = __local_203__.specimen_type_id)
374. 0.000 0.000 ↓ 0.0

Index Scan using transfusion_pkey on transfusion __local_205__ (cost=0.15..8.17 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (value = __local_201__.transfusion_id)
375. 0.000 0.000 ↓ 0.0

Result (cost=575.37..575.38 rows=1 width=32) (actual rows= loops=)

376.          

Initplan (for Result)

377. 0.000 0.000 ↓ 0.0

Aggregate (cost=575.36..575.37 rows=1 width=32) (actual rows= loops=)

378. 0.000 0.000 ↓ 0.0

Sort (cost=3.65..3.65 rows=1 width=93) (actual rows= loops=)

  • Sort Key: __local_207__.id
379. 0.000 0.000 ↓ 0.0

Seq Scan on test_orders __local_207__ (cost=0.00..3.64 rows=1 width=93) (actual rows= loops=)

  • Filter: (original_order_id = __local_147__.id)
380.          

SubPlan (for Aggregate)

381. 0.000 0.000 ↓ 0.0

Index Scan using test_results_pkey on test_results __local_208__ (cost=0.15..8.17 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (value = __local_207__.initial_result_value)
382. 0.000 0.000 ↓ 0.0

Index Scan using test_results_pkey on test_results __local_209__ (cost=0.15..8.17 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (value = __local_207__.final_result_value)
383. 0.000 0.000 ↓ 0.0

Index Scan using users_pkey on users __local_210__ (cost=0.15..16.34 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (id = __local_207__.entered_by_id)
384.          

SubPlan (for Index Scan)

385. 0.000 0.000 ↓ 0.0

Index Scan using orgs_pkey on orgs __local_211__ (cost=0.15..8.17 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (id = __local_210__.org_id)
386. 0.000 0.000 ↓ 0.0

Index Scan using users_pkey on users __local_212__ (cost=0.15..16.34 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (id = __local_207__.validated_by_id)
387.          

SubPlan (for Index Scan)

388. 0.000 0.000 ↓ 0.0

Index Scan using orgs_pkey on orgs __local_213__ (cost=0.15..8.17 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (id = __local_212__.org_id)
389. 0.000 0.000 ↓ 0.0

Index Scan using tests_pkey on tests __local_214__ (cost=0.14..51.04 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (id = __local_207__.test_id)
390.          

SubPlan (for Index Scan)

391. 0.000 0.000 ↓ 0.0

Index Scan using labs_pkey on labs __local_215__ (cost=0.14..8.16 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (id = __local_214__.reference_lab_id)
392. 0.000 0.000 ↓ 0.0

Result (cost=8.21..8.21 rows=1 width=32) (actual rows= loops=)

393.          

Initplan (for Result)

394. 0.000 0.000 ↓ 0.0

Aggregate (cost=8.20..8.21 rows=1 width=32) (actual rows= loops=)

395. 0.000 0.000 ↓ 0.0

Sort (cost=8.17..8.18 rows=1 width=314) (actual rows= loops=)

  • Sort Key: __local_217__.id
396. 0.000 0.000 ↓ 0.0

Index Scan using tests_parent_id_idx on tests __local_217__ (cost=0.14..8.16 rows=1 width=314) (actual rows= loops=)

  • Index Cond: (parent_id = __local_214__.id)
397. 0.000 0.000 ↓ 0.0

Result (cost=26.49..26.50 rows=1 width=32) (actual rows= loops=)

398.          

Initplan (for Result)

399. 0.000 0.000 ↓ 0.0

Aggregate (cost=26.48..26.49 rows=1 width=32) (actual rows= loops=)

400. 0.000 0.000 ↓ 0.0

Sort (cost=1.91..1.92 rows=3 width=11) (actual rows= loops=)

  • Sort Key: __local_220__.id
401. 0.000 0.000 ↓ 0.0

Seq Scan on tests_test_results __local_220__ (cost=0.00..1.89 rows=3 width=11) (actual rows= loops=)

  • Filter: (test_id = __local_214__.id)
402.          

SubPlan (for Aggregate)

403. 0.000 0.000 ↓ 0.0

Index Scan using test_results_pkey on test_results __local_219__ (cost=0.15..8.17 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (value = __local_220__.result)
404. 0.000 0.000 ↓ 0.0

Index Scan using samples_pkey on samples __local_221__ (cost=0.15..40.85 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (id = __local_207__.sample_id)
405.          

SubPlan (for Index Scan)

406. 0.000 0.000 ↓ 0.0

Index Scan using tube_types_pkey on tube_types __local_222__ (cost=0.15..8.17 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (value = __local_221__.type_id)
407. 0.000 0.000 ↓ 0.0

Index Scan using tubes_pkey on tubes __local_223__ (cost=0.15..16.34 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (id = __local_221__.tube_id)
408.          

SubPlan (for Index Scan)

409. 0.000 0.000 ↓ 0.0

Index Scan using specimen_types_pkey on specimen_types __local_224__ (cost=0.15..8.17 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (value = __local_223__.specimen_type_id)
410. 0.000 0.000 ↓ 0.0

Index Scan using transfusion_pkey on transfusion __local_225__ (cost=0.15..8.17 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (value = __local_221__.transfusion_id)
411. 0.000 0.000 ↓ 0.0

Result (cost=430.78..430.79 rows=1 width=32) (actual rows= loops=)

412.          

Initplan (for Result)

413. 0.000 0.000 ↓ 0.0

Aggregate (cost=430.77..430.78 rows=1 width=32) (actual rows= loops=)

414. 0.000 0.000 ↓ 0.0

Sort (cost=3.98..3.99 rows=1 width=91) (actual rows= loops=)

  • Sort Key: __local_227__.id
415. 0.000 0.000 ↓ 0.0

Seq Scan on test_order_results __local_227__ (cost=0.00..3.98 rows=1 width=91) (actual rows= loops=)

  • Filter: ((NOT is_reflex) AND (test_order_id = __local_207__.id))
416.          

SubPlan (for Aggregate)

417. 0.000 0.000 ↓ 0.0

Index Scan using test_result_sets_pkey on test_result_sets __local_228__ (cost=0.15..59.21 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (id = __local_227__.test_result_set_id)
418.          

SubPlan (for Index Scan)

419. 0.000 0.000 ↓ 0.0

Index Scan using tests_pkey on tests __local_229__ (cost=0.14..51.04 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (id = __local_228__.test_id)
420.          

SubPlan (for Index Scan)

421. 0.000 0.000 ↓ 0.0

Index Scan using labs_pkey on labs __local_230__ (cost=0.14..8.16 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (id = __local_229__.reference_lab_id)
422. 0.000 0.000 ↓ 0.0

Result (cost=8.21..8.21 rows=1 width=32) (actual rows= loops=)

423.          

Initplan (for Result)

424. 0.000 0.000 ↓ 0.0

Aggregate (cost=8.20..8.21 rows=1 width=32) (actual rows= loops=)

425. 0.000 0.000 ↓ 0.0

Sort (cost=8.17..8.18 rows=1 width=314) (actual rows= loops=)

  • Sort Key: __local_232__.id
426. 0.000 0.000 ↓ 0.0

Index Scan using tests_parent_id_idx on tests __local_232__ (cost=0.14..8.16 rows=1 width=314) (actual rows= loops=)

  • Index Cond: (parent_id = __local_229__.id)
427. 0.000 0.000 ↓ 0.0

Result (cost=26.49..26.50 rows=1 width=32) (actual rows= loops=)

428.          

Initplan (for Result)

429. 0.000 0.000 ↓ 0.0

Aggregate (cost=26.48..26.49 rows=1 width=32) (actual rows= loops=)

430. 0.000 0.000 ↓ 0.0

Sort (cost=1.91..1.92 rows=3 width=11) (actual rows= loops=)

  • Sort Key: __local_235__.id
431. 0.000 0.000 ↓ 0.0

Seq Scan on tests_test_results __local_235__ (cost=0.00..1.89 rows=3 width=11) (actual rows= loops=)

  • Filter: (test_id = __local_229__.id)
432.          

SubPlan (for Aggregate)

433. 0.000 0.000 ↓ 0.0

Index Scan using test_results_pkey on test_results __local_234__ (cost=0.15..8.17 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (value = __local_235__.result)
434. 0.000 0.000 ↓ 0.0

Index Scan using test_results_pkey on test_results __local_236__ (cost=0.15..8.17 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (value = __local_227__.result_1_id)
435. 0.000 0.000 ↓ 0.0

Index Scan using users_pkey on users __local_237__ (cost=0.15..8.17 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (id = __local_227__.result_1_by_id)
436. 0.000 0.000 ↓ 0.0

Index Scan using test_results_pkey on test_results __local_238__ (cost=0.15..8.17 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (value = __local_227__.result_2_id)
437. 0.000 0.000 ↓ 0.0

Index Scan using users_pkey on users __local_239__ (cost=0.15..8.17 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (id = __local_227__.result_2_by_id)
438. 0.000 0.000 ↓ 0.0

Index Scan using test_results_pkey on test_results __local_240__ (cost=0.15..8.17 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (value = __local_227__.result_final_id)
439. 0.000 0.000 ↓ 0.0

Index Scan using samples_pkey on samples __local_241__ (cost=0.15..40.85 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (id = __local_227__.sample_id)
440.          

SubPlan (for Index Scan)

441. 0.000 0.000 ↓ 0.0

Index Scan using tube_types_pkey on tube_types __local_242__ (cost=0.15..8.17 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (value = __local_241__.type_id)
442. 0.000 0.000 ↓ 0.0

Index Scan using tubes_pkey on tubes __local_243__ (cost=0.15..16.34 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (id = __local_241__.tube_id)
443.          

SubPlan (for Index Scan)

444. 0.000 0.000 ↓ 0.0

Index Scan using specimen_types_pkey on specimen_types __local_244__ (cost=0.15..8.17 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (value = __local_243__.specimen_type_id)
445. 0.000 0.000 ↓ 0.0

Index Scan using transfusion_pkey on transfusion __local_245__ (cost=0.15..8.17 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (value = __local_241__.transfusion_id)
446. 0.000 0.000 ↓ 0.0

Result (cost=285.85..285.86 rows=1 width=32) (actual rows= loops=)

447.          

Initplan (for Result)

448. 0.000 0.000 ↓ 0.0

Aggregate (cost=285.84..285.85 rows=1 width=32) (actual rows= loops=)

449. 0.000 0.000 ↓ 0.0

Sort (cost=3.98..3.99 rows=2 width=91) (actual rows= loops=)

  • Sort Key: __local_247__.id
450. 0.000 0.000 ↓ 0.0

Seq Scan on test_order_results __local_247__ (cost=0.00..3.98 rows=2 width=91) (actual rows= loops=)

  • Filter: (parent_result_id = __local_227__.id)
451.          

SubPlan (for Aggregate)

452. 0.000 0.000 ↓ 0.0

Index Scan using test_result_sets_pkey on test_result_sets __local_248__ (cost=0.15..59.21 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (id = __local_247__.test_result_set_id)
453.          

SubPlan (for Index Scan)

454. 0.000 0.000 ↓ 0.0

Index Scan using tests_pkey on tests __local_249__ (cost=0.14..51.04 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (id = __local_248__.test_id)
455.          

SubPlan (for Index Scan)

456. 0.000 0.000 ↓ 0.0

Index Scan using labs_pkey on labs __local_250__ (cost=0.14..8.16 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (id = __local_249__.reference_lab_id)
457. 0.000 0.000 ↓ 0.0

Result (cost=8.21..8.21 rows=1 width=32) (actual rows= loops=)

458.          

Initplan (for Result)

459. 0.000 0.000 ↓ 0.0

Aggregate (cost=8.20..8.21 rows=1 width=32) (actual rows= loops=)

460. 0.000 0.000 ↓ 0.0

Sort (cost=8.17..8.18 rows=1 width=314) (actual rows= loops=)

  • Sort Key: __local_252__.id
461. 0.000 0.000 ↓ 0.0

Index Scan using tests_parent_id_idx on tests __local_252__ (cost=0.14..8.16 rows=1 width=314) (actual rows= loops=)

  • Index Cond: (parent_id = __local_249__.id)
462. 0.000 0.000 ↓ 0.0

Result (cost=26.49..26.50 rows=1 width=32) (actual rows= loops=)

463.          

Initplan (for Result)

464. 0.000 0.000 ↓ 0.0

Aggregate (cost=26.48..26.49 rows=1 width=32) (actual rows= loops=)

465. 0.000 0.000 ↓ 0.0

Sort (cost=1.91..1.92 rows=3 width=11) (actual rows= loops=)

  • Sort Key: __local_255__.id
466. 0.000 0.000 ↓ 0.0

Seq Scan on tests_test_results __local_255__ (cost=0.00..1.89 rows=3 width=11) (actual rows= loops=)

  • Filter: (test_id = __local_249__.id)
467.          

SubPlan (for Aggregate)

468. 0.000 0.000 ↓ 0.0

Index Scan using test_results_pkey on test_results __local_254__ (cost=0.15..8.17 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (value = __local_255__.result)
469. 0.000 0.000 ↓ 0.0

Index Scan using test_results_pkey on test_results __local_256__ (cost=0.15..8.17 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (value = __local_247__.result_1_id)
470. 0.000 0.000 ↓ 0.0

Index Scan using users_pkey on users __local_257__ (cost=0.15..8.17 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (id = __local_247__.result_1_by_id)
471. 0.000 0.000 ↓ 0.0

Index Scan using test_results_pkey on test_results __local_258__ (cost=0.15..8.17 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (value = __local_247__.result_2_id)
472. 0.000 0.000 ↓ 0.0

Index Scan using users_pkey on users __local_259__ (cost=0.15..8.17 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (id = __local_247__.result_2_by_id)
473. 0.000 0.000 ↓ 0.0

Index Scan using test_results_pkey on test_results __local_260__ (cost=0.15..8.17 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (value = __local_247__.result_final_id)
474. 0.000 0.000 ↓ 0.0

Index Scan using samples_pkey on samples __local_261__ (cost=0.15..40.85 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (id = __local_247__.sample_id)
475.          

SubPlan (for Index Scan)

476. 0.000 0.000 ↓ 0.0

Index Scan using tube_types_pkey on tube_types __local_262__ (cost=0.15..8.17 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (value = __local_261__.type_id)
477. 0.000 0.000 ↓ 0.0

Index Scan using tubes_pkey on tubes __local_263__ (cost=0.15..16.34 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (id = __local_261__.tube_id)
478.          

SubPlan (for Index Scan)

479. 0.000 0.000 ↓ 0.0

Index Scan using specimen_types_pkey on specimen_types __local_264__ (cost=0.15..8.17 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (value = __local_263__.specimen_type_id)
480. 0.000 0.000 ↓ 0.0

Index Scan using transfusion_pkey on transfusion __local_265__ (cost=0.15..8.17 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (value = __local_261__.transfusion_id)
481. 0.000 0.000 ↓ 0.0

Result (cost=67.11..67.12 rows=1 width=32) (actual rows= loops=)

482.          

Initplan (for Result)

483. 0.000 0.000 ↓ 0.0

Aggregate (cost=67.10..67.11 rows=1 width=32) (actual rows= loops=)

484. 0.000 0.000 ↓ 0.0

Sort (cost=1.69..1.70 rows=4 width=65) (actual rows= loops=)

  • Sort Key: __local_267__.created_at DESC, __local_267__.id
485. 0.000 0.000 ↓ 0.0

Seq Scan on reports __local_267__ (cost=0.00..1.65 rows=4 width=65) (actual rows= loops=)

  • Filter: (accession_id = __local_0__.id)
486.          

SubPlan (for Aggregate)

487. 0.000 0.000 ↓ 0.0

Index Scan using users_pkey on users __local_268__ (cost=0.15..16.34 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (id = __local_267__.created_by_id)
488.          

SubPlan (for Index Scan)

489. 0.000 0.000 ↓ 0.0

Index Scan using orgs_pkey on orgs __local_269__ (cost=0.15..8.17 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (id = __local_268__.org_id)
490. 0.000 0.000 ↓ 0.0

Result (cost=109.38..109.39 rows=1 width=32) (actual rows= loops=)

491.          

Initplan (for Result)

492. 0.000 0.000 ↓ 0.0

Aggregate (cost=109.37..109.38 rows=1 width=32) (actual rows= loops=)

493. 0.000 0.000 ↓ 0.0

Sort (cost=11.31..11.31 rows=3 width=101) (actual rows= loops=)

  • Sort Key: __local_271__.id
494. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on holds __local_271__ (cost=4.17..11.28 rows=3 width=101) (actual rows= loops=)

  • Recheck Cond: (accession_id = __local_0__.id)
495. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on holds_accession_id_idx (cost=0.00..4.17 rows=3 width=0) (actual rows= loops=)

  • Index Cond: (accession_id = __local_0__.id)
496.          

SubPlan (for Aggregate)

497. 0.000 0.000 ↓ 0.0

Index Scan using users_pkey on users __local_272__ (cost=0.15..16.34 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (id = __local_271__.created_by_id)
498.          

SubPlan (for Index Scan)

499. 0.000 0.000 ↓ 0.0

Index Scan using orgs_pkey on orgs __local_273__ (cost=0.15..8.17 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (id = __local_272__.org_id)
500. 0.000 0.000 ↓ 0.0

Index Scan using users_pkey on users __local_274__ (cost=0.15..16.34 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (id = __local_271__.resolved_by_id)
501.          

SubPlan (for Index Scan)

502. 0.000 0.000 ↓ 0.0

Index Scan using orgs_pkey on orgs __local_275__ (cost=0.15..8.17 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (id = __local_274__.org_id)
503. 0.000 0.000 ↓ 0.0

Result (cost=94.49..94.50 rows=1 width=32) (actual rows= loops=)

504.          

Initplan (for Result)

505. 0.000 0.000 ↓ 0.0

Aggregate (cost=94.48..94.49 rows=1 width=32) (actual rows= loops=)

506. 0.000 0.000 ↓ 0.0

Sort (cost=12.72..12.73 rows=5 width=52) (actual rows= loops=)

  • Sort Key: __local_277__.created_at, __local_277__.id
507. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on accession_comments __local_277__ (cost=4.19..12.66 rows=5 width=52) (actual rows= loops=)

  • Recheck Cond: (accession_id = __local_0__.id)
508. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on accession_comments_accession_id_idx (cost=0.00..4.19 rows=5 width=0) (actual rows= loops=)

  • Index Cond: (accession_id = __local_0__.id)
509.          

SubPlan (for Aggregate)

510. 0.000 0.000 ↓ 0.0

Index Scan using users_pkey on users __local_278__ (cost=0.15..16.34 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (id = __local_277__.created_by_id)
511.          

SubPlan (for Index Scan)

512. 0.000 0.000 ↓ 0.0

Index Scan using orgs_pkey on orgs __local_279__ (cost=0.15..8.17 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (id = __local_278__.org_id)