explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 9ANe

Settings
# exclusive inclusive rows x rows loops node
1. 1,419.198 1,498.059 ↑ 1.0 48 1

Subquery Scan on __local_0__ (cost=2.82..395,612.86 rows=48 width=832) (actual time=1,418.191..1,498.059 rows=48 loops=1)

2. 0.078 0.093 ↑ 1.0 48 1

Sort (cost=2.82..2.94 rows=48 width=245) (actual time=0.071..0.093 rows=48 loops=1)

  • Sort Key: __local_0___1.id
  • Sort Method: quicksort Memory: 31kB
3. 0.015 0.015 ↑ 1.0 48 1

Seq Scan on accessions __local_0___1 (cost=0.00..1.48 rows=48 width=245) (actual time=0.010..0.015 rows=48 loops=1)

4.          

SubPlan (for Subquery Scan)

5. 0.096 1.344 ↑ 1.0 1 48

Result (cost=1.64..1.65 rows=1 width=32) (actual time=0.028..0.028 rows=1 loops=48)

6.          

Initplan (for Result)

7. 0.144 1.248 ↑ 1.0 1 48

Aggregate (cost=1.63..1.64 rows=1 width=32) (actual time=0.026..0.026 rows=1 loops=48)

8. 0.384 1.104 ↓ 0.0 0 48

Sort (cost=1.61..1.61 rows=1 width=245) (actual time=0.023..0.023 rows=0 loops=48)

  • Sort Key: __local_2__.id
  • Sort Method: quicksort Memory: 25kB
9. 0.720 0.720 ↓ 0.0 0 48

Seq Scan on accessions __local_2__ (cost=0.00..1.60 rows=1 width=245) (actual time=0.014..0.015 rows=0 loops=48)

  • Filter: (cloned_from_id = __local_0__.id)
  • Rows Removed by Filter: 48
10. 0.480 0.480 ↑ 1.0 1 48

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

  • Index Cond: (id = __local_0__.org_id)
11. 0.048 0.768 ↑ 1.0 1 48

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

12.          

Initplan (for Result)

13. 0.102 0.720 ↑ 1.0 1 48

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

14. 0.384 0.576 ↓ 0.0 0 48

Sort (cost=14.95..14.98 rows=10 width=12) (actual time=0.012..0.012 rows=0 loops=48)

  • Sort Key: __local_5__.id
  • Sort Method: quicksort Memory: 25kB
15. 0.096 0.192 ↓ 0.0 0 48

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

  • Recheck Cond: (accession_id = __local_0__.id)
  • Heap Blocks: exact=2
16. 0.096 0.096 ↓ 0.0 0 48

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

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

SubPlan (for Aggregate)

18. 0.042 0.042 ↑ 1.0 1 2

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

  • Index Cond: (id = __local_5__.org_id)
19. 0.096 2.832 ↑ 1.0 1 48

Result (cost=34.37..34.38 rows=1 width=32) (actual time=0.059..0.059 rows=1 loops=48)

20.          

Initplan (for Result)

21. 0.920 2.736 ↑ 1.0 1 48

Aggregate (cost=34.36..34.37 rows=1 width=32) (actual time=0.057..0.057 rows=1 loops=48)

22. 0.336 0.672 ↑ 1.0 1 48

Sort (cost=1.66..1.66 rows=1 width=98) (actual time=0.014..0.014 rows=1 loops=48)

  • Sort Key: __local_8__.id
  • Sort Method: quicksort Memory: 25kB
23. 0.336 0.336 ↑ 1.0 1 48

Seq Scan on samples __local_8__ (cost=0.00..1.65 rows=1 width=98) (actual time=0.005..0.007 rows=1 loops=48)

  • Filter: (accession_id = __local_0__.id)
  • Rows Removed by Filter: 51
24.          

SubPlan (for Aggregate)

25. 0.364 0.364 ↑ 1.0 1 52

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

  • Index Cond: (value = __local_8__.type_id)
26. 0.312 0.572 ↑ 1.0 1 52

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

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

SubPlan (for Index Scan)

28. 0.260 0.260 ↑ 1.0 1 52

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

  • Index Cond: (value = __local_10__.specimen_type_id)
29. 0.208 0.208 ↑ 1.0 1 52

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

  • Index Cond: (value = __local_8__.transfusion_id)
30. 0.576 0.912 ↑ 1.0 1 48

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

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

SubPlan (for Index Scan)

32. 0.336 0.336 ↑ 1.0 1 48

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

  • Index Cond: (id = __local_13__.org_id)
33. 0.240 0.384 ↓ 0.0 0 48

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

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

SubPlan (for Index Scan)

35. 0.144 0.144 ↑ 1.0 1 24

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

  • Index Cond: (id = __local_15__.org_id)
36. 0.233 6.960 ↓ 0.0 0 48

Seq Scan on panels __local_17__ (cost=0.00..413.89 rows=1 width=32) (actual time=0.145..0.145 rows=0 loops=48)

  • Filter: (__local_0__.panel_id = id)
  • Rows Removed by Filter: 5
37.          

SubPlan (for Seq Scan)

38. 0.021 6.727 ↑ 1.0 1 7

Result (cost=412.81..412.82 rows=1 width=32) (actual time=0.961..0.961 rows=1 loops=7)

39.          

Initplan (for Result)

40. 0.413 6.706 ↑ 1.0 1 7

Aggregate (cost=412.80..412.81 rows=1 width=32) (actual time=0.958..0.958 rows=1 loops=7)

41. 0.119 0.196 ↓ 1.2 13 7

Sort (cost=1.85..1.88 rows=11 width=12) (actual time=0.025..0.028 rows=13 loops=7)

  • Sort Key: __local_26__.id
  • Sort Method: quicksort Memory: 25kB
42. 0.077 0.077 ↓ 1.2 13 7

Seq Scan on panels_tests __local_26__ (cost=0.00..1.66 rows=11 width=12) (actual time=0.007..0.011 rows=13 loops=7)

  • Filter: (panel_id = __local_17__.id)
  • Rows Removed by Filter: 40
43.          

SubPlan (for Aggregate)

44. 1.274 6.097 ↑ 1.0 1 91

Seq Scan on tests __local_19__ (cost=0.00..37.34 rows=1 width=32) (actual time=0.065..0.067 rows=1 loops=91)

  • Filter: (__local_26__.test_id = id)
  • Rows Removed by Filter: 24
45.          

SubPlan (for Seq Scan)

46. 0.000 0.000 ↓ 0.0 0 91

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

  • Index Cond: (id = __local_19__.reference_lab_id)
47. 0.182 1.365 ↑ 1.0 1 91

Result (cost=1.35..1.36 rows=1 width=32) (actual time=0.015..0.015 rows=1 loops=91)

48.          

Initplan (for Result)

49. 0.091 1.183 ↑ 1.0 1 91

Aggregate (cost=1.34..1.35 rows=1 width=32) (actual time=0.013..0.013 rows=1 loops=91)

50. 0.455 1.092 ↓ 0.0 0 91

Sort (cost=1.32..1.33 rows=1 width=314) (actual time=0.012..0.012 rows=0 loops=91)

  • Sort Key: __local_22__.id
  • Sort Method: quicksort Memory: 25kB
51. 0.637 0.637 ↓ 0.0 0 91

Seq Scan on tests __local_22__ (cost=0.00..1.31 rows=1 width=314) (actual time=0.007..0.007 rows=0 loops=91)

  • Filter: (parent_id = __local_19__.id)
  • Rows Removed by Filter: 25
52. 0.091 3.458 ↑ 1.0 1 91

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

53.          

Initplan (for Result)

54. 0.826 3.367 ↑ 1.0 1 91

Aggregate (cost=26.48..26.49 rows=1 width=32) (actual time=0.036..0.037 rows=1 loops=91)

55. 0.546 1.365 ↑ 1.0 3 91

Sort (cost=1.91..1.92 rows=3 width=11) (actual time=0.014..0.015 rows=3 loops=91)

  • Sort Key: __local_25__.id
  • Sort Method: quicksort Memory: 25kB
56. 0.819 0.819 ↑ 1.0 3 91

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

  • Filter: (test_id = __local_19__.id)
  • Rows Removed by Filter: 68
57.          

SubPlan (for Aggregate)

58. 1.176 1.176 ↑ 1.0 1 294

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

  • Index Cond: (value = __local_25__.result)
59. 0.240 61.680 ↑ 1.0 1 48

Result (cost=7,383.19..7,383.20 rows=1 width=32) (actual time=1.282..1.285 rows=1 loops=48)

60.          

Initplan (for Result)

61. 5.787 61.440 ↑ 1.0 1 48

Aggregate (cost=7,383.18..7,383.19 rows=1 width=32) (actual time=1.277..1.280 rows=1 loops=48)

62. 0.576 1.488 ↑ 1.0 3 48

Sort (cost=3.66..3.67 rows=3 width=93) (actual time=0.030..0.031 rows=3 loops=48)

  • Sort Key: __local_28__.id
  • Sort Method: quicksort Memory: 26kB
63. 0.912 0.912 ↑ 1.0 3 48

Seq Scan on test_orders __local_28__ (cost=0.00..3.64 rows=3 width=93) (actual time=0.009..0.019 rows=3 loops=48)

  • Filter: (accession_id = __local_0__.id)
  • Rows Removed by Filter: 154
64.          

SubPlan (for Aggregate)

65. 0.157 0.157 ↓ 0.0 0 157

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

  • Index Cond: (value = __local_28__.initial_result_value)
66. 0.157 0.157 ↓ 0.0 0 157

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

  • Index Cond: (value = __local_28__.final_result_value)
67. 0.310 0.471 ↓ 0.0 0 157

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

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

SubPlan (for Index Scan)

69. 0.161 0.161 ↑ 1.0 1 23

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

  • Index Cond: (id = __local_31__.org_id)
70. 0.199 0.314 ↓ 0.0 0 157

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

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

SubPlan (for Index Scan)

72. 0.115 0.115 ↑ 1.0 1 23

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

  • Index Cond: (id = __local_33__.org_id)
73. 2.355 10.990 ↑ 1.0 1 157

Seq Scan on tests __local_35__ (cost=0.00..37.34 rows=1 width=32) (actual time=0.069..0.070 rows=1 loops=157)

  • Filter: (__local_28__.test_id = id)
  • Rows Removed by Filter: 24
74.          

SubPlan (for Seq Scan)

75. 0.157 0.157 ↓ 0.0 0 157

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

  • Index Cond: (id = __local_35__.reference_lab_id)
76. 0.157 2.512 ↑ 1.0 1 157

Result (cost=1.35..1.36 rows=1 width=32) (actual time=0.016..0.016 rows=1 loops=157)

77.          

Initplan (for Result)

78. 0.314 2.355 ↑ 1.0 1 157

Aggregate (cost=1.34..1.35 rows=1 width=32) (actual time=0.015..0.015 rows=1 loops=157)

79. 0.942 2.041 ↓ 0.0 0 157

Sort (cost=1.32..1.33 rows=1 width=314) (actual time=0.013..0.013 rows=0 loops=157)

  • Sort Key: __local_38__.id
  • Sort Method: quicksort Memory: 25kB
80. 1.099 1.099 ↓ 0.0 0 157

Seq Scan on tests __local_38__ (cost=0.00..1.31 rows=1 width=314) (actual time=0.007..0.007 rows=0 loops=157)

  • Filter: (parent_id = __local_35__.id)
  • Rows Removed by Filter: 25
81. 0.157 5.966 ↑ 1.0 1 157

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

82.          

Initplan (for Result)

83. 1.104 5.809 ↑ 1.0 1 157

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

84. 0.942 2.355 ↑ 1.0 3 157

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

  • Sort Key: __local_41__.id
  • Sort Method: quicksort Memory: 25kB
85. 1.413 1.413 ↑ 1.0 3 157

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

  • Filter: (test_id = __local_35__.id)
  • Rows Removed by Filter: 68
86.          

SubPlan (for Aggregate)

87. 2.350 2.350 ↑ 1.0 1 470

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

  • Index Cond: (value = __local_41__.result)
88. 0.973 1.099 ↓ 0.0 0 157

Seq Scan on samples __local_42__ (cost=0.00..34.33 rows=1 width=32) (actual time=0.007..0.007 rows=0 loops=157)

  • Filter: (__local_28__.sample_id = id)
  • Rows Removed by Filter: 52
89.          

SubPlan (for Seq Scan)

90. 0.030 0.030 ↑ 1.0 1 6

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

  • Index Cond: (value = __local_42__.type_id)
91. 0.042 0.072 ↑ 1.0 1 6

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

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

SubPlan (for Index Scan)

93. 0.030 0.030 ↑ 1.0 1 6

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

  • Index Cond: (value = __local_44__.specimen_type_id)
94. 0.024 0.024 ↑ 1.0 1 6

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

  • Index Cond: (value = __local_42__.transfusion_id)
95. 0.471 33.127 ↑ 1.0 1 157

Result (cost=491.51..491.52 rows=1 width=32) (actual time=0.211..0.211 rows=1 loops=157)

96.          

Initplan (for Result)

97. 3.653 32.656 ↑ 1.0 1 157

Aggregate (cost=491.50..491.51 rows=1 width=32) (actual time=0.208..0.208 rows=1 loops=157)

98. 0.942 6.123 ↑ 1.0 1 157

Sort (cost=4.31..4.32 rows=1 width=91) (actual time=0.039..0.039 rows=1 loops=157)

  • Sort Key: __local_48__.id
  • Sort Method: quicksort Memory: 25kB
99. 5.181 5.181 ↑ 1.0 1 157

Seq Scan on test_order_results __local_48__ (cost=0.00..4.30 rows=1 width=91) (actual time=0.017..0.033 rows=1 loops=157)

  • Filter: ((NOT is_reflex) AND (test_order_id = __local_28__.id))
  • Rows Removed by Filter: 183
100.          

SubPlan (for Aggregate)

101. 1.440 11.840 ↑ 1.0 1 160

Index Scan using test_result_sets_pkey on test_result_sets __local_49__ (cost=0.15..45.51 rows=1 width=32) (actual time=0.073..0.074 rows=1 loops=160)

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

SubPlan (for Index Scan)

103. 2.080 10.400 ↑ 1.0 1 160

Seq Scan on tests __local_50__ (cost=0.00..37.34 rows=1 width=32) (actual time=0.064..0.065 rows=1 loops=160)

  • Filter: (__local_49__.test_id = id)
  • Rows Removed by Filter: 24
104.          

SubPlan (for Seq Scan)

105. 0.160 0.160 ↓ 0.0 0 160

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

  • Index Cond: (id = __local_50__.reference_lab_id)
106. 0.160 2.560 ↑ 1.0 1 160

Result (cost=1.35..1.36 rows=1 width=32) (actual time=0.016..0.016 rows=1 loops=160)

107.          

Initplan (for Result)

108. 0.480 2.400 ↑ 1.0 1 160

Aggregate (cost=1.34..1.35 rows=1 width=32) (actual time=0.015..0.015 rows=1 loops=160)

109. 0.800 1.920 ↓ 0.0 0 160

Sort (cost=1.32..1.33 rows=1 width=314) (actual time=0.012..0.012 rows=0 loops=160)

  • Sort Key: __local_53__.id
  • Sort Method: quicksort Memory: 25kB
110. 1.120 1.120 ↓ 0.0 0 160

Seq Scan on tests __local_53__ (cost=0.00..1.31 rows=1 width=314) (actual time=0.007..0.007 rows=0 loops=160)

  • Filter: (parent_id = __local_50__.id)
  • Rows Removed by Filter: 25
111. 0.160 5.600 ↑ 1.0 1 160

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

112.          

Initplan (for Result)

113. 1.364 5.440 ↑ 1.0 1 160

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

114. 0.960 2.240 ↑ 1.0 3 160

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

  • Sort Key: __local_56__.id
  • Sort Method: quicksort Memory: 25kB
115. 1.280 1.280 ↑ 1.0 3 160

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

  • Filter: (test_id = __local_50__.id)
  • Rows Removed by Filter: 68
116.          

SubPlan (for Aggregate)

117. 1.836 1.836 ↑ 1.0 1 459

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

  • Index Cond: (value = __local_56__.result)
118. 0.160 0.160 ↓ 0.0 0 160

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

  • Index Cond: (value = __local_48__.result_1_id)
119. 0.160 0.160 ↓ 0.0 0 160

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

  • Index Cond: (id = __local_48__.result_1_by_id)
120. 0.160 0.160 ↓ 0.0 0 160

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

  • Index Cond: (value = __local_48__.result_2_id)
121. 0.000 0.000 ↓ 0.0 0 160

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

  • Index Cond: (id = __local_48__.result_2_by_id)
122. 0.160 0.160 ↓ 0.0 0 160

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

  • Index Cond: (value = __local_48__.result_final_id)
123. 0.994 1.120 ↓ 0.0 0 160

Seq Scan on samples __local_62__ (cost=0.00..34.33 rows=1 width=32) (actual time=0.007..0.007 rows=0 loops=160)

  • Filter: (__local_48__.sample_id = id)
  • Rows Removed by Filter: 52
124.          

SubPlan (for Seq Scan)

125. 0.030 0.030 ↑ 1.0 1 6

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

  • Index Cond: (value = __local_62__.type_id)
126. 0.042 0.072 ↑ 1.0 1 6

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

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

SubPlan (for Index Scan)

128. 0.030 0.030 ↑ 1.0 1 6

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

  • Index Cond: (value = __local_64__.specimen_type_id)
129. 0.024 0.024 ↑ 1.0 1 6

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

  • Index Cond: (value = __local_62__.transfusion_id)
130. 0.480 9.280 ↑ 1.0 1 160

Result (cost=366.46..366.47 rows=1 width=32) (actual time=0.058..0.058 rows=1 loops=160)

131.          

Initplan (for Result)

132. 0.712 8.800 ↑ 1.0 1 160

Aggregate (cost=366.45..366.46 rows=1 width=32) (actual time=0.055..0.055 rows=1 loops=160)

133. 0.960 5.760 ↓ 0.0 0 160

Sort (cost=4.32..4.33 rows=3 width=91) (actual time=0.036..0.036 rows=0 loops=160)

  • Sort Key: __local_68__.id
  • Sort Method: quicksort Memory: 25kB
134. 4.800 4.800 ↓ 0.0 0 160

Seq Scan on test_order_results __local_68__ (cost=0.00..4.30 rows=3 width=91) (actual time=0.030..0.030 rows=0 loops=160)

  • Filter: (parent_result_id = __local_48__.id)
  • Rows Removed by Filter: 184
135.          

SubPlan (for Aggregate)

136. 0.216 1.968 ↑ 1.0 1 24

Index Scan using test_result_sets_pkey on test_result_sets __local_69__ (cost=0.15..45.51 rows=1 width=32) (actual time=0.081..0.082 rows=1 loops=24)

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

SubPlan (for Index Scan)

138. 0.408 1.752 ↑ 1.0 1 24

Seq Scan on tests __local_70__ (cost=0.00..37.34 rows=1 width=32) (actual time=0.071..0.073 rows=1 loops=24)

  • Filter: (__local_69__.test_id = id)
  • Rows Removed by Filter: 24
139.          

SubPlan (for Seq Scan)

140. 0.000 0.000 ↓ 0.0 0 24

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

  • Index Cond: (id = __local_70__.reference_lab_id)
141. 0.048 0.384 ↑ 1.0 1 24

Result (cost=1.35..1.36 rows=1 width=32) (actual time=0.016..0.016 rows=1 loops=24)

142.          

Initplan (for Result)

143. 0.024 0.336 ↑ 1.0 1 24

Aggregate (cost=1.34..1.35 rows=1 width=32) (actual time=0.014..0.014 rows=1 loops=24)

144. 0.144 0.312 ↓ 0.0 0 24

Sort (cost=1.32..1.33 rows=1 width=314) (actual time=0.013..0.013 rows=0 loops=24)

  • Sort Key: __local_73__.id
  • Sort Method: quicksort Memory: 25kB
145. 0.168 0.168 ↓ 0.0 0 24

Seq Scan on tests __local_73__ (cost=0.00..1.31 rows=1 width=314) (actual time=0.007..0.007 rows=0 loops=24)

  • Filter: (parent_id = __local_70__.id)
  • Rows Removed by Filter: 25
146. 0.024 0.960 ↑ 1.0 1 24

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

147.          

Initplan (for Result)

148. 0.248 0.936 ↑ 1.0 1 24

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

149. 0.144 0.360 ↑ 1.0 3 24

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

  • Sort Key: __local_76__.id
  • Sort Method: quicksort Memory: 25kB
150. 0.216 0.216 ↑ 1.0 3 24

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

  • Filter: (test_id = __local_70__.id)
  • Rows Removed by Filter: 68
151.          

SubPlan (for Aggregate)

152. 0.328 0.328 ↑ 1.0 1 82

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

  • Index Cond: (value = __local_76__.result)
153. 0.072 0.072 ↑ 1.0 1 24

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

  • Index Cond: (value = __local_68__.result_1_id)
154. 0.000 0.000 ↓ 0.0 0 24

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

  • Index Cond: (id = __local_68__.result_1_by_id)
155. 0.072 0.072 ↑ 1.0 1 24

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

  • Index Cond: (value = __local_68__.result_2_id)
156. 0.000 0.000 ↓ 0.0 0 24

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

  • Index Cond: (id = __local_68__.result_2_by_id)
157. 0.072 0.072 ↑ 1.0 1 24

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

  • Index Cond: (value = __local_68__.result_final_id)
158. 0.144 0.144 ↓ 0.0 0 24

Seq Scan on samples __local_82__ (cost=0.00..34.33 rows=1 width=32) (actual time=0.006..0.006 rows=0 loops=24)

  • Filter: (__local_68__.sample_id = id)
  • Rows Removed by Filter: 52
159.          

SubPlan (for Seq Scan)

160. 0.000 0.000 ↓ 0.0 0

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

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

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

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

SubPlan (for Index Scan)

163. 0.000 0.000 ↓ 0.0 0

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

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

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

  • Index Cond: (value = __local_82__.transfusion_id)
165. 0.314 5.495 ↑ 1.0 1 157

Result (cost=615.88..615.89 rows=1 width=32) (actual time=0.035..0.035 rows=1 loops=157)

166.          

Initplan (for Result)

167. 0.314 5.181 ↑ 1.0 1 157

Aggregate (cost=615.87..615.88 rows=1 width=32) (actual time=0.032..0.033 rows=1 loops=157)

168. 0.942 4.867 ↓ 0.0 0 157

Sort (cost=3.65..3.65 rows=1 width=93) (actual time=0.031..0.031 rows=0 loops=157)

  • Sort Key: __local_88__.id
  • Sort Method: quicksort Memory: 25kB
169. 3.925 3.925 ↓ 0.0 0 157

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

  • Filter: (original_order_id = __local_28__.id)
  • Rows Removed by Filter: 157
170.          

SubPlan (for Aggregate)

171. 0.000 0.000 ↓ 0.0 0

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

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

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

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

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

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

SubPlan (for Index Scan)

175. 0.000 0.000 ↓ 0.0 0

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

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

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

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

SubPlan (for Index Scan)

178. 0.000 0.000 ↓ 0.0 0

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

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

Seq Scan on tests __local_95__ (cost=0.00..37.34 rows=1 width=32) (never executed)

  • Filter: (__local_88__.test_id = id)
180.          

SubPlan (for Seq Scan)

181. 0.000 0.000 ↓ 0.0 0

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

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

Result (cost=1.35..1.36 rows=1 width=32) (never executed)

183.          

Initplan (for Result)

184. 0.000 0.000 ↓ 0.0 0

Aggregate (cost=1.34..1.35 rows=1 width=32) (never executed)

185. 0.000 0.000 ↓ 0.0 0

Sort (cost=1.32..1.33 rows=1 width=314) (never executed)

  • Sort Key: __local_98__.id
186. 0.000 0.000 ↓ 0.0 0

Seq Scan on tests __local_98__ (cost=0.00..1.31 rows=1 width=314) (never executed)

  • Filter: (parent_id = __local_95__.id)
187. 0.000 0.000 ↓ 0.0 0

Result (cost=26.49..26.50 rows=1 width=32) (never executed)

188.          

Initplan (for Result)

189. 0.000 0.000 ↓ 0.0 0

Aggregate (cost=26.48..26.49 rows=1 width=32) (never executed)

190. 0.000 0.000 ↓ 0.0 0

Sort (cost=1.91..1.92 rows=3 width=11) (never executed)

  • Sort Key: __local_101__.id
191. 0.000 0.000 ↓ 0.0 0

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

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

SubPlan (for Aggregate)

193. 0.000 0.000 ↓ 0.0 0

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

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

Seq Scan on samples __local_102__ (cost=0.00..34.33 rows=1 width=32) (never executed)

  • Filter: (__local_88__.sample_id = id)
195.          

SubPlan (for Seq Scan)

196. 0.000 0.000 ↓ 0.0 0

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

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

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

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

SubPlan (for Index Scan)

199. 0.000 0.000 ↓ 0.0 0

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

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

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

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

Result (cost=491.51..491.52 rows=1 width=32) (never executed)

202.          

Initplan (for Result)

203. 0.000 0.000 ↓ 0.0 0

Aggregate (cost=491.50..491.51 rows=1 width=32) (never executed)

204. 0.000 0.000 ↓ 0.0 0

Sort (cost=4.31..4.32 rows=1 width=91) (never executed)

  • Sort Key: __local_108__.id
205. 0.000 0.000 ↓ 0.0 0

Seq Scan on test_order_results __local_108__ (cost=0.00..4.30 rows=1 width=91) (never executed)

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

SubPlan (for Aggregate)

207. 0.000 0.000 ↓ 0.0 0

Index Scan using test_result_sets_pkey on test_result_sets __local_109__ (cost=0.15..45.51 rows=1 width=32) (never executed)

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

SubPlan (for Index Scan)

209. 0.000 0.000 ↓ 0.0 0

Seq Scan on tests __local_110__ (cost=0.00..37.34 rows=1 width=32) (never executed)

  • Filter: (__local_109__.test_id = id)
210.          

SubPlan (for Seq Scan)

211. 0.000 0.000 ↓ 0.0 0

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

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

Result (cost=1.35..1.36 rows=1 width=32) (never executed)

213.          

Initplan (for Result)

214. 0.000 0.000 ↓ 0.0 0

Aggregate (cost=1.34..1.35 rows=1 width=32) (never executed)

215. 0.000 0.000 ↓ 0.0 0

Sort (cost=1.32..1.33 rows=1 width=314) (never executed)

  • Sort Key: __local_113__.id
216. 0.000 0.000 ↓ 0.0 0

Seq Scan on tests __local_113__ (cost=0.00..1.31 rows=1 width=314) (never executed)

  • Filter: (parent_id = __local_110__.id)
217. 0.000 0.000 ↓ 0.0 0

Result (cost=26.49..26.50 rows=1 width=32) (never executed)

218.          

Initplan (for Result)

219. 0.000 0.000 ↓ 0.0 0

Aggregate (cost=26.48..26.49 rows=1 width=32) (never executed)

220. 0.000 0.000 ↓ 0.0 0

Sort (cost=1.91..1.92 rows=3 width=11) (never executed)

  • Sort Key: __local_116__.id
221. 0.000 0.000 ↓ 0.0 0

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

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

SubPlan (for Aggregate)

223. 0.000 0.000 ↓ 0.0 0

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

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

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

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

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

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

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

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

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

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

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

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

Seq Scan on samples __local_122__ (cost=0.00..34.33 rows=1 width=32) (never executed)

  • Filter: (__local_108__.sample_id = id)
230.          

SubPlan (for Seq Scan)

231. 0.000 0.000 ↓ 0.0 0

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

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

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

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

SubPlan (for Index Scan)

234. 0.000 0.000 ↓ 0.0 0

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

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

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

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

Result (cost=366.46..366.47 rows=1 width=32) (never executed)

237.          

Initplan (for Result)

238. 0.000 0.000 ↓ 0.0 0

Aggregate (cost=366.45..366.46 rows=1 width=32) (never executed)

239. 0.000 0.000 ↓ 0.0 0

Sort (cost=4.32..4.33 rows=3 width=91) (never executed)

  • Sort Key: __local_128__.id
240. 0.000 0.000 ↓ 0.0 0

Seq Scan on test_order_results __local_128__ (cost=0.00..4.30 rows=3 width=91) (never executed)

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

SubPlan (for Aggregate)

242. 0.000 0.000 ↓ 0.0 0

Index Scan using test_result_sets_pkey on test_result_sets __local_129__ (cost=0.15..45.51 rows=1 width=32) (never executed)

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

SubPlan (for Index Scan)

244. 0.000 0.000 ↓ 0.0 0

Seq Scan on tests __local_130__ (cost=0.00..37.34 rows=1 width=32) (never executed)

  • Filter: (__local_129__.test_id = id)
245.          

SubPlan (for Seq Scan)

246. 0.000 0.000 ↓ 0.0 0

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

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

Result (cost=1.35..1.36 rows=1 width=32) (never executed)

248.          

Initplan (for Result)

249. 0.000 0.000 ↓ 0.0 0

Aggregate (cost=1.34..1.35 rows=1 width=32) (never executed)

250. 0.000 0.000 ↓ 0.0 0

Sort (cost=1.32..1.33 rows=1 width=314) (never executed)

  • Sort Key: __local_133__.id
251. 0.000 0.000 ↓ 0.0 0

Seq Scan on tests __local_133__ (cost=0.00..1.31 rows=1 width=314) (never executed)

  • Filter: (parent_id = __local_130__.id)
252. 0.000 0.000 ↓ 0.0 0

Result (cost=26.49..26.50 rows=1 width=32) (never executed)

253.          

Initplan (for Result)

254. 0.000 0.000 ↓ 0.0 0

Aggregate (cost=26.48..26.49 rows=1 width=32) (never executed)

255. 0.000 0.000 ↓ 0.0 0

Sort (cost=1.91..1.92 rows=3 width=11) (never executed)

  • Sort Key: __local_136__.id
256. 0.000 0.000 ↓ 0.0 0

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

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

SubPlan (for Aggregate)

258. 0.000 0.000 ↓ 0.0 0

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

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

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

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

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

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

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

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

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

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

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

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

Seq Scan on samples __local_142__ (cost=0.00..34.33 rows=1 width=32) (never executed)

  • Filter: (__local_128__.sample_id = id)
265.          

SubPlan (for Seq Scan)

266. 0.000 0.000 ↓ 0.0 0

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

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

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

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

SubPlan (for Index Scan)

269. 0.000 0.000 ↓ 0.0 0

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

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

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

  • Index Cond: (value = __local_142__.transfusion_id)
271. 2.355 2.355 ↓ 0.0 0 157

Seq Scan on test_orders __local_147__ (cost=0.00..1,231.73 rows=1 width=32) (actual time=0.014..0.015 rows=0 loops=157)

  • Filter: (__local_28__.original_order_id = id)
  • Rows Removed by Filter: 157
272.          

SubPlan (for Seq Scan)

273. 0.000 0.000 ↓ 0.0 0

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

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

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

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

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

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

SubPlan (for Index Scan)

277. 0.000 0.000 ↓ 0.0 0

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

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

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

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

SubPlan (for Index Scan)

280. 0.000 0.000 ↓ 0.0 0

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

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

Seq Scan on tests __local_154__ (cost=0.00..37.34 rows=1 width=32) (never executed)

  • Filter: (__local_147__.test_id = id)
282.          

SubPlan (for Seq Scan)

283. 0.000 0.000 ↓ 0.0 0

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

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

Result (cost=1.35..1.36 rows=1 width=32) (never executed)

285.          

Initplan (for Result)

286. 0.000 0.000 ↓ 0.0 0

Aggregate (cost=1.34..1.35 rows=1 width=32) (never executed)

287. 0.000 0.000 ↓ 0.0 0

Sort (cost=1.32..1.33 rows=1 width=314) (never executed)

  • Sort Key: __local_157__.id
288. 0.000 0.000 ↓ 0.0 0

Seq Scan on tests __local_157__ (cost=0.00..1.31 rows=1 width=314) (never executed)

  • Filter: (parent_id = __local_154__.id)
289. 0.000 0.000 ↓ 0.0 0

Result (cost=26.49..26.50 rows=1 width=32) (never executed)

290.          

Initplan (for Result)

291. 0.000 0.000 ↓ 0.0 0

Aggregate (cost=26.48..26.49 rows=1 width=32) (never executed)

292. 0.000 0.000 ↓ 0.0 0

Sort (cost=1.91..1.92 rows=3 width=11) (never executed)

  • Sort Key: __local_160__.id
293. 0.000 0.000 ↓ 0.0 0

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

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

SubPlan (for Aggregate)

295. 0.000 0.000 ↓ 0.0 0

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

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

Seq Scan on samples __local_161__ (cost=0.00..34.33 rows=1 width=32) (never executed)

  • Filter: (__local_147__.sample_id = id)
297.          

SubPlan (for Seq Scan)

298. 0.000 0.000 ↓ 0.0 0

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

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

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

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

SubPlan (for Index Scan)

301. 0.000 0.000 ↓ 0.0 0

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

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

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

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

Result (cost=491.51..491.52 rows=1 width=32) (never executed)

304.          

Initplan (for Result)

305. 0.000 0.000 ↓ 0.0 0

Aggregate (cost=491.50..491.51 rows=1 width=32) (never executed)

306. 0.000 0.000 ↓ 0.0 0

Sort (cost=4.31..4.32 rows=1 width=91) (never executed)

  • Sort Key: __local_167__.id
307. 0.000 0.000 ↓ 0.0 0

Seq Scan on test_order_results __local_167__ (cost=0.00..4.30 rows=1 width=91) (never executed)

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

SubPlan (for Aggregate)

309. 0.000 0.000 ↓ 0.0 0

Index Scan using test_result_sets_pkey on test_result_sets __local_168__ (cost=0.15..45.51 rows=1 width=32) (never executed)

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

SubPlan (for Index Scan)

311. 0.000 0.000 ↓ 0.0 0

Seq Scan on tests __local_169__ (cost=0.00..37.34 rows=1 width=32) (never executed)

  • Filter: (__local_168__.test_id = id)
312.          

SubPlan (for Seq Scan)

313. 0.000 0.000 ↓ 0.0 0

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

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

Result (cost=1.35..1.36 rows=1 width=32) (never executed)

315.          

Initplan (for Result)

316. 0.000 0.000 ↓ 0.0 0

Aggregate (cost=1.34..1.35 rows=1 width=32) (never executed)

317. 0.000 0.000 ↓ 0.0 0

Sort (cost=1.32..1.33 rows=1 width=314) (never executed)

  • Sort Key: __local_172__.id
318. 0.000 0.000 ↓ 0.0 0

Seq Scan on tests __local_172__ (cost=0.00..1.31 rows=1 width=314) (never executed)

  • Filter: (parent_id = __local_169__.id)
319. 0.000 0.000 ↓ 0.0 0

Result (cost=26.49..26.50 rows=1 width=32) (never executed)

320.          

Initplan (for Result)

321. 0.000 0.000 ↓ 0.0 0

Aggregate (cost=26.48..26.49 rows=1 width=32) (never executed)

322. 0.000 0.000 ↓ 0.0 0

Sort (cost=1.91..1.92 rows=3 width=11) (never executed)

  • Sort Key: __local_175__.id
323. 0.000 0.000 ↓ 0.0 0

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

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

SubPlan (for Aggregate)

325. 0.000 0.000 ↓ 0.0 0

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

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

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

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

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

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

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

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

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

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

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

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

Seq Scan on samples __local_181__ (cost=0.00..34.33 rows=1 width=32) (never executed)

  • Filter: (__local_167__.sample_id = id)
332.          

SubPlan (for Seq Scan)

333. 0.000 0.000 ↓ 0.0 0

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

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

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

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

SubPlan (for Index Scan)

336. 0.000 0.000 ↓ 0.0 0

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

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

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

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

Result (cost=366.46..366.47 rows=1 width=32) (never executed)

339.          

Initplan (for Result)

340. 0.000 0.000 ↓ 0.0 0

Aggregate (cost=366.45..366.46 rows=1 width=32) (never executed)

341. 0.000 0.000 ↓ 0.0 0

Sort (cost=4.32..4.33 rows=3 width=91) (never executed)

  • Sort Key: __local_187__.id
342. 0.000 0.000 ↓ 0.0 0

Seq Scan on test_order_results __local_187__ (cost=0.00..4.30 rows=3 width=91) (never executed)

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

SubPlan (for Aggregate)

344. 0.000 0.000 ↓ 0.0 0

Index Scan using test_result_sets_pkey on test_result_sets __local_188__ (cost=0.15..45.51 rows=1 width=32) (never executed)

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

SubPlan (for Index Scan)

346. 0.000 0.000 ↓ 0.0 0

Seq Scan on tests __local_189__ (cost=0.00..37.34 rows=1 width=32) (never executed)

  • Filter: (__local_188__.test_id = id)
347.          

SubPlan (for Seq Scan)

348. 0.000 0.000 ↓ 0.0 0

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

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

Result (cost=1.35..1.36 rows=1 width=32) (never executed)

350.          

Initplan (for Result)

351. 0.000 0.000 ↓ 0.0 0

Aggregate (cost=1.34..1.35 rows=1 width=32) (never executed)

352. 0.000 0.000 ↓ 0.0 0

Sort (cost=1.32..1.33 rows=1 width=314) (never executed)

  • Sort Key: __local_192__.id
353. 0.000 0.000 ↓ 0.0 0

Seq Scan on tests __local_192__ (cost=0.00..1.31 rows=1 width=314) (never executed)

  • Filter: (parent_id = __local_189__.id)
354. 0.000 0.000 ↓ 0.0 0

Result (cost=26.49..26.50 rows=1 width=32) (never executed)

355.          

Initplan (for Result)

356. 0.000 0.000 ↓ 0.0 0

Aggregate (cost=26.48..26.49 rows=1 width=32) (never executed)

357. 0.000 0.000 ↓ 0.0 0

Sort (cost=1.91..1.92 rows=3 width=11) (never executed)

  • Sort Key: __local_195__.id
358. 0.000 0.000 ↓ 0.0 0

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

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

SubPlan (for Aggregate)

360. 0.000 0.000 ↓ 0.0 0

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

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

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

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

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

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

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

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

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

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

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

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

Seq Scan on samples __local_201__ (cost=0.00..34.33 rows=1 width=32) (never executed)

  • Filter: (__local_187__.sample_id = id)
367.          

SubPlan (for Seq Scan)

368. 0.000 0.000 ↓ 0.0 0

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

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

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

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

SubPlan (for Index Scan)

371. 0.000 0.000 ↓ 0.0 0

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

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

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

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

Result (cost=615.88..615.89 rows=1 width=32) (never executed)

374.          

Initplan (for Result)

375. 0.000 0.000 ↓ 0.0 0

Aggregate (cost=615.87..615.88 rows=1 width=32) (never executed)

376. 0.000 0.000 ↓ 0.0 0

Sort (cost=3.65..3.65 rows=1 width=93) (never executed)

  • Sort Key: __local_207__.id
377. 0.000 0.000 ↓ 0.0 0

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

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

SubPlan (for Aggregate)

379. 0.000 0.000 ↓ 0.0 0

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

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

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

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

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

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

SubPlan (for Index Scan)

383. 0.000 0.000 ↓ 0.0 0

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

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

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

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

SubPlan (for Index Scan)

386. 0.000 0.000 ↓ 0.0 0

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

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

Seq Scan on tests __local_214__ (cost=0.00..37.34 rows=1 width=32) (never executed)

  • Filter: (__local_207__.test_id = id)
388.          

SubPlan (for Seq Scan)

389. 0.000 0.000 ↓ 0.0 0

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

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

Result (cost=1.35..1.36 rows=1 width=32) (never executed)

391.          

Initplan (for Result)

392. 0.000 0.000 ↓ 0.0 0

Aggregate (cost=1.34..1.35 rows=1 width=32) (never executed)

393. 0.000 0.000 ↓ 0.0 0

Sort (cost=1.32..1.33 rows=1 width=314) (never executed)

  • Sort Key: __local_217__.id
394. 0.000 0.000 ↓ 0.0 0

Seq Scan on tests __local_217__ (cost=0.00..1.31 rows=1 width=314) (never executed)

  • Filter: (parent_id = __local_214__.id)
395. 0.000 0.000 ↓ 0.0 0

Result (cost=26.49..26.50 rows=1 width=32) (never executed)

396.          

Initplan (for Result)

397. 0.000 0.000 ↓ 0.0 0

Aggregate (cost=26.48..26.49 rows=1 width=32) (never executed)

398. 0.000 0.000 ↓ 0.0 0

Sort (cost=1.91..1.92 rows=3 width=11) (never executed)

  • Sort Key: __local_220__.id
399. 0.000 0.000 ↓ 0.0 0

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

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

SubPlan (for Aggregate)

401. 0.000 0.000 ↓ 0.0 0

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

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

Seq Scan on samples __local_221__ (cost=0.00..34.33 rows=1 width=32) (never executed)

  • Filter: (__local_207__.sample_id = id)
403.          

SubPlan (for Seq Scan)

404. 0.000 0.000 ↓ 0.0 0

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

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

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

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

SubPlan (for Index Scan)

407. 0.000 0.000 ↓ 0.0 0

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

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

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

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

Result (cost=491.51..491.52 rows=1 width=32) (never executed)

410.          

Initplan (for Result)

411. 0.000 0.000 ↓ 0.0 0

Aggregate (cost=491.50..491.51 rows=1 width=32) (never executed)

412. 0.000 0.000 ↓ 0.0 0

Sort (cost=4.31..4.32 rows=1 width=91) (never executed)

  • Sort Key: __local_227__.id
413. 0.000 0.000 ↓ 0.0 0

Seq Scan on test_order_results __local_227__ (cost=0.00..4.30 rows=1 width=91) (never executed)

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

SubPlan (for Aggregate)

415. 0.000 0.000 ↓ 0.0 0

Index Scan using test_result_sets_pkey on test_result_sets __local_228__ (cost=0.15..45.51 rows=1 width=32) (never executed)

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

SubPlan (for Index Scan)

417. 0.000 0.000 ↓ 0.0 0

Seq Scan on tests __local_229__ (cost=0.00..37.34 rows=1 width=32) (never executed)

  • Filter: (__local_228__.test_id = id)
418.          

SubPlan (for Seq Scan)

419. 0.000 0.000 ↓ 0.0 0

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

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

Result (cost=1.35..1.36 rows=1 width=32) (never executed)

421.          

Initplan (for Result)

422. 0.000 0.000 ↓ 0.0 0

Aggregate (cost=1.34..1.35 rows=1 width=32) (never executed)

423. 0.000 0.000 ↓ 0.0 0

Sort (cost=1.32..1.33 rows=1 width=314) (never executed)

  • Sort Key: __local_232__.id
424. 0.000 0.000 ↓ 0.0 0

Seq Scan on tests __local_232__ (cost=0.00..1.31 rows=1 width=314) (never executed)

  • Filter: (parent_id = __local_229__.id)
425. 0.000 0.000 ↓ 0.0 0

Result (cost=26.49..26.50 rows=1 width=32) (never executed)

426.          

Initplan (for Result)

427. 0.000 0.000 ↓ 0.0 0

Aggregate (cost=26.48..26.49 rows=1 width=32) (never executed)

428. 0.000 0.000 ↓ 0.0 0

Sort (cost=1.91..1.92 rows=3 width=11) (never executed)

  • Sort Key: __local_235__.id
429. 0.000 0.000 ↓ 0.0 0

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

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

SubPlan (for Aggregate)

431. 0.000 0.000 ↓ 0.0 0

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

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

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

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

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

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

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

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

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

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

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

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

Seq Scan on samples __local_241__ (cost=0.00..34.33 rows=1 width=32) (never executed)

  • Filter: (__local_227__.sample_id = id)
438.          

SubPlan (for Seq Scan)

439. 0.000 0.000 ↓ 0.0 0

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

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

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

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

SubPlan (for Index Scan)

442. 0.000 0.000 ↓ 0.0 0

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

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

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

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

Result (cost=366.46..366.47 rows=1 width=32) (never executed)

445.          

Initplan (for Result)

446. 0.000 0.000 ↓ 0.0 0

Aggregate (cost=366.45..366.46 rows=1 width=32) (never executed)

447. 0.000 0.000 ↓ 0.0 0

Sort (cost=4.32..4.33 rows=3 width=91) (never executed)

  • Sort Key: __local_247__.id
448. 0.000 0.000 ↓ 0.0 0

Seq Scan on test_order_results __local_247__ (cost=0.00..4.30 rows=3 width=91) (never executed)

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

SubPlan (for Aggregate)

450. 0.000 0.000 ↓ 0.0 0

Index Scan using test_result_sets_pkey on test_result_sets __local_248__ (cost=0.15..45.51 rows=1 width=32) (never executed)

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

SubPlan (for Index Scan)

452. 0.000 0.000 ↓ 0.0 0

Seq Scan on tests __local_249__ (cost=0.00..37.34 rows=1 width=32) (never executed)

  • Filter: (__local_248__.test_id = id)
453.          

SubPlan (for Seq Scan)

454. 0.000 0.000 ↓ 0.0 0

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

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

Result (cost=1.35..1.36 rows=1 width=32) (never executed)

456.          

Initplan (for Result)

457. 0.000 0.000 ↓ 0.0 0

Aggregate (cost=1.34..1.35 rows=1 width=32) (never executed)

458. 0.000 0.000 ↓ 0.0 0

Sort (cost=1.32..1.33 rows=1 width=314) (never executed)

  • Sort Key: __local_252__.id
459. 0.000 0.000 ↓ 0.0 0

Seq Scan on tests __local_252__ (cost=0.00..1.31 rows=1 width=314) (never executed)

  • Filter: (parent_id = __local_249__.id)
460. 0.000 0.000 ↓ 0.0 0

Result (cost=26.49..26.50 rows=1 width=32) (never executed)

461.          

Initplan (for Result)

462. 0.000 0.000 ↓ 0.0 0

Aggregate (cost=26.48..26.49 rows=1 width=32) (never executed)

463. 0.000 0.000 ↓ 0.0 0

Sort (cost=1.91..1.92 rows=3 width=11) (never executed)

  • Sort Key: __local_255__.id
464. 0.000 0.000 ↓ 0.0 0

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

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

SubPlan (for Aggregate)

466. 0.000 0.000 ↓ 0.0 0

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

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

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

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

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

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

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

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

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

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

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

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

Seq Scan on samples __local_261__ (cost=0.00..34.33 rows=1 width=32) (never executed)

  • Filter: (__local_247__.sample_id = id)
473.          

SubPlan (for Seq Scan)

474. 0.000 0.000 ↓ 0.0 0

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

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

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

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

SubPlan (for Index Scan)

477. 0.000 0.000 ↓ 0.0 0

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

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

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

  • Index Cond: (value = __local_261__.transfusion_id)
479. 0.096 1.968 ↑ 1.0 1 48

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

480.          

Initplan (for Result)

481. 0.328 1.872 ↑ 1.0 1 48

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

482. 0.480 0.816 ↑ 4.0 1 48

Sort (cost=1.69..1.70 rows=4 width=65) (actual time=0.016..0.017 rows=1 loops=48)

  • Sort Key: __local_267__.id
  • Sort Method: quicksort Memory: 25kB
483. 0.336 0.336 ↑ 4.0 1 48

Seq Scan on reports __local_267__ (cost=0.00..1.65 rows=4 width=65) (actual time=0.006..0.007 rows=1 loops=48)

  • Filter: (accession_id = __local_0__.id)
  • Rows Removed by Filter: 51
484.          

SubPlan (for Aggregate)

485. 0.416 0.728 ↑ 1.0 1 52

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

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

SubPlan (for Index Scan)

487. 0.312 0.312 ↑ 1.0 1 52

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

  • Index Cond: (id = __local_268__.org_id)
488. 0.096 0.768 ↑ 1.0 1 48

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

489.          

Initplan (for Result)

490. 0.108 0.672 ↑ 1.0 1 48

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

491. 0.240 0.480 ↓ 0.0 0 48

Sort (cost=11.31..11.31 rows=3 width=101) (actual time=0.010..0.010 rows=0 loops=48)

  • Sort Key: __local_271__.id
  • Sort Method: quicksort Memory: 25kB
492. 0.096 0.240 ↓ 0.0 0 48

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

  • Recheck Cond: (accession_id = __local_0__.id)
  • Heap Blocks: exact=2
493. 0.144 0.144 ↓ 0.0 0 48

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

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

SubPlan (for Aggregate)

495. 0.028 0.048 ↑ 1.0 1 2

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

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

SubPlan (for Index Scan)

497. 0.020 0.020 ↑ 1.0 1 2

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

  • Index Cond: (id = __local_272__.org_id)
498. 0.020 0.036 ↑ 1.0 1 2

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

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

SubPlan (for Index Scan)

500. 0.016 0.016 ↑ 1.0 1 2

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

  • Index Cond: (id = __local_274__.org_id)
501. 0.048 0.672 ↑ 1.0 1 48

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

502.          

Initplan (for Result)

503. 0.132 0.624 ↑ 1.0 1 48

Aggregate (cost=94.48..94.49 rows=1 width=32) (actual time=0.012..0.013 rows=1 loops=48)

504. 0.240 0.432 ↓ 0.0 0 48

Sort (cost=12.72..12.73 rows=5 width=52) (actual time=0.009..0.009 rows=0 loops=48)

  • Sort Key: __local_277__.id
  • Sort Method: quicksort Memory: 25kB
505. 0.096 0.192 ↓ 0.0 0 48

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

  • Recheck Cond: (accession_id = __local_0__.id)
  • Heap Blocks: exact=1
506. 0.096 0.096 ↓ 0.0 0 48

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

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

SubPlan (for Aggregate)

508. 0.035 0.060 ↑ 1.0 1 1

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

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

SubPlan (for Index Scan)

510. 0.025 0.025 ↑ 1.0 1 1

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

  • Index Cond: (id = __local_278__.org_id)