explain.depesz.com

PostgreSQL's explain analyze made readable

Result: FHi2

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

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

2.          

SubPlan (for Function Scan)

3. 0.000 0.000 ↓ 0.0

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

4.          

Initplan (for Result)

5. 0.000 0.000 ↓ 0.0

Aggregate (cost=1.61..1.62 rows=1 width=32) (actual rows= loops=)

6. 0.000 0.000 ↓ 0.0

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

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

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

  • Filter: (cloned_from_id = __local_0__.id)
8. 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)
9. 0.000 0.000 ↓ 0.0

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

10.          

Initplan (for Result)

11. 0.000 0.000 ↓ 0.0

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

12. 0.000 0.000 ↓ 0.0

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

  • Sort Key: __local_5__.id
13. 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)
14. 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)
15.          

SubPlan (for Aggregate)

16. 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)
17. 0.000 0.000 ↓ 0.0

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

18.          

Initplan (for Result)

19. 0.000 0.000 ↓ 0.0

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

20. 0.000 0.000 ↓ 0.0

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

  • Sort Key: __local_8__.id
21. 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)
22. 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)
23.          

SubPlan (for Aggregate)

24. 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)
25. 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)
26.          

SubPlan (for Index Scan)

27. 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)
28. 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)
29. 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)
30.          

SubPlan (for Index Scan)

31. 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)
32. 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)
33.          

SubPlan (for Index Scan)

34. 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)
35. 0.000 0.000 ↓ 0.0

Seq Scan on panels __local_17__ (cost=0.00..564.59 rows=1 width=32) (actual rows= loops=)

  • Filter: (__local_0__.panel_id = id)
36.          

SubPlan (for Seq Scan)

37. 0.000 0.000 ↓ 0.0

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

38.          

Initplan (for Result)

39. 0.000 0.000 ↓ 0.0

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

40. 0.000 0.000 ↓ 0.0

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

  • Sort Key: __local_26__.id
41. 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)
42.          

SubPlan (for Aggregate)

43. 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)
44.          

SubPlan (for Index Scan)

45. 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)
46. 0.000 0.000 ↓ 0.0

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

47.          

Initplan (for Result)

48. 0.000 0.000 ↓ 0.0

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

49. 0.000 0.000 ↓ 0.0

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

  • Sort Key: __local_22__.id
50. 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)
51. 0.000 0.000 ↓ 0.0

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

52.          

Initplan (for Result)

53. 0.000 0.000 ↓ 0.0

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

54. 0.000 0.000 ↓ 0.0

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

  • Sort Key: __local_25__.id
55. 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)
56.          

SubPlan (for Aggregate)

57. 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)
58. 0.000 0.000 ↓ 0.0

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

59.          

Initplan (for Result)

60. 0.000 0.000 ↓ 0.0

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

61. 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
62. 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)
63.          

SubPlan (for Seq Scan)

64. 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)
65.          

SubPlan (for Aggregate)

66. 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)
67. 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)
68. 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)
69.          

SubPlan (for Index Scan)

70. 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)
71. 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)
72.          

SubPlan (for Index Scan)

73. 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)
74. 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)
75.          

SubPlan (for Index Scan)

76. 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)
77. 0.000 0.000 ↓ 0.0

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

78.          

Initplan (for Result)

79. 0.000 0.000 ↓ 0.0

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

80. 0.000 0.000 ↓ 0.0

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

  • Sort Key: __local_38__.id
81. 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)
82. 0.000 0.000 ↓ 0.0

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

83.          

Initplan (for Result)

84. 0.000 0.000 ↓ 0.0

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

85. 0.000 0.000 ↓ 0.0

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

  • Sort Key: __local_41__.id
86. 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)
87.          

SubPlan (for Aggregate)

88. 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)
89. 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)
90.          

SubPlan (for Index Scan)

91. 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)
92. 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)
93.          

SubPlan (for Index Scan)

94. 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)
95. 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)
96. 0.000 0.000 ↓ 0.0

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

97.          

Initplan (for Result)

98. 0.000 0.000 ↓ 0.0

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

99. 0.000 0.000 ↓ 0.0

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

  • Sort Key: __local_48__.id
100. 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))
101.          

SubPlan (for Aggregate)

102. 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)
103.          

SubPlan (for Index Scan)

104. 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)
105.          

SubPlan (for Index Scan)

106. 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)
107. 0.000 0.000 ↓ 0.0

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

108.          

Initplan (for Result)

109. 0.000 0.000 ↓ 0.0

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

110. 0.000 0.000 ↓ 0.0

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

  • Sort Key: __local_53__.id
111. 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)
112. 0.000 0.000 ↓ 0.0

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

113.          

Initplan (for Result)

114. 0.000 0.000 ↓ 0.0

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

115. 0.000 0.000 ↓ 0.0

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

  • Sort Key: __local_56__.id
116. 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)
117.          

SubPlan (for Aggregate)

118. 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)
119. 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)
120. 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)
121. 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)
122. 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)
123. 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)
124. 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)
125.          

SubPlan (for Index Scan)

126. 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)
127. 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)
128.          

SubPlan (for Index Scan)

129. 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)
130. 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)
131. 0.000 0.000 ↓ 0.0

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

132.          

Initplan (for Result)

133. 0.000 0.000 ↓ 0.0

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

134. 0.000 0.000 ↓ 0.0

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

  • Sort Key: __local_68__.id
135. 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)
136.          

SubPlan (for Aggregate)

137. 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)
138.          

SubPlan (for Index Scan)

139. 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)
140.          

SubPlan (for Index Scan)

141. 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)
142. 0.000 0.000 ↓ 0.0

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

143.          

Initplan (for Result)

144. 0.000 0.000 ↓ 0.0

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

145. 0.000 0.000 ↓ 0.0

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

  • Sort Key: __local_73__.id
146. 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)
147. 0.000 0.000 ↓ 0.0

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

148.          

Initplan (for Result)

149. 0.000 0.000 ↓ 0.0

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

150. 0.000 0.000 ↓ 0.0

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

  • Sort Key: __local_76__.id
151. 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)
152.          

SubPlan (for Aggregate)

153. 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)
154. 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)
155. 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)
156. 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)
157. 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)
158. 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)
159. 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)
160.          

SubPlan (for Index Scan)

161. 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)
162. 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)
163.          

SubPlan (for Index Scan)

164. 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)
165. 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)
166. 0.000 0.000 ↓ 0.0

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

167.          

Initplan (for Result)

168. 0.000 0.000 ↓ 0.0

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

169. 0.000 0.000 ↓ 0.0

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

  • Sort Key: __local_88__.id
170. 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)
171.          

SubPlan (for Aggregate)

172. 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)
173. 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)
174. 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)
175.          

SubPlan (for Index Scan)

176. 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)
177. 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)
178.          

SubPlan (for Index Scan)

179. 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)
180. 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)
181.          

SubPlan (for Index Scan)

182. 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)
183. 0.000 0.000 ↓ 0.0

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

184.          

Initplan (for Result)

185. 0.000 0.000 ↓ 0.0

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

186. 0.000 0.000 ↓ 0.0

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

  • Sort Key: __local_98__.id
187. 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)
188. 0.000 0.000 ↓ 0.0

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

189.          

Initplan (for Result)

190. 0.000 0.000 ↓ 0.0

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

191. 0.000 0.000 ↓ 0.0

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

  • Sort Key: __local_101__.id
192. 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)
193.          

SubPlan (for Aggregate)

194. 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)
195. 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)
196.          

SubPlan (for Index Scan)

197. 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)
198. 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)
199.          

SubPlan (for Index Scan)

200. 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)
201. 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)
202. 0.000 0.000 ↓ 0.0

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

203.          

Initplan (for Result)

204. 0.000 0.000 ↓ 0.0

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

205. 0.000 0.000 ↓ 0.0

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

  • Sort Key: __local_108__.id
206. 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))
207.          

SubPlan (for Aggregate)

208. 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)
209.          

SubPlan (for Index Scan)

210. 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)
211.          

SubPlan (for Index Scan)

212. 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)
213. 0.000 0.000 ↓ 0.0

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

214.          

Initplan (for Result)

215. 0.000 0.000 ↓ 0.0

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

216. 0.000 0.000 ↓ 0.0

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

  • Sort Key: __local_113__.id
217. 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)
218. 0.000 0.000 ↓ 0.0

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

219.          

Initplan (for Result)

220. 0.000 0.000 ↓ 0.0

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

221. 0.000 0.000 ↓ 0.0

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

  • Sort Key: __local_116__.id
222. 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)
223.          

SubPlan (for Aggregate)

224. 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)
225. 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)
226. 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)
227. 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)
228. 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)
229. 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)
230. 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)
231.          

SubPlan (for Index Scan)

232. 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)
233. 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)
234.          

SubPlan (for Index Scan)

235. 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)
236. 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)
237. 0.000 0.000 ↓ 0.0

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

238.          

Initplan (for Result)

239. 0.000 0.000 ↓ 0.0

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

240. 0.000 0.000 ↓ 0.0

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

  • Sort Key: __local_128__.id
241. 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)
242.          

SubPlan (for Aggregate)

243. 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)
244.          

SubPlan (for Index Scan)

245. 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)
246.          

SubPlan (for Index Scan)

247. 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)
248. 0.000 0.000 ↓ 0.0

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

249.          

Initplan (for Result)

250. 0.000 0.000 ↓ 0.0

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

251. 0.000 0.000 ↓ 0.0

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

  • Sort Key: __local_133__.id
252. 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)
253. 0.000 0.000 ↓ 0.0

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

254.          

Initplan (for Result)

255. 0.000 0.000 ↓ 0.0

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

256. 0.000 0.000 ↓ 0.0

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

  • Sort Key: __local_136__.id
257. 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)
258.          

SubPlan (for Aggregate)

259. 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)
260. 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)
261. 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)
262. 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)
263. 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)
264. 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)
265. 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)
266.          

SubPlan (for Index Scan)

267. 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)
268. 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)
269.          

SubPlan (for Index Scan)

270. 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)
271. 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)
272. 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)
273.          

SubPlan (for Seq Scan)

274. 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)
275. 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)
276. 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)
277.          

SubPlan (for Index Scan)

278. 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)
279. 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)
280.          

SubPlan (for Index Scan)

281. 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)
282. 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)
283.          

SubPlan (for Index Scan)

284. 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)
285. 0.000 0.000 ↓ 0.0

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

286.          

Initplan (for Result)

287. 0.000 0.000 ↓ 0.0

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

288. 0.000 0.000 ↓ 0.0

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

  • Sort Key: __local_157__.id
289. 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)
290. 0.000 0.000 ↓ 0.0

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

291.          

Initplan (for Result)

292. 0.000 0.000 ↓ 0.0

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

293. 0.000 0.000 ↓ 0.0

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

  • Sort Key: __local_160__.id
294. 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)
295.          

SubPlan (for Aggregate)

296. 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)
297. 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)
298.          

SubPlan (for Index Scan)

299. 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)
300. 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)
301.          

SubPlan (for Index Scan)

302. 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)
303. 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)
304. 0.000 0.000 ↓ 0.0

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

305.          

Initplan (for Result)

306. 0.000 0.000 ↓ 0.0

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

307. 0.000 0.000 ↓ 0.0

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

  • Sort Key: __local_167__.id
308. 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))
309.          

SubPlan (for Aggregate)

310. 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)
311.          

SubPlan (for Index Scan)

312. 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)
313.          

SubPlan (for Index Scan)

314. 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)
315. 0.000 0.000 ↓ 0.0

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

316.          

Initplan (for Result)

317. 0.000 0.000 ↓ 0.0

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

318. 0.000 0.000 ↓ 0.0

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

  • Sort Key: __local_172__.id
319. 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)
320. 0.000 0.000 ↓ 0.0

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

321.          

Initplan (for Result)

322. 0.000 0.000 ↓ 0.0

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

323. 0.000 0.000 ↓ 0.0

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

  • Sort Key: __local_175__.id
324. 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)
325.          

SubPlan (for Aggregate)

326. 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)
327. 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)
328. 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)
329. 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)
330. 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)
331. 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)
332. 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)
333.          

SubPlan (for Index Scan)

334. 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)
335. 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)
336.          

SubPlan (for Index Scan)

337. 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)
338. 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)
339. 0.000 0.000 ↓ 0.0

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

340.          

Initplan (for Result)

341. 0.000 0.000 ↓ 0.0

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

342. 0.000 0.000 ↓ 0.0

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

  • Sort Key: __local_187__.id
343. 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)
344.          

SubPlan (for Aggregate)

345. 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)
346.          

SubPlan (for Index Scan)

347. 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)
348.          

SubPlan (for Index Scan)

349. 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)
350. 0.000 0.000 ↓ 0.0

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

351.          

Initplan (for Result)

352. 0.000 0.000 ↓ 0.0

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

353. 0.000 0.000 ↓ 0.0

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

  • Sort Key: __local_192__.id
354. 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)
355. 0.000 0.000 ↓ 0.0

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

356.          

Initplan (for Result)

357. 0.000 0.000 ↓ 0.0

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

358. 0.000 0.000 ↓ 0.0

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

  • Sort Key: __local_195__.id
359. 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)
360.          

SubPlan (for Aggregate)

361. 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)
362. 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)
363. 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)
364. 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)
365. 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)
366. 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)
367. 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)
368.          

SubPlan (for Index Scan)

369. 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)
370. 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)
371.          

SubPlan (for Index Scan)

372. 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)
373. 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)
374. 0.000 0.000 ↓ 0.0

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

375.          

Initplan (for Result)

376. 0.000 0.000 ↓ 0.0

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

377. 0.000 0.000 ↓ 0.0

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

  • Sort Key: __local_207__.id
378. 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)
379.          

SubPlan (for Aggregate)

380. 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)
381. 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)
382. 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)
383.          

SubPlan (for Index Scan)

384. 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)
385. 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)
386.          

SubPlan (for Index Scan)

387. 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)
388. 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)
389.          

SubPlan (for Index Scan)

390. 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)
391. 0.000 0.000 ↓ 0.0

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

392.          

Initplan (for Result)

393. 0.000 0.000 ↓ 0.0

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

394. 0.000 0.000 ↓ 0.0

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

  • Sort Key: __local_217__.id
395. 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)
396. 0.000 0.000 ↓ 0.0

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

397.          

Initplan (for Result)

398. 0.000 0.000 ↓ 0.0

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

399. 0.000 0.000 ↓ 0.0

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

  • Sort Key: __local_220__.id
400. 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)
401.          

SubPlan (for Aggregate)

402. 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)
403. 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)
404.          

SubPlan (for Index Scan)

405. 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)
406. 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)
407.          

SubPlan (for Index Scan)

408. 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)
409. 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)
410. 0.000 0.000 ↓ 0.0

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

411.          

Initplan (for Result)

412. 0.000 0.000 ↓ 0.0

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

413. 0.000 0.000 ↓ 0.0

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

  • Sort Key: __local_227__.id
414. 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))
415.          

SubPlan (for Aggregate)

416. 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)
417.          

SubPlan (for Index Scan)

418. 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)
419.          

SubPlan (for Index Scan)

420. 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)
421. 0.000 0.000 ↓ 0.0

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

422.          

Initplan (for Result)

423. 0.000 0.000 ↓ 0.0

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

424. 0.000 0.000 ↓ 0.0

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

  • Sort Key: __local_232__.id
425. 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)
426. 0.000 0.000 ↓ 0.0

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

427.          

Initplan (for Result)

428. 0.000 0.000 ↓ 0.0

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

429. 0.000 0.000 ↓ 0.0

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

  • Sort Key: __local_235__.id
430. 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)
431.          

SubPlan (for Aggregate)

432. 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)
433. 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)
434. 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)
435. 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)
436. 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)
437. 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)
438. 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)
439.          

SubPlan (for Index Scan)

440. 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)
441. 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)
442.          

SubPlan (for Index Scan)

443. 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)
444. 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)
445. 0.000 0.000 ↓ 0.0

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

446.          

Initplan (for Result)

447. 0.000 0.000 ↓ 0.0

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

448. 0.000 0.000 ↓ 0.0

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

  • Sort Key: __local_247__.id
449. 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)
450.          

SubPlan (for Aggregate)

451. 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)
452.          

SubPlan (for Index Scan)

453. 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)
454.          

SubPlan (for Index Scan)

455. 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)
456. 0.000 0.000 ↓ 0.0

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

457.          

Initplan (for Result)

458. 0.000 0.000 ↓ 0.0

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

459. 0.000 0.000 ↓ 0.0

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

  • Sort Key: __local_252__.id
460. 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)
461. 0.000 0.000 ↓ 0.0

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

462.          

Initplan (for Result)

463. 0.000 0.000 ↓ 0.0

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

464. 0.000 0.000 ↓ 0.0

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

  • Sort Key: __local_255__.id
465. 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)
466.          

SubPlan (for Aggregate)

467. 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)
468. 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)
469. 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)
470. 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)
471. 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)
472. 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)
473. 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)
474.          

SubPlan (for Index Scan)

475. 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)
476. 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)
477.          

SubPlan (for Index Scan)

478. 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)
479. 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)
480. 0.000 0.000 ↓ 0.0

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

481.          

Initplan (for Result)

482. 0.000 0.000 ↓ 0.0

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

483. 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
484. 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)
485.          

SubPlan (for Aggregate)

486. 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)
487.          

SubPlan (for Index Scan)

488. 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)
489. 0.000 0.000 ↓ 0.0

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

490.          

Initplan (for Result)

491. 0.000 0.000 ↓ 0.0

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

492. 0.000 0.000 ↓ 0.0

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

  • Sort Key: __local_271__.id
493. 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)
494. 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)
495.          

SubPlan (for Aggregate)

496. 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)
497.          

SubPlan (for Index Scan)

498. 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)
499. 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)
500.          

SubPlan (for Index Scan)

501. 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)
502. 0.000 0.000 ↓ 0.0

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

503.          

Initplan (for Result)

504. 0.000 0.000 ↓ 0.0

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

505. 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
506. 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)
507. 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)
508.          

SubPlan (for Aggregate)

509. 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)
510.          

SubPlan (for Index Scan)

511. 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)