explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 8TIN

Settings
# exclusive inclusive rows x rows loops node
1. 1,401.936 1,456.918 ↑ 1.0 46 1

Subquery Scan on __local_0__ (cost=2.73..366,688.86 rows=46 width=832) (actual time=1,400.770..1,456.918 rows=46 loops=1)

2. 0.089 0.104 ↑ 1.0 46 1

Sort (cost=2.73..2.85 rows=46 width=245) (actual time=0.069..0.104 rows=46 loops=1)

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

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

4.          

SubPlan (for Subquery Scan)

5. 0.092 1.196 ↑ 1.0 1 46

Result (cost=1.62..1.63 rows=1 width=32) (actual time=0.025..0.026 rows=1 loops=46)

6.          

Initplan (for Result)

7. 0.092 1.104 ↑ 1.0 1 46

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

8. 0.322 1.012 ↓ 0.0 0 46

Sort (cost=1.59..1.59 rows=1 width=245) (actual time=0.022..0.022 rows=0 loops=46)

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

Seq Scan on accessions __local_2__ (cost=0.00..1.58 rows=1 width=245) (actual time=0.013..0.015 rows=0 loops=46)

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

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

  • Index Cond: (id = __local_0__.org_id)
11. 0.046 0.598 ↑ 1.0 1 46

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

12.          

Initplan (for Result)

13. 0.124 0.552 ↑ 1.0 1 46

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

14. 0.230 0.368 ↓ 0.0 0 46

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

  • Sort Key: __local_5__.id
  • Sort Method: quicksort Memory: 25kB
15. 0.046 0.138 ↓ 0.0 0 46

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

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

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=46)

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

SubPlan (for Aggregate)

18. 0.060 0.060 ↑ 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.030..0.030 rows=1 loops=2)

  • Index Cond: (id = __local_5__.org_id)
19. 0.092 2.530 ↑ 1.0 1 46

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

20.          

Initplan (for Result)

21. 0.740 2.438 ↑ 1.0 1 46

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

22. 0.368 0.598 ↑ 2.0 1 46

Sort (cost=9.51..9.52 rows=2 width=176) (actual time=0.013..0.013 rows=1 loops=46)

  • Sort Key: __local_8__.id
  • Sort Method: quicksort Memory: 25kB
23. 0.138 0.230 ↑ 2.0 1 46

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

  • Recheck Cond: (accession_id = __local_0__.id)
  • Heap Blocks: exact=46
24. 0.092 0.092 ↑ 2.0 1 46

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

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

SubPlan (for Aggregate)

26. 0.350 0.350 ↑ 1.0 1 50

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

  • Index Cond: (value = __local_8__.type_id)
27. 0.300 0.550 ↑ 1.0 1 50

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=50)

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

SubPlan (for Index Scan)

29. 0.250 0.250 ↑ 1.0 1 50

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

  • Index Cond: (value = __local_10__.specimen_type_id)
30. 0.200 0.200 ↑ 1.0 1 50

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=50)

  • Index Cond: (value = __local_8__.transfusion_id)
31. 0.460 0.736 ↑ 1.0 1 46

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

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

SubPlan (for Index Scan)

33. 0.276 0.276 ↑ 1.0 1 46

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

  • Index Cond: (id = __local_13__.org_id)
34. 0.180 0.276 ↑ 1.0 1 46

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

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

SubPlan (for Index Scan)

36. 0.096 0.096 ↑ 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.004..0.004 rows=1 loops=24)

  • Index Cond: (id = __local_15__.org_id)
37. 0.179 4.094 ↓ 0.0 0 46

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

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

SubPlan (for Seq Scan)

39. 0.045 3.915 ↑ 1.0 1 5

Result (cost=563.51..563.52 rows=1 width=32) (actual time=0.782..0.783 rows=1 loops=5)

40.          

Initplan (for Result)

41. 0.195 3.870 ↑ 1.0 1 5

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

42. 0.110 0.165 ↓ 1.2 13 5

Sort (cost=1.85..1.88 rows=11 width=12) (actual time=0.030..0.033 rows=13 loops=5)

  • Sort Key: __local_26__.id
  • Sort Method: quicksort Memory: 25kB
43. 0.055 0.055 ↓ 1.2 13 5

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=5)

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

SubPlan (for Aggregate)

45. 0.650 3.510 ↑ 1.0 1 65

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

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

SubPlan (for Index Scan)

47. 0.000 0.000 ↓ 0.0 0 65

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=65)

  • Index Cond: (id = __local_19__.reference_lab_id)
48. 0.065 0.520 ↑ 1.0 1 65

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

49.          

Initplan (for Result)

50. 0.065 0.455 ↑ 1.0 1 65

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

51. 0.325 0.390 ↓ 0.0 0 65

Sort (cost=8.17..8.18 rows=1 width=314) (actual time=0.006..0.006 rows=0 loops=65)

  • Sort Key: __local_22__.id
  • Sort Method: quicksort Memory: 25kB
52. 0.065 0.065 ↓ 0.0 0 65

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

  • Index Cond: (parent_id = __local_19__.id)
53. 0.065 2.340 ↑ 1.0 1 65

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

54.          

Initplan (for Result)

55. 0.525 2.275 ↑ 1.0 1 65

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

56. 0.325 0.910 ↑ 1.0 3 65

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

  • Sort Key: __local_25__.id
  • Sort Method: quicksort Memory: 25kB
57. 0.585 0.585 ↑ 1.0 3 65

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

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

SubPlan (for Aggregate)

59. 0.840 0.840 ↑ 1.0 1 210

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=210)

  • Index Cond: (value = __local_25__.result)
60. 0.230 42.228 ↑ 1.0 1 46

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

61.          

Initplan (for Result)

62. 4.062 41.998 ↑ 1.0 1 46

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

63. 0.644 1.518 ↑ 1.0 3 46

Sort (cost=28.15..28.16 rows=3 width=125) (actual time=0.032..0.033 rows=3 loops=46)

  • Sort Key: ((SubPlan 264)), __local_28__.id
  • Sort Method: quicksort Memory: 25kB
64. 0.612 0.874 ↑ 1.0 3 46

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

  • Filter: (accession_id = __local_0__.id)
  • Rows Removed by Filter: 128
65.          

SubPlan (for Seq Scan)

66. 0.262 0.262 ↑ 1.0 1 131

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

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

SubPlan (for Aggregate)

68. 0.131 0.131 ↓ 0.0 0 131

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=131)

  • Index Cond: (value = __local_28__.initial_result_value)
69. 0.131 0.131 ↓ 0.0 0 131

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=131)

  • Index Cond: (value = __local_28__.final_result_value)
70. 0.278 0.393 ↓ 0.0 0 131

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=131)

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

SubPlan (for Index Scan)

72. 0.115 0.115 ↑ 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.005..0.005 rows=1 loops=23)

  • Index Cond: (id = __local_31__.org_id)
73. 0.170 0.262 ↓ 0.0 0 131

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=131)

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

SubPlan (for Index Scan)

75. 0.092 0.092 ↑ 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.004..0.004 rows=1 loops=23)

  • Index Cond: (id = __local_33__.org_id)
76. 1.310 7.074 ↑ 1.0 1 131

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

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

SubPlan (for Index Scan)

78. 0.131 0.131 ↓ 0.0 0 131

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=131)

  • Index Cond: (id = __local_35__.reference_lab_id)
79. 0.131 1.179 ↑ 1.0 1 131

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

80.          

Initplan (for Result)

81. 0.262 1.048 ↑ 1.0 1 131

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

82. 0.655 0.786 ↓ 0.0 0 131

Sort (cost=8.17..8.18 rows=1 width=314) (actual time=0.006..0.006 rows=0 loops=131)

  • Sort Key: __local_38__.id
  • Sort Method: quicksort Memory: 25kB
83. 0.131 0.131 ↓ 0.0 0 131

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

  • Index Cond: (parent_id = __local_35__.id)
84. 0.262 4.454 ↑ 1.0 1 131

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

85.          

Initplan (for Result)

86. 1.076 4.192 ↑ 1.0 1 131

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

87. 0.524 1.572 ↑ 1.0 3 131

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

  • Sort Key: __local_41__.id
  • Sort Method: quicksort Memory: 25kB
88. 1.048 1.048 ↑ 1.0 3 131

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

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

SubPlan (for Aggregate)

90. 1.544 1.544 ↑ 1.0 1 386

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.004 rows=1 loops=386)

  • Index Cond: (value = __local_41__.result)
91. 0.142 0.262 ↓ 0.0 0 131

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

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

SubPlan (for Index Scan)

93. 0.024 0.024 ↑ 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.003..0.004 rows=1 loops=6)

  • Index Cond: (value = __local_42__.type_id)
94. 0.036 0.060 ↑ 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.009..0.010 rows=1 loops=6)

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

SubPlan (for Index Scan)

96. 0.024 0.024 ↑ 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.004..0.004 rows=1 loops=6)

  • Index Cond: (value = __local_44__.specimen_type_id)
97. 0.036 0.036 ↑ 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.006..0.006 rows=1 loops=6)

  • Index Cond: (value = __local_42__.transfusion_id)
98. 0.524 23.056 ↑ 1.0 1 131

Result (cost=430.78..430.79 rows=1 width=32) (actual time=0.175..0.176 rows=1 loops=131)

99.          

Initplan (for Result)

100. 2.403 22.532 ↑ 1.0 1 131

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

101. 0.917 4.585 ↑ 1.0 1 131

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

  • Sort Key: __local_48__.id
  • Sort Method: quicksort Memory: 25kB
102. 3.668 3.668 ↑ 1.0 1 131

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

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

SubPlan (for Aggregate)

104. 0.804 7.906 ↑ 1.0 1 134

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

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

SubPlan (for Index Scan)

106. 1.474 7.102 ↑ 1.0 1 134

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

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

SubPlan (for Index Scan)

108. 0.134 0.134 ↓ 0.0 0 134

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=134)

  • Index Cond: (id = __local_50__.reference_lab_id)
109. 0.134 1.072 ↑ 1.0 1 134

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

110.          

Initplan (for Result)

111. 0.268 0.938 ↑ 1.0 1 134

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

112. 0.536 0.670 ↓ 0.0 0 134

Sort (cost=8.17..8.18 rows=1 width=314) (actual time=0.005..0.005 rows=0 loops=134)

  • Sort Key: __local_53__.id
  • Sort Method: quicksort Memory: 25kB
113. 0.134 0.134 ↓ 0.0 0 134

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

  • Index Cond: (parent_id = __local_50__.id)
114. 0.134 4.422 ↑ 1.0 1 134

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

115.          

Initplan (for Result)

116. 1.046 4.288 ↑ 1.0 1 134

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

117. 0.670 1.742 ↑ 1.0 3 134

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

  • Sort Key: __local_56__.id
  • Sort Method: quicksort Memory: 25kB
118. 1.072 1.072 ↑ 1.0 3 134

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=134)

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

SubPlan (for Aggregate)

120. 1.500 1.500 ↑ 1.0 1 375

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=375)

  • Index Cond: (value = __local_56__.result)
121. 0.268 0.268 ↓ 0.0 0 134

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.002 rows=0 loops=134)

  • Index Cond: (value = __local_48__.result_1_id)
122. 0.134 0.134 ↓ 0.0 0 134

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=134)

  • Index Cond: (id = __local_48__.result_1_by_id)
123. 0.134 0.134 ↓ 0.0 0 134

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=134)

  • Index Cond: (value = __local_48__.result_2_id)
124. 0.000 0.000 ↓ 0.0 0 134

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=134)

  • Index Cond: (id = __local_48__.result_2_by_id)
125. 0.134 0.134 ↓ 0.0 0 134

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=134)

  • Index Cond: (value = __local_48__.result_final_id)
126. 0.032 0.134 ↓ 0.0 0 134

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

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

SubPlan (for Index Scan)

128. 0.024 0.024 ↑ 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.004..0.004 rows=1 loops=6)

  • Index Cond: (value = __local_62__.type_id)
129. 0.030 0.060 ↑ 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.009..0.010 rows=1 loops=6)

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

SubPlan (for Index Scan)

131. 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.004..0.005 rows=1 loops=6)

  • Index Cond: (value = __local_64__.specimen_type_id)
132. 0.018 0.018 ↑ 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.003..0.003 rows=1 loops=6)

  • Index Cond: (value = __local_62__.transfusion_id)
133. 0.402 6.834 ↑ 1.0 1 134

Result (cost=285.85..285.86 rows=1 width=32) (actual time=0.050..0.051 rows=1 loops=134)

134.          

Initplan (for Result)

135. 0.474 6.432 ↑ 1.0 1 134

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

136. 0.938 4.422 ↓ 0.0 0 134

Sort (cost=3.98..3.99 rows=2 width=91) (actual time=0.033..0.033 rows=0 loops=134)

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

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

  • Filter: (parent_result_id = __local_48__.id)
  • Rows Removed by Filter: 158
138.          

SubPlan (for Aggregate)

139. 0.144 1.368 ↑ 1.0 1 24

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

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

SubPlan (for Index Scan)

141. 0.240 1.224 ↑ 1.0 1 24

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

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

SubPlan (for Index Scan)

143. 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)
144. 0.024 0.192 ↑ 1.0 1 24

Result (cost=8.21..8.21 rows=1 width=32) (actual time=0.007..0.008 rows=1 loops=24)

145.          

Initplan (for Result)

146. 0.024 0.168 ↑ 1.0 1 24

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

147. 0.120 0.144 ↓ 0.0 0 24

Sort (cost=8.17..8.18 rows=1 width=314) (actual time=0.006..0.006 rows=0 loops=24)

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

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

  • Index Cond: (parent_id = __local_70__.id)
149. 0.024 0.792 ↑ 1.0 1 24

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

150.          

Initplan (for Result)

151. 0.128 0.768 ↑ 1.0 1 24

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

152. 0.120 0.312 ↑ 1.0 3 24

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

  • Sort Key: __local_76__.id
  • Sort Method: quicksort Memory: 25kB
153. 0.192 0.192 ↑ 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.008 rows=3 loops=24)

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

SubPlan (for Aggregate)

155. 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.003..0.004 rows=1 loops=82)

  • Index Cond: (value = __local_76__.result)
156. 0.048 0.048 ↑ 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.002..0.002 rows=1 loops=24)

  • Index Cond: (value = __local_68__.result_1_id)
157. 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)
158. 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)
159. 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)
160. 0.048 0.048 ↑ 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.002..0.002 rows=1 loops=24)

  • Index Cond: (value = __local_68__.result_final_id)
161. 0.000 0.000 ↓ 0.0 0 24

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

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

SubPlan (for Index Scan)

163. 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)
164. 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)
165.          

SubPlan (for Index Scan)

166. 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)
167. 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)
168. 0.262 3.668 ↑ 1.0 1 131

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

169.          

Initplan (for Result)

170. 0.262 3.406 ↑ 1.0 1 131

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

171. 0.655 3.144 ↓ 0.0 0 131

Sort (cost=3.65..3.65 rows=1 width=93) (actual time=0.024..0.024 rows=0 loops=131)

  • Sort Key: __local_88__.id
  • Sort Method: quicksort Memory: 25kB
172. 2.489 2.489 ↓ 0.0 0 131

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

  • Filter: (original_order_id = __local_28__.id)
  • Rows Removed by Filter: 131
173.          

SubPlan (for Aggregate)

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

SubPlan (for Index Scan)

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

SubPlan (for Index Scan)

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

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

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

SubPlan (for Index Scan)

184. 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)
185. 0.000 0.000 ↓ 0.0 0

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

186.          

Initplan (for Result)

187. 0.000 0.000 ↓ 0.0 0

Aggregate (cost=8.20..8.21 rows=1 width=32) (never executed)

188. 0.000 0.000 ↓ 0.0 0

Sort (cost=8.17..8.18 rows=1 width=314) (never executed)

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

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

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

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

191.          

Initplan (for Result)

192. 0.000 0.000 ↓ 0.0 0

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

193. 0.000 0.000 ↓ 0.0 0

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

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

SubPlan (for Aggregate)

196. 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)
197. 0.000 0.000 ↓ 0.0 0

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

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

SubPlan (for Index Scan)

199. 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)
200. 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)
201.          

SubPlan (for Index Scan)

202. 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)
203. 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)
204. 0.000 0.000 ↓ 0.0 0

Result (cost=430.78..430.79 rows=1 width=32) (never executed)

205.          

Initplan (for Result)

206. 0.000 0.000 ↓ 0.0 0

Aggregate (cost=430.77..430.78 rows=1 width=32) (never executed)

207. 0.000 0.000 ↓ 0.0 0

Sort (cost=3.98..3.99 rows=1 width=91) (never executed)

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

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

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

SubPlan (for Aggregate)

210. 0.000 0.000 ↓ 0.0 0

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

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

SubPlan (for Index Scan)

212. 0.000 0.000 ↓ 0.0 0

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

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

SubPlan (for Index Scan)

214. 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)
215. 0.000 0.000 ↓ 0.0 0

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

216.          

Initplan (for Result)

217. 0.000 0.000 ↓ 0.0 0

Aggregate (cost=8.20..8.21 rows=1 width=32) (never executed)

218. 0.000 0.000 ↓ 0.0 0

Sort (cost=8.17..8.18 rows=1 width=314) (never executed)

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

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

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

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

221.          

Initplan (for Result)

222. 0.000 0.000 ↓ 0.0 0

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

223. 0.000 0.000 ↓ 0.0 0

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

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

SubPlan (for Aggregate)

226. 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)
227. 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)
228. 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)
229. 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)
230. 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)
231. 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)
232. 0.000 0.000 ↓ 0.0 0

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

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

SubPlan (for Index Scan)

234. 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)
235. 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)
236.          

SubPlan (for Index Scan)

237. 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)
238. 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)
239. 0.000 0.000 ↓ 0.0 0

Result (cost=285.85..285.86 rows=1 width=32) (never executed)

240.          

Initplan (for Result)

241. 0.000 0.000 ↓ 0.0 0

Aggregate (cost=285.84..285.85 rows=1 width=32) (never executed)

242. 0.000 0.000 ↓ 0.0 0

Sort (cost=3.98..3.99 rows=2 width=91) (never executed)

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

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

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

SubPlan (for Aggregate)

245. 0.000 0.000 ↓ 0.0 0

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

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

SubPlan (for Index Scan)

247. 0.000 0.000 ↓ 0.0 0

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

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

SubPlan (for Index Scan)

249. 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)
250. 0.000 0.000 ↓ 0.0 0

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

251.          

Initplan (for Result)

252. 0.000 0.000 ↓ 0.0 0

Aggregate (cost=8.20..8.21 rows=1 width=32) (never executed)

253. 0.000 0.000 ↓ 0.0 0

Sort (cost=8.17..8.18 rows=1 width=314) (never executed)

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

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

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

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

256.          

Initplan (for Result)

257. 0.000 0.000 ↓ 0.0 0

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

258. 0.000 0.000 ↓ 0.0 0

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

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

SubPlan (for Aggregate)

261. 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)
262. 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)
263. 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)
264. 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)
265. 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)
266. 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)
267. 0.000 0.000 ↓ 0.0 0

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

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

SubPlan (for Index Scan)

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

SubPlan (for Index Scan)

272. 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)
273. 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)
274. 1.441 1.441 ↓ 0.0 0 131

Seq Scan on test_orders __local_147__ (cost=0.00..1,150.71 rows=1 width=32) (actual time=0.010..0.011 rows=0 loops=131)

  • Filter: (__local_28__.original_order_id = id)
  • Rows Removed by Filter: 131
275.          

SubPlan (for Seq Scan)

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

SubPlan (for Index Scan)

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

SubPlan (for Index Scan)

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

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

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

SubPlan (for Index Scan)

286. 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)
287. 0.000 0.000 ↓ 0.0 0

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

288.          

Initplan (for Result)

289. 0.000 0.000 ↓ 0.0 0

Aggregate (cost=8.20..8.21 rows=1 width=32) (never executed)

290. 0.000 0.000 ↓ 0.0 0

Sort (cost=8.17..8.18 rows=1 width=314) (never executed)

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

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

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

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

293.          

Initplan (for Result)

294. 0.000 0.000 ↓ 0.0 0

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

295. 0.000 0.000 ↓ 0.0 0

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

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

SubPlan (for Aggregate)

298. 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)
299. 0.000 0.000 ↓ 0.0 0

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

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

SubPlan (for Index Scan)

301. 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)
302. 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)
303.          

SubPlan (for Index Scan)

304. 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)
305. 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)
306. 0.000 0.000 ↓ 0.0 0

Result (cost=430.78..430.79 rows=1 width=32) (never executed)

307.          

Initplan (for Result)

308. 0.000 0.000 ↓ 0.0 0

Aggregate (cost=430.77..430.78 rows=1 width=32) (never executed)

309. 0.000 0.000 ↓ 0.0 0

Sort (cost=3.98..3.99 rows=1 width=91) (never executed)

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

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

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

SubPlan (for Aggregate)

312. 0.000 0.000 ↓ 0.0 0

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

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

SubPlan (for Index Scan)

314. 0.000 0.000 ↓ 0.0 0

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

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

SubPlan (for Index Scan)

316. 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)
317. 0.000 0.000 ↓ 0.0 0

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

318.          

Initplan (for Result)

319. 0.000 0.000 ↓ 0.0 0

Aggregate (cost=8.20..8.21 rows=1 width=32) (never executed)

320. 0.000 0.000 ↓ 0.0 0

Sort (cost=8.17..8.18 rows=1 width=314) (never executed)

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

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

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

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

323.          

Initplan (for Result)

324. 0.000 0.000 ↓ 0.0 0

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

325. 0.000 0.000 ↓ 0.0 0

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

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

SubPlan (for Aggregate)

328. 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)
329. 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)
330. 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)
331. 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)
332. 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)
333. 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)
334. 0.000 0.000 ↓ 0.0 0

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

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

SubPlan (for Index Scan)

336. 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)
337. 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)
338.          

SubPlan (for Index Scan)

339. 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)
340. 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)
341. 0.000 0.000 ↓ 0.0 0

Result (cost=285.85..285.86 rows=1 width=32) (never executed)

342.          

Initplan (for Result)

343. 0.000 0.000 ↓ 0.0 0

Aggregate (cost=285.84..285.85 rows=1 width=32) (never executed)

344. 0.000 0.000 ↓ 0.0 0

Sort (cost=3.98..3.99 rows=2 width=91) (never executed)

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

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

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

SubPlan (for Aggregate)

347. 0.000 0.000 ↓ 0.0 0

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

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

SubPlan (for Index Scan)

349. 0.000 0.000 ↓ 0.0 0

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

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

SubPlan (for Index Scan)

351. 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)
352. 0.000 0.000 ↓ 0.0 0

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

353.          

Initplan (for Result)

354. 0.000 0.000 ↓ 0.0 0

Aggregate (cost=8.20..8.21 rows=1 width=32) (never executed)

355. 0.000 0.000 ↓ 0.0 0

Sort (cost=8.17..8.18 rows=1 width=314) (never executed)

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

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

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

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

358.          

Initplan (for Result)

359. 0.000 0.000 ↓ 0.0 0

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

360. 0.000 0.000 ↓ 0.0 0

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

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

SubPlan (for Aggregate)

363. 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)
364. 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)
365. 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)
366. 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)
367. 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)
368. 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)
369. 0.000 0.000 ↓ 0.0 0

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

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

SubPlan (for Index Scan)

371. 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)
372. 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)
373.          

SubPlan (for Index Scan)

374. 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)
375. 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)
376. 0.000 0.000 ↓ 0.0 0

Result (cost=575.37..575.38 rows=1 width=32) (never executed)

377.          

Initplan (for Result)

378. 0.000 0.000 ↓ 0.0 0

Aggregate (cost=575.36..575.37 rows=1 width=32) (never executed)

379. 0.000 0.000 ↓ 0.0 0

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

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

SubPlan (for Aggregate)

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

SubPlan (for Index Scan)

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

SubPlan (for Index Scan)

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

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

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

SubPlan (for Index Scan)

392. 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)
393. 0.000 0.000 ↓ 0.0 0

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

394.          

Initplan (for Result)

395. 0.000 0.000 ↓ 0.0 0

Aggregate (cost=8.20..8.21 rows=1 width=32) (never executed)

396. 0.000 0.000 ↓ 0.0 0

Sort (cost=8.17..8.18 rows=1 width=314) (never executed)

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

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

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

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

399.          

Initplan (for Result)

400. 0.000 0.000 ↓ 0.0 0

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

401. 0.000 0.000 ↓ 0.0 0

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

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

SubPlan (for Aggregate)

404. 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)
405. 0.000 0.000 ↓ 0.0 0

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

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

SubPlan (for Index Scan)

407. 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)
408. 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)
409.          

SubPlan (for Index Scan)

410. 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)
411. 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)
412. 0.000 0.000 ↓ 0.0 0

Result (cost=430.78..430.79 rows=1 width=32) (never executed)

413.          

Initplan (for Result)

414. 0.000 0.000 ↓ 0.0 0

Aggregate (cost=430.77..430.78 rows=1 width=32) (never executed)

415. 0.000 0.000 ↓ 0.0 0

Sort (cost=3.98..3.99 rows=1 width=91) (never executed)

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

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

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

SubPlan (for Aggregate)

418. 0.000 0.000 ↓ 0.0 0

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

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

SubPlan (for Index Scan)

420. 0.000 0.000 ↓ 0.0 0

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

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

SubPlan (for Index Scan)

422. 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)
423. 0.000 0.000 ↓ 0.0 0

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

424.          

Initplan (for Result)

425. 0.000 0.000 ↓ 0.0 0

Aggregate (cost=8.20..8.21 rows=1 width=32) (never executed)

426. 0.000 0.000 ↓ 0.0 0

Sort (cost=8.17..8.18 rows=1 width=314) (never executed)

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

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

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

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

429.          

Initplan (for Result)

430. 0.000 0.000 ↓ 0.0 0

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

431. 0.000 0.000 ↓ 0.0 0

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

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

SubPlan (for Aggregate)

434. 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)
435. 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)
436. 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)
437. 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)
438. 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)
439. 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)
440. 0.000 0.000 ↓ 0.0 0

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

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

SubPlan (for Index Scan)

442. 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)
443. 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)
444.          

SubPlan (for Index Scan)

445. 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)
446. 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)
447. 0.000 0.000 ↓ 0.0 0

Result (cost=285.85..285.86 rows=1 width=32) (never executed)

448.          

Initplan (for Result)

449. 0.000 0.000 ↓ 0.0 0

Aggregate (cost=285.84..285.85 rows=1 width=32) (never executed)

450. 0.000 0.000 ↓ 0.0 0

Sort (cost=3.98..3.99 rows=2 width=91) (never executed)

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

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

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

SubPlan (for Aggregate)

453. 0.000 0.000 ↓ 0.0 0

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

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

SubPlan (for Index Scan)

455. 0.000 0.000 ↓ 0.0 0

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

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

SubPlan (for Index Scan)

457. 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)
458. 0.000 0.000 ↓ 0.0 0

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

459.          

Initplan (for Result)

460. 0.000 0.000 ↓ 0.0 0

Aggregate (cost=8.20..8.21 rows=1 width=32) (never executed)

461. 0.000 0.000 ↓ 0.0 0

Sort (cost=8.17..8.18 rows=1 width=314) (never executed)

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

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

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

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

464.          

Initplan (for Result)

465. 0.000 0.000 ↓ 0.0 0

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

466. 0.000 0.000 ↓ 0.0 0

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

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

SubPlan (for Aggregate)

469. 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)
470. 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)
471. 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)
472. 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)
473. 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)
474. 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)
475. 0.000 0.000 ↓ 0.0 0

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

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

SubPlan (for Index Scan)

477. 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)
478. 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)
479.          

SubPlan (for Index Scan)

480. 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)
481. 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)
482. 0.092 1.656 ↑ 1.0 1 46

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

483.          

Initplan (for Result)

484. 0.302 1.564 ↑ 1.0 1 46

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

485. 0.414 0.690 ↑ 4.0 1 46

Sort (cost=1.69..1.70 rows=4 width=65) (actual time=0.014..0.015 rows=1 loops=46)

  • Sort Key: __local_267__.created_at DESC, __local_267__.id
  • Sort Method: quicksort Memory: 25kB
486. 0.276 0.276 ↑ 4.0 1 46

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

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

SubPlan (for Aggregate)

488. 0.364 0.572 ↑ 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.011..0.011 rows=1 loops=52)

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

SubPlan (for Index Scan)

490. 0.208 0.208 ↑ 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.004..0.004 rows=1 loops=52)

  • Index Cond: (id = __local_268__.org_id)
491. 0.046 0.644 ↑ 1.0 1 46

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

492.          

Initplan (for Result)

493. 0.152 0.598 ↑ 1.0 1 46

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

494. 0.230 0.368 ↓ 0.0 0 46

Sort (cost=11.31..11.31 rows=3 width=101) (actual time=0.008..0.008 rows=0 loops=46)

  • Sort Key: __local_271__.id
  • Sort Method: quicksort Memory: 25kB
495. 0.046 0.138 ↓ 0.0 0 46

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

  • Recheck Cond: (accession_id = __local_0__.id)
  • Heap Blocks: exact=2
496. 0.092 0.092 ↓ 0.0 0 46

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

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

SubPlan (for Aggregate)

498. 0.020 0.050 ↑ 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.025 rows=1 loops=2)

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

SubPlan (for Index Scan)

500. 0.030 0.030 ↑ 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.014..0.015 rows=1 loops=2)

  • Index Cond: (id = __local_272__.org_id)
501. 0.016 0.028 ↑ 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.014..0.014 rows=1 loops=2)

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

SubPlan (for Index Scan)

503. 0.012 0.012 ↑ 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.006..0.006 rows=1 loops=2)

  • Index Cond: (id = __local_274__.org_id)
504. 0.046 0.552 ↑ 1.0 1 46

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

505.          

Initplan (for Result)

506. 0.115 0.506 ↑ 1.0 1 46

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

507. 0.276 0.368 ↓ 0.0 0 46

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

  • Sort Key: __local_277__.created_at, __local_277__.id
  • Sort Method: quicksort Memory: 25kB
508. 0.000 0.092 ↓ 0.0 0 46

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

  • Recheck Cond: (accession_id = __local_0__.id)
  • Heap Blocks: exact=1
509. 0.092 0.092 ↓ 0.0 0 46

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=46)

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

SubPlan (for Aggregate)

511. 0.013 0.023 ↑ 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.023..0.023 rows=1 loops=1)

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

SubPlan (for Index Scan)

513. 0.010 0.010 ↑ 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.010..0.010 rows=1 loops=1)

  • Index Cond: (id = __local_278__.org_id)