explain.depesz.com

PostgreSQL's explain analyze made readable

Result: xLkD

Settings
# exclusive inclusive rows x rows loops node
1. 0.051 6,502.449 ↑ 1.0 1 1

Subquery Scan on main (cost=474,332.47..474,332.49 rows=1 width=32) (actual time=6,502.448..6,502.449 rows=1 loops=1)

2. 0.371 6,502.398 ↑ 1.0 1 1

Aggregate (cost=474,332.47..474,332.48 rows=1 width=64) (actual time=6,502.398..6,502.398 rows=1 loops=1)

3. 0.049 0.049 ↓ 2.2 9 1

Seq Scan on co_header h (cost=0.00..6.30 rows=4 width=4) (actual time=0.029..0.049 rows=9 loops=1)

  • Filter: (header_date >= '2018-12-01'::date)
  • Rows Removed by Filter: 100
4.          

SubPlan (forAggregate)

5. 0.000 1,224.189 ↑ 1.0 1 9

Aggregate (cost=23,534.35..23,534.36 rows=1 width=8) (actual time=136.021..136.021 rows=1 loops=9)

6.          

Initplan (forAggregate)

7. 2.214 1,223.505 ↑ 1.0 1 9

Aggregate (cost=23,533.08..23,533.09 rows=1 width=32) (actual time=135.945..135.945 rows=1 loops=9)

8. 0.225 0.225 ↑ 1.1 9 9

Index Scan using co_rows_sernr_idx on co_rows cr_4 (cost=0.28..6.45 rows=10 width=54) (actual time=0.010..0.025 rows=9 loops=9)

  • Index Cond: (sernr = h.sernr)
9.          

SubPlan (forAggregate)

10. 0.308 304.227 ↑ 1.0 1 77

Aggregate (cost=585.83..585.84 rows=1 width=32) (actual time=3.951..3.951 rows=1 loops=77)

11. 0.077 303.919 ↓ 0.0 0 77

Result (cost=0.28..585.80 rows=1 width=42) (actual time=3.941..3.947 rows=0 loops=77)

  • One-Time Filter: (cr_4.sernr = h.sernr)
12. 13.167 303.842 ↓ 0.0 0 77

Nested Loop (cost=0.28..585.80 rows=1 width=42) (actual time=3.940..3.946 rows=0 loops=77)

  • Join Filter: (cr2_16.so_ref = wt_16.sernr)
  • Rows Removed by Join Filter: 2572
13. 0.462 0.462 ↑ 1.0 1 77

Index Scan using co_rows_pkey on co_rows cr2_16 (cost=0.28..2.29 rows=1 width=8) (actual time=0.005..0.006 rows=1 loops=77)

  • Index Cond: (cr_4.id = id)
14. 290.213 290.213 ↑ 1.7 2,572 77

Seq Scan on working_times wt_16 (cost=0.00..529.37 rows=4,331 width=42) (actual time=2.893..3.769 rows=2,572 loops=77)

  • Filter: ((operation_end IS NOT NULL) AND (date(operation_start) >= '2018-12-01'::date))
  • Rows Removed by Filter: 10585
15. 0.154 305.382 ↑ 1.0 1 77

Aggregate (cost=589.85..589.86 rows=1 width=32) (actual time=3.966..3.966 rows=1 loops=77)

16. 0.231 305.228 ↓ 0.0 0 77

Subquery Scan on wts_10 (cost=587.34..589.34 rows=100 width=56) (actual time=3.964..3.964 rows=0 loops=77)

17. 0.000 304.997 ↓ 0.0 0 77

HashAggregate (cost=587.34..588.34 rows=100 width=40) (actual time=3.961..3.961 rows=0 loops=77)

  • Group Key: d_15.machine
18.          

Initplan (forHashAggregate)

19. 0.308 304.304 ↑ 1.0 1 77

Aggregate (cost=585.83..585.84 rows=1 width=32) (actual time=3.952..3.952 rows=1 loops=77)

20. 0.077 303.996 ↓ 0.0 0 77

Result (cost=0.28..585.80 rows=1 width=42) (actual time=3.944..3.948 rows=0 loops=77)

  • One-Time Filter: (cr_4.sernr = h.sernr)
21. 12.551 303.919 ↓ 0.0 0 77

Nested Loop (cost=0.28..585.80 rows=1 width=42) (actual time=3.943..3.947 rows=0 loops=77)

  • Join Filter: (cr2_17.so_ref = wt_17.sernr)
  • Rows Removed by Join Filter: 2572
22. 0.539 0.539 ↑ 1.0 1 77

Index Scan using co_rows_pkey on co_rows cr2_17 (cost=0.28..2.29 rows=1 width=8) (actual time=0.005..0.007 rows=1 loops=77)

  • Index Cond: (cr_4.id = id)
23. 290.829 290.829 ↑ 1.7 2,572 77

Seq Scan on working_times wt_17 (cost=0.00..529.37 rows=4,331 width=42) (actual time=2.898..3.777 rows=2,572 loops=77)

  • Filter: ((operation_end IS NOT NULL) AND (date(operation_start) >= '2018-12-01'::date))
  • Rows Removed by Filter: 10585
24. 304.843 304.843 ↓ 0.0 0 77

Function Scan on json_to_recordset d_15 (cost=0.00..1.00 rows=100 width=36) (actual time=3.959..3.959 rows=0 loops=77)

25. 0.077 307.076 ↑ 1.0 1 77

Aggregate (cost=589.85..589.86 rows=1 width=32) (actual time=3.988..3.988 rows=1 loops=77)

26. 0.231 306.999 ↓ 0.0 0 77

Subquery Scan on wts_11 (cost=587.34..589.34 rows=100 width=56) (actual time=3.987..3.987 rows=0 loops=77)

27. 0.000 306.768 ↓ 0.0 0 77

HashAggregate (cost=587.34..588.34 rows=100 width=40) (actual time=3.984..3.984 rows=0 loops=77)

  • Group Key: d_16.worker_code
28.          

Initplan (forHashAggregate)

29. 0.308 306.152 ↑ 1.0 1 77

Aggregate (cost=585.83..585.84 rows=1 width=32) (actual time=3.976..3.976 rows=1 loops=77)

30. 0.077 305.844 ↓ 0.0 0 77

Result (cost=0.28..585.80 rows=1 width=42) (actual time=3.969..3.972 rows=0 loops=77)

  • One-Time Filter: (cr_4.sernr = h.sernr)
31. 12.782 305.767 ↓ 0.0 0 77

Nested Loop (cost=0.28..585.80 rows=1 width=42) (actual time=3.968..3.971 rows=0 loops=77)

  • Join Filter: (cr2_18.so_ref = wt_18.sernr)
  • Rows Removed by Join Filter: 2572
32. 0.539 0.539 ↑ 1.0 1 77

Index Scan using co_rows_pkey on co_rows cr2_18 (cost=0.28..2.29 rows=1 width=8) (actual time=0.006..0.007 rows=1 loops=77)

  • Index Cond: (cr_4.id = id)
33. 292.446 292.446 ↑ 1.7 2,572 77

Seq Scan on working_times wt_18 (cost=0.00..529.37 rows=4,331 width=42) (actual time=2.922..3.798 rows=2,572 loops=77)

  • Filter: ((operation_end IS NOT NULL) AND (date(operation_start) >= '2018-12-01'::date))
  • Rows Removed by Filter: 10585
34. 306.614 306.614 ↓ 0.0 0 77

Function Scan on json_to_recordset d_16 (cost=0.00..1.00 rows=100 width=36) (actual time=3.982..3.982 rows=0 loops=77)

35. 0.000 304.381 ↑ 1.0 1 77

Aggregate (cost=587.09..587.10 rows=1 width=8) (actual time=3.953..3.953 rows=1 loops=77)

36.          

Initplan (forAggregate)

37. 0.231 303.765 ↑ 1.0 1 77

Aggregate (cost=585.83..585.84 rows=1 width=32) (actual time=3.945..3.945 rows=1 loops=77)

38. 0.077 303.534 ↓ 0.0 0 77

Result (cost=0.28..585.80 rows=1 width=42) (actual time=3.938..3.942 rows=0 loops=77)

  • One-Time Filter: (cr_4.sernr = h.sernr)
39. 12.320 303.457 ↓ 0.0 0 77

Nested Loop (cost=0.28..585.80 rows=1 width=42) (actual time=3.937..3.941 rows=0 loops=77)

  • Join Filter: (cr2_19.so_ref = wt_19.sernr)
  • Rows Removed by Join Filter: 2572
40. 0.539 0.539 ↑ 1.0 1 77

Index Scan using co_rows_pkey on co_rows cr2_19 (cost=0.28..2.29 rows=1 width=8) (actual time=0.006..0.007 rows=1 loops=77)

  • Index Cond: (cr_4.id = id)
41. 290.598 290.598 ↑ 1.7 2,572 77

Seq Scan on working_times wt_19 (cost=0.00..529.37 rows=4,331 width=42) (actual time=2.898..3.774 rows=2,572 loops=77)

  • Filter: ((operation_end IS NOT NULL) AND (date(operation_start) >= '2018-12-01'::date))
  • Rows Removed by Filter: 10585
42. 304.227 304.227 ↓ 0.0 0 77

Function Scan on json_to_recordset d_17 (cost=0.00..1.00 rows=100 width=4) (actual time=3.951..3.951 rows=0 loops=77)

43. 1,224.144 1,224.144 ↑ 11.1 9 9

Function Scan on json_to_recordset d_18 (cost=0.00..1.00 rows=100 width=4) (actual time=136.015..136.016 rows=9 loops=9)

44. 0.000 1,336.401 ↑ 1.0 1 9

Aggregate (cost=23,534.35..23,534.36 rows=1 width=8) (actual time=148.489..148.489 rows=1 loops=9)

45.          

Initplan (forAggregate)

46. 2.214 1,335.762 ↑ 1.0 1 9

Aggregate (cost=23,533.08..23,533.09 rows=1 width=32) (actual time=148.418..148.418 rows=1 loops=9)

47. 0.216 0.216 ↑ 1.1 9 9

Index Scan using co_rows_sernr_idx on co_rows cr (cost=0.28..6.45 rows=10 width=54) (actual time=0.009..0.024 rows=9 loops=9)

  • Index Cond: (sernr = h.sernr)
48.          

SubPlan (forAggregate)

49. 0.308 331.716 ↑ 1.0 1 77

Aggregate (cost=585.83..585.84 rows=1 width=32) (actual time=4.308..4.308 rows=1 loops=77)

50. 0.077 331.408 ↓ 0.0 0 77

Result (cost=0.28..585.80 rows=1 width=42) (actual time=4.300..4.304 rows=0 loops=77)

  • One-Time Filter: (cr.sernr = h.sernr)
51. 14.091 331.331 ↓ 0.0 0 77

Nested Loop (cost=0.28..585.80 rows=1 width=42) (actual time=4.299..4.303 rows=0 loops=77)

  • Join Filter: (cr2.so_ref = wt.sernr)
  • Rows Removed by Join Filter: 2572
52. 0.462 0.462 ↑ 1.0 1 77

Index Scan using co_rows_pkey on co_rows cr2 (cost=0.28..2.29 rows=1 width=8) (actual time=0.005..0.006 rows=1 loops=77)

  • Index Cond: (cr.id = id)
53. 316.778 316.778 ↑ 1.7 2,572 77

Seq Scan on working_times wt (cost=0.00..529.37 rows=4,331 width=42) (actual time=3.156..4.114 rows=2,572 loops=77)

  • Filter: ((operation_end IS NOT NULL) AND (date(operation_start) >= '2018-12-01'::date))
  • Rows Removed by Filter: 10585
54. 0.077 331.716 ↑ 1.0 1 77

Aggregate (cost=589.85..589.86 rows=1 width=32) (actual time=4.308..4.308 rows=1 loops=77)

55. 0.231 331.639 ↓ 0.0 0 77

Subquery Scan on wts (cost=587.34..589.34 rows=100 width=56) (actual time=4.307..4.307 rows=0 loops=77)

56. 0.000 331.408 ↓ 0.0 0 77

HashAggregate (cost=587.34..588.34 rows=100 width=40) (actual time=4.304..4.304 rows=0 loops=77)

  • Group Key: d.machine
57.          

Initplan (forHashAggregate)

58. 0.231 330.638 ↑ 1.0 1 77

Aggregate (cost=585.83..585.84 rows=1 width=32) (actual time=4.294..4.294 rows=1 loops=77)

59. 0.077 330.407 ↓ 0.0 0 77

Result (cost=0.28..585.80 rows=1 width=42) (actual time=4.287..4.291 rows=0 loops=77)

  • One-Time Filter: (cr.sernr = h.sernr)
60. 13.552 330.330 ↓ 0.0 0 77

Nested Loop (cost=0.28..585.80 rows=1 width=42) (actual time=4.286..4.290 rows=0 loops=77)

  • Join Filter: (cr2_1.so_ref = wt_1.sernr)
  • Rows Removed by Join Filter: 2572
61. 0.539 0.539 ↑ 1.0 1 77

Index Scan using co_rows_pkey on co_rows cr2_1 (cost=0.28..2.29 rows=1 width=8) (actual time=0.006..0.007 rows=1 loops=77)

  • Index Cond: (cr.id = id)
62. 316.239 316.239 ↑ 1.7 2,572 77

Seq Scan on working_times wt_1 (cost=0.00..529.37 rows=4,331 width=42) (actual time=3.148..4.107 rows=2,572 loops=77)

  • Filter: ((operation_end IS NOT NULL) AND (date(operation_start) >= '2018-12-01'::date))
  • Rows Removed by Filter: 10585
63. 331.177 331.177 ↓ 0.0 0 77

Function Scan on json_to_recordset d (cost=0.00..1.00 rows=100 width=36) (actual time=4.301..4.301 rows=0 loops=77)

64. 0.077 334.873 ↑ 1.0 1 77

Aggregate (cost=589.85..589.86 rows=1 width=32) (actual time=4.349..4.349 rows=1 loops=77)

65. 0.231 334.796 ↓ 0.0 0 77

Subquery Scan on wts_1 (cost=587.34..589.34 rows=100 width=56) (actual time=4.348..4.348 rows=0 loops=77)

66. 0.000 334.565 ↓ 0.0 0 77

HashAggregate (cost=587.34..588.34 rows=100 width=40) (actual time=4.345..4.345 rows=0 loops=77)

  • Group Key: d_1.worker_code
67.          

Initplan (forHashAggregate)

68. 0.308 333.949 ↑ 1.0 1 77

Aggregate (cost=585.83..585.84 rows=1 width=32) (actual time=4.337..4.337 rows=1 loops=77)

69. 0.077 333.641 ↓ 0.0 0 77

Result (cost=0.28..585.80 rows=1 width=42) (actual time=4.327..4.333 rows=0 loops=77)

  • One-Time Filter: (cr.sernr = h.sernr)
70. 14.014 333.564 ↓ 0.0 0 77

Nested Loop (cost=0.28..585.80 rows=1 width=42) (actual time=4.326..4.332 rows=0 loops=77)

  • Join Filter: (cr2_2.so_ref = wt_2.sernr)
  • Rows Removed by Join Filter: 2572
71. 0.539 0.539 ↑ 1.0 1 77

Index Scan using co_rows_pkey on co_rows cr2_2 (cost=0.28..2.29 rows=1 width=8) (actual time=0.006..0.007 rows=1 loops=77)

  • Index Cond: (cr.id = id)
72. 319.011 319.011 ↑ 1.7 2,572 77

Seq Scan on working_times wt_2 (cost=0.00..529.37 rows=4,331 width=42) (actual time=3.188..4.143 rows=2,572 loops=77)

  • Filter: ((operation_end IS NOT NULL) AND (date(operation_start) >= '2018-12-01'::date))
  • Rows Removed by Filter: 10585
73. 334.411 334.411 ↓ 0.0 0 77

Function Scan on json_to_recordset d_1 (cost=0.00..1.00 rows=100 width=36) (actual time=4.343..4.343 rows=0 loops=77)

74. 0.000 335.027 ↑ 1.0 1 77

Aggregate (cost=587.09..587.10 rows=1 width=8) (actual time=4.351..4.351 rows=1 loops=77)

75.          

Initplan (forAggregate)

76. 0.308 334.411 ↑ 1.0 1 77

Aggregate (cost=585.83..585.84 rows=1 width=32) (actual time=4.343..4.343 rows=1 loops=77)

77. 0.077 334.103 ↓ 0.0 0 77

Result (cost=0.28..585.80 rows=1 width=42) (actual time=4.336..4.339 rows=0 loops=77)

  • One-Time Filter: (cr.sernr = h.sernr)
78. 14.014 334.026 ↓ 0.0 0 77

Nested Loop (cost=0.28..585.80 rows=1 width=42) (actual time=4.335..4.338 rows=0 loops=77)

  • Join Filter: (cr2_3.so_ref = wt_3.sernr)
  • Rows Removed by Join Filter: 2572
79. 0.539 0.539 ↑ 1.0 1 77

Index Scan using co_rows_pkey on co_rows cr2_3 (cost=0.28..2.29 rows=1 width=8) (actual time=0.006..0.007 rows=1 loops=77)

  • Index Cond: (cr.id = id)
80. 319.473 319.473 ↑ 1.7 2,572 77

Seq Scan on working_times wt_3 (cost=0.00..529.37 rows=4,331 width=42) (actual time=3.179..4.149 rows=2,572 loops=77)

  • Filter: ((operation_end IS NOT NULL) AND (date(operation_start) >= '2018-12-01'::date))
  • Rows Removed by Filter: 10585
81. 334.873 334.873 ↓ 0.0 0 77

Function Scan on json_to_recordset d_2 (cost=0.00..1.00 rows=100 width=4) (actual time=4.349..4.349 rows=0 loops=77)

82. 1,336.356 1,336.356 ↑ 11.1 9 9

Function Scan on json_to_recordset d_3 (cost=0.00..1.00 rows=100 width=4) (actual time=148.483..148.484 rows=9 loops=9)

83. 2.283 1,289.862 ↑ 1.0 1 9

Aggregate (cost=23,533.08..23,533.09 rows=1 width=32) (actual time=143.318..143.318 rows=1 loops=9)

84. 0.216 0.216 ↑ 1.1 9 9

Index Scan using co_rows_sernr_idx on co_rows cr_1 (cost=0.28..6.45 rows=10 width=54) (actual time=0.009..0.024 rows=9 loops=9)

  • Index Cond: (sernr = h.sernr)
85.          

SubPlan (forAggregate)

86. 0.308 319.088 ↑ 1.0 1 77

Aggregate (cost=585.83..585.84 rows=1 width=32) (actual time=4.144..4.144 rows=1 loops=77)

87. 0.077 318.780 ↓ 0.0 0 77

Result (cost=0.28..585.80 rows=1 width=42) (actual time=4.136..4.140 rows=0 loops=77)

  • One-Time Filter: (cr_1.sernr = h.sernr)
88. 13.475 318.703 ↓ 0.0 0 77

Nested Loop (cost=0.28..585.80 rows=1 width=42) (actual time=4.135..4.139 rows=0 loops=77)

  • Join Filter: (cr2_4.so_ref = wt_4.sernr)
  • Rows Removed by Join Filter: 2572
89. 0.462 0.462 ↑ 1.0 1 77

Index Scan using co_rows_pkey on co_rows cr2_4 (cost=0.28..2.29 rows=1 width=8) (actual time=0.005..0.006 rows=1 loops=77)

  • Index Cond: (cr_1.id = id)
90. 304.766 304.766 ↑ 1.7 2,572 77

Seq Scan on working_times wt_4 (cost=0.00..529.37 rows=4,331 width=42) (actual time=3.034..3.958 rows=2,572 loops=77)

  • Filter: ((operation_end IS NOT NULL) AND (date(operation_start) >= '2018-12-01'::date))
  • Rows Removed by Filter: 10585
91. 0.154 320.936 ↑ 1.0 1 77

Aggregate (cost=589.85..589.86 rows=1 width=32) (actual time=4.168..4.168 rows=1 loops=77)

92. 0.231 320.782 ↓ 0.0 0 77

Subquery Scan on wts_2 (cost=587.34..589.34 rows=100 width=56) (actual time=4.166..4.166 rows=0 loops=77)

93. 0.000 320.551 ↓ 0.0 0 77

HashAggregate (cost=587.34..588.34 rows=100 width=40) (actual time=4.163..4.163 rows=0 loops=77)

  • Group Key: d_4.machine
94.          

Initplan (forHashAggregate)

95. 0.231 319.781 ↑ 1.0 1 77

Aggregate (cost=585.83..585.84 rows=1 width=32) (actual time=4.153..4.153 rows=1 loops=77)

96. 0.154 319.550 ↓ 0.0 0 77

Result (cost=0.28..585.80 rows=1 width=42) (actual time=4.145..4.150 rows=0 loops=77)

  • One-Time Filter: (cr_1.sernr = h.sernr)
97. 12.936 319.396 ↓ 0.0 0 77

Nested Loop (cost=0.28..585.80 rows=1 width=42) (actual time=4.144..4.148 rows=0 loops=77)

  • Join Filter: (cr2_5.so_ref = wt_5.sernr)
  • Rows Removed by Join Filter: 2572
98. 0.539 0.539 ↑ 1.0 1 77

Index Scan using co_rows_pkey on co_rows cr2_5 (cost=0.28..2.29 rows=1 width=8) (actual time=0.005..0.007 rows=1 loops=77)

  • Index Cond: (cr_1.id = id)
99. 305.921 305.921 ↑ 1.7 2,572 77

Seq Scan on working_times wt_5 (cost=0.00..529.37 rows=4,331 width=42) (actual time=3.045..3.973 rows=2,572 loops=77)

  • Filter: ((operation_end IS NOT NULL) AND (date(operation_start) >= '2018-12-01'::date))
  • Rows Removed by Filter: 10585
100. 320.320 320.320 ↓ 0.0 0 77

Function Scan on json_to_recordset d_4 (cost=0.00..1.00 rows=100 width=36) (actual time=4.160..4.160 rows=0 loops=77)

101. 0.077 323.554 ↑ 1.0 1 77

Aggregate (cost=589.85..589.86 rows=1 width=32) (actual time=4.202..4.202 rows=1 loops=77)

102. 0.231 323.477 ↓ 0.0 0 77

Subquery Scan on wts_3 (cost=587.34..589.34 rows=100 width=56) (actual time=4.201..4.201 rows=0 loops=77)

103. 0.000 323.246 ↓ 0.0 0 77

HashAggregate (cost=587.34..588.34 rows=100 width=40) (actual time=4.198..4.198 rows=0 loops=77)

  • Group Key: d_5.worker_code
104.          

Initplan (forHashAggregate)

105. 0.308 322.630 ↑ 1.0 1 77

Aggregate (cost=585.83..585.84 rows=1 width=32) (actual time=4.190..4.190 rows=1 loops=77)

106. 0.077 322.322 ↓ 0.0 0 77

Result (cost=0.28..585.80 rows=1 width=42) (actual time=4.183..4.186 rows=0 loops=77)

  • One-Time Filter: (cr_1.sernr = h.sernr)
107. 13.398 322.245 ↓ 0.0 0 77

Nested Loop (cost=0.28..585.80 rows=1 width=42) (actual time=4.181..4.185 rows=0 loops=77)

  • Join Filter: (cr2_6.so_ref = wt_6.sernr)
  • Rows Removed by Join Filter: 2572
108. 0.539 0.539 ↑ 1.0 1 77

Index Scan using co_rows_pkey on co_rows cr2_6 (cost=0.28..2.29 rows=1 width=8) (actual time=0.006..0.007 rows=1 loops=77)

  • Index Cond: (cr_1.id = id)
109. 308.308 308.308 ↑ 1.7 2,572 77

Seq Scan on working_times wt_6 (cost=0.00..529.37 rows=4,331 width=42) (actual time=3.061..4.004 rows=2,572 loops=77)

  • Filter: ((operation_end IS NOT NULL) AND (date(operation_start) >= '2018-12-01'::date))
  • Rows Removed by Filter: 10585
110. 323.015 323.015 ↓ 0.0 0 77

Function Scan on json_to_recordset d_5 (cost=0.00..1.00 rows=100 width=36) (actual time=4.195..4.195 rows=0 loops=77)

111. 0.000 323.785 ↑ 1.0 1 77

Aggregate (cost=587.09..587.10 rows=1 width=8) (actual time=4.205..4.205 rows=1 loops=77)

112.          

Initplan (forAggregate)

113. 0.231 323.169 ↑ 1.0 1 77

Aggregate (cost=585.83..585.84 rows=1 width=32) (actual time=4.197..4.197 rows=1 loops=77)

114. 0.077 322.938 ↓ 0.0 0 77

Result (cost=0.28..585.80 rows=1 width=42) (actual time=4.190..4.194 rows=0 loops=77)

  • One-Time Filter: (cr_1.sernr = h.sernr)
115. 13.552 322.861 ↓ 0.0 0 77

Nested Loop (cost=0.28..585.80 rows=1 width=42) (actual time=4.189..4.193 rows=0 loops=77)

  • Join Filter: (cr2_7.so_ref = wt_7.sernr)
  • Rows Removed by Join Filter: 2572
116. 0.539 0.539 ↑ 1.0 1 77

Index Scan using co_rows_pkey on co_rows cr2_7 (cost=0.28..2.29 rows=1 width=8) (actual time=0.006..0.007 rows=1 loops=77)

  • Index Cond: (cr_1.id = id)
117. 308.770 308.770 ↑ 1.7 2,572 77

Seq Scan on working_times wt_7 (cost=0.00..529.37 rows=4,331 width=42) (actual time=3.080..4.010 rows=2,572 loops=77)

  • Filter: ((operation_end IS NOT NULL) AND (date(operation_start) >= '2018-12-01'::date))
  • Rows Removed by Filter: 10585
118. 323.631 323.631 ↓ 0.0 0 77

Function Scan on json_to_recordset d_6 (cost=0.00..1.00 rows=100 width=4) (actual time=4.203..4.203 rows=0 loops=77)

119. 0.036 1,340.928 ↑ 1.0 1 9

Aggregate (cost=23,989.85..23,989.86 rows=1 width=32) (actual time=148.992..148.992 rows=1 loops=9)

120. 0.036 1,340.892 ↓ 0.0 0 9

Subquery Scan on wts_6 (cost=23,984.85..23,988.85 rows=200 width=56) (actual time=148.988..148.988 rows=0 loops=9)

121. 0.072 1,340.856 ↓ 0.0 0 9

HashAggregate (cost=23,984.85..23,986.85 rows=200 width=40) (actual time=148.984..148.984 rows=0 loops=9)

  • Group Key: ((json_array_elements(d_10.workers_totals)) ->> 'worker_code'::text)
122. 0.000 1,340.784 ↓ 0.0 0 9

Result (cost=23,533.10..23,834.85 rows=10,000 width=36) (actual time=148.976..148.976 rows=0 loops=9)

123.          

Initplan (forResult)

124. 2.412 1,340.127 ↑ 1.0 1 9

Aggregate (cost=23,533.08..23,533.09 rows=1 width=32) (actual time=148.903..148.903 rows=1 loops=9)

125. 0.225 0.225 ↑ 1.1 9 9

Index Scan using co_rows_sernr_idx on co_rows cr_2 (cost=0.28..6.45 rows=10 width=54) (actual time=0.009..0.025 rows=9 loops=9)

  • Index Cond: (sernr = h.sernr)
126.          

SubPlan (forAggregate)

127. 0.231 333.410 ↑ 1.0 1 77

Aggregate (cost=585.83..585.84 rows=1 width=32) (actual time=4.330..4.330 rows=1 loops=77)

128. 0.077 333.179 ↓ 0.0 0 77

Result (cost=0.28..585.80 rows=1 width=42) (actual time=4.323..4.327 rows=0 loops=77)

  • One-Time Filter: (cr_2.sernr = h.sernr)
129. 14.091 333.102 ↓ 0.0 0 77

Nested Loop (cost=0.28..585.80 rows=1 width=42) (actual time=4.322..4.326 rows=0 loops=77)

  • Join Filter: (cr2_8.so_ref = wt_8.sernr)
  • Rows Removed by Join Filter: 2572
130. 0.462 0.462 ↑ 1.0 1 77

Index Scan using co_rows_pkey on co_rows cr2_8 (cost=0.28..2.29 rows=1 width=8) (actual time=0.005..0.006 rows=1 loops=77)

  • Index Cond: (cr_2.id = id)
131. 318.549 318.549 ↑ 1.7 2,572 77

Seq Scan on working_times wt_8 (cost=0.00..529.37 rows=4,331 width=42) (actual time=3.170..4.137 rows=2,572 loops=77)

  • Filter: ((operation_end IS NOT NULL) AND (date(operation_start) >= '2018-12-01'::date))
  • Rows Removed by Filter: 10585
132. 0.154 335.412 ↑ 1.0 1 77

Aggregate (cost=589.85..589.86 rows=1 width=32) (actual time=4.356..4.356 rows=1 loops=77)

133. 0.231 335.258 ↓ 0.0 0 77

Subquery Scan on wts_4 (cost=587.34..589.34 rows=100 width=56) (actual time=4.354..4.354 rows=0 loops=77)

134. 0.000 335.027 ↓ 0.0 0 77

HashAggregate (cost=587.34..588.34 rows=100 width=40) (actual time=4.351..4.351 rows=0 loops=77)

  • Group Key: d_7.machine
135.          

Initplan (forHashAggregate)

136. 0.231 334.257 ↑ 1.0 1 77

Aggregate (cost=585.83..585.84 rows=1 width=32) (actual time=4.341..4.341 rows=1 loops=77)

137. 0.154 334.026 ↓ 0.0 0 77

Result (cost=0.28..585.80 rows=1 width=42) (actual time=4.333..4.338 rows=0 loops=77)

  • One-Time Filter: (cr_2.sernr = h.sernr)
138. 13.860 333.872 ↓ 0.0 0 77

Nested Loop (cost=0.28..585.80 rows=1 width=42) (actual time=4.332..4.336 rows=0 loops=77)

  • Join Filter: (cr2_9.so_ref = wt_9.sernr)
  • Rows Removed by Join Filter: 2572
139. 0.693 0.693 ↑ 1.0 1 77

Index Scan using co_rows_pkey on co_rows cr2_9 (cost=0.28..2.29 rows=1 width=8) (actual time=0.008..0.009 rows=1 loops=77)

  • Index Cond: (cr_2.id = id)
140. 319.319 319.319 ↑ 1.7 2,572 77

Seq Scan on working_times wt_9 (cost=0.00..529.37 rows=4,331 width=42) (actual time=3.178..4.147 rows=2,572 loops=77)

  • Filter: ((operation_end IS NOT NULL) AND (date(operation_start) >= '2018-12-01'::date))
  • Rows Removed by Filter: 10585
141. 334.796 334.796 ↓ 0.0 0 77

Function Scan on json_to_recordset d_7 (cost=0.00..1.00 rows=100 width=36) (actual time=4.348..4.348 rows=0 loops=77)

142. 0.077 332.409 ↑ 1.0 1 77

Aggregate (cost=589.85..589.86 rows=1 width=32) (actual time=4.317..4.317 rows=1 loops=77)

143. 0.231 332.332 ↓ 0.0 0 77

Subquery Scan on wts_5 (cost=587.34..589.34 rows=100 width=56) (actual time=4.316..4.316 rows=0 loops=77)

144. 0.000 332.101 ↓ 0.0 0 77

HashAggregate (cost=587.34..588.34 rows=100 width=40) (actual time=4.313..4.313 rows=0 loops=77)

  • Group Key: d_8.worker_code
145.          

Initplan (forHashAggregate)

146. 0.308 331.408 ↑ 1.0 1 77

Aggregate (cost=585.83..585.84 rows=1 width=32) (actual time=4.304..4.304 rows=1 loops=77)

147. 0.077 331.100 ↓ 0.0 0 77

Result (cost=0.28..585.80 rows=1 width=42) (actual time=4.296..4.300 rows=0 loops=77)

  • One-Time Filter: (cr_2.sernr = h.sernr)
148. 13.552 331.023 ↓ 0.0 0 77

Nested Loop (cost=0.28..585.80 rows=1 width=42) (actual time=4.295..4.299 rows=0 loops=77)

  • Join Filter: (cr2_10.so_ref = wt_10.sernr)
  • Rows Removed by Join Filter: 2572
149. 0.616 0.616 ↑ 1.0 1 77

Index Scan using co_rows_pkey on co_rows cr2_10 (cost=0.28..2.29 rows=1 width=8) (actual time=0.006..0.008 rows=1 loops=77)

  • Index Cond: (cr_2.id = id)
150. 316.855 316.855 ↑ 1.7 2,572 77

Seq Scan on working_times wt_10 (cost=0.00..529.37 rows=4,331 width=42) (actual time=3.155..4.115 rows=2,572 loops=77)

  • Filter: ((operation_end IS NOT NULL) AND (date(operation_start) >= '2018-12-01'::date))
  • Rows Removed by Filter: 10585
151. 331.870 331.870 ↓ 0.0 0 77

Function Scan on json_to_recordset d_8 (cost=0.00..1.00 rows=100 width=36) (actual time=4.310..4.310 rows=0 loops=77)

152. 0.000 336.259 ↑ 1.0 1 77

Aggregate (cost=587.09..587.10 rows=1 width=8) (actual time=4.367..4.367 rows=1 loops=77)

153.          

Initplan (forAggregate)

154. 0.308 335.643 ↑ 1.0 1 77

Aggregate (cost=585.83..585.84 rows=1 width=32) (actual time=4.359..4.359 rows=1 loops=77)

155. 0.077 335.335 ↓ 0.0 0 77

Result (cost=0.28..585.80 rows=1 width=42) (actual time=4.351..4.355 rows=0 loops=77)

  • One-Time Filter: (cr_2.sernr = h.sernr)
156. 14.168 335.258 ↓ 0.0 0 77

Nested Loop (cost=0.28..585.80 rows=1 width=42) (actual time=4.350..4.354 rows=0 loops=77)

  • Join Filter: (cr2_11.so_ref = wt_11.sernr)
  • Rows Removed by Join Filter: 2572
157. 0.616 0.616 ↑ 1.0 1 77

Index Scan using co_rows_pkey on co_rows cr2_11 (cost=0.28..2.29 rows=1 width=8) (actual time=0.007..0.008 rows=1 loops=77)

  • Index Cond: (cr_2.id = id)
158. 320.474 320.474 ↑ 1.7 2,572 77

Seq Scan on working_times wt_11 (cost=0.00..529.37 rows=4,331 width=42) (actual time=3.192..4.162 rows=2,572 loops=77)

  • Filter: ((operation_end IS NOT NULL) AND (date(operation_start) >= '2018-12-01'::date))
  • Rows Removed by Filter: 10585
159. 336.105 336.105 ↓ 0.0 0 77

Function Scan on json_to_recordset d_9 (cost=0.00..1.00 rows=100 width=4) (actual time=4.365..4.365 rows=0 loops=77)

160. 0.045 1,340.766 ↓ 0.0 0 9

ProjectSet (cost=0.00..51.75 rows=10,000 width=32) (actual time=148.974..148.974 rows=0 loops=9)

161. 1,340.721 1,340.721 ↓ 0.0 0 9

Function Scan on json_to_recordset d_10 (cost=0.00..1.00 rows=100 width=32) (actual time=148.969..148.969 rows=0 loops=9)

  • Filter: (workers_totals IS NOT NULL)
  • Rows Removed by Filter: 8
162. 0.027 1,310.598 ↑ 1.0 1 9

Aggregate (cost=23,989.85..23,989.86 rows=1 width=32) (actual time=145.622..145.622 rows=1 loops=9)

163. 0.045 1,310.571 ↓ 0.0 0 9

Subquery Scan on wts_9 (cost=23,984.85..23,988.85 rows=200 width=56) (actual time=145.619..145.619 rows=0 loops=9)

164. 0.036 1,310.526 ↓ 0.0 0 9

HashAggregate (cost=23,984.85..23,986.85 rows=200 width=40) (actual time=145.614..145.614 rows=0 loops=9)

  • Group Key: ((json_array_elements(d_14.machines_totals)) ->> 'machine'::text)
165. 0.000 1,310.490 ↓ 0.0 0 9

Result (cost=23,533.10..23,834.85 rows=10,000 width=36) (actual time=145.609..145.610 rows=0 loops=9)

166.          

Initplan (forResult)

167. 2.089 1,309.842 ↑ 1.0 1 9

Aggregate (cost=23,533.08..23,533.09 rows=1 width=32) (actual time=145.538..145.538 rows=1 loops=9)

168. 0.216 0.216 ↑ 1.1 9 9

Index Scan using co_rows_sernr_idx on co_rows cr_3 (cost=0.28..6.45 rows=10 width=54) (actual time=0.009..0.024 rows=9 loops=9)

  • Index Cond: (sernr = h.sernr)
169.          

SubPlan (forAggregate)

170. 0.231 331.793 ↑ 1.0 1 77

Aggregate (cost=585.83..585.84 rows=1 width=32) (actual time=4.309..4.309 rows=1 loops=77)

171. 0.077 331.562 ↓ 0.0 0 77

Result (cost=0.28..585.80 rows=1 width=42) (actual time=4.302..4.306 rows=0 loops=77)

  • One-Time Filter: (cr_3.sernr = h.sernr)
172. 13.860 331.485 ↓ 0.0 0 77

Nested Loop (cost=0.28..585.80 rows=1 width=42) (actual time=4.301..4.305 rows=0 loops=77)

  • Join Filter: (cr2_12.so_ref = wt_12.sernr)
  • Rows Removed by Join Filter: 2572
173. 0.462 0.462 ↑ 1.0 1 77

Index Scan using co_rows_pkey on co_rows cr2_12 (cost=0.28..2.29 rows=1 width=8) (actual time=0.005..0.006 rows=1 loops=77)

  • Index Cond: (cr_3.id = id)
174. 317.163 317.163 ↑ 1.7 2,572 77

Seq Scan on working_times wt_12 (cost=0.00..529.37 rows=4,331 width=42) (actual time=3.168..4.119 rows=2,572 loops=77)

  • Filter: ((operation_end IS NOT NULL) AND (date(operation_start) >= '2018-12-01'::date))
  • Rows Removed by Filter: 10585
175. 0.154 328.251 ↑ 1.0 1 77

Aggregate (cost=589.85..589.86 rows=1 width=32) (actual time=4.263..4.263 rows=1 loops=77)

176. 0.154 328.097 ↓ 0.0 0 77

Subquery Scan on wts_7 (cost=587.34..589.34 rows=100 width=56) (actual time=4.261..4.261 rows=0 loops=77)

177. 0.000 327.943 ↓ 0.0 0 77

HashAggregate (cost=587.34..588.34 rows=100 width=40) (actual time=4.259..4.259 rows=0 loops=77)

  • Group Key: d_11.machine
178.          

Initplan (forHashAggregate)

179. 0.231 327.250 ↑ 1.0 1 77

Aggregate (cost=585.83..585.84 rows=1 width=32) (actual time=4.250..4.250 rows=1 loops=77)

180. 0.077 327.019 ↓ 0.0 0 77

Result (cost=0.28..585.80 rows=1 width=42) (actual time=4.243..4.247 rows=0 loops=77)

  • One-Time Filter: (cr_3.sernr = h.sernr)
181. 13.860 326.942 ↓ 0.0 0 77

Nested Loop (cost=0.28..585.80 rows=1 width=42) (actual time=4.242..4.246 rows=0 loops=77)

  • Join Filter: (cr2_13.so_ref = wt_13.sernr)
  • Rows Removed by Join Filter: 2572
182. 0.539 0.539 ↑ 1.0 1 77

Index Scan using co_rows_pkey on co_rows cr2_13 (cost=0.28..2.29 rows=1 width=8) (actual time=0.005..0.007 rows=1 loops=77)

  • Index Cond: (cr_3.id = id)
183. 312.543 312.543 ↑ 1.7 2,572 77

Seq Scan on working_times wt_13 (cost=0.00..529.37 rows=4,331 width=42) (actual time=3.120..4.059 rows=2,572 loops=77)

  • Filter: ((operation_end IS NOT NULL) AND (date(operation_start) >= '2018-12-01'::date))
  • Rows Removed by Filter: 10585
184. 327.712 327.712 ↓ 0.0 0 77

Function Scan on json_to_recordset d_11 (cost=0.00..1.00 rows=100 width=36) (actual time=4.256..4.256 rows=0 loops=77)

185. 0.077 323.015 ↑ 1.0 1 77

Aggregate (cost=589.85..589.86 rows=1 width=32) (actual time=4.195..4.195 rows=1 loops=77)

186. 0.154 322.938 ↓ 0.0 0 77

Subquery Scan on wts_8 (cost=587.34..589.34 rows=100 width=56) (actual time=4.194..4.194 rows=0 loops=77)

187. 0.000 322.784 ↓ 0.0 0 77

HashAggregate (cost=587.34..588.34 rows=100 width=40) (actual time=4.192..4.192 rows=0 loops=77)

  • Group Key: d_12.worker_code
188.          

Initplan (forHashAggregate)

189. 0.308 322.014 ↑ 1.0 1 77

Aggregate (cost=585.83..585.84 rows=1 width=32) (actual time=4.181..4.182 rows=1 loops=77)

190. 0.077 321.706 ↓ 0.0 0 77

Result (cost=0.28..585.80 rows=1 width=42) (actual time=4.175..4.178 rows=0 loops=77)

  • One-Time Filter: (cr_3.sernr = h.sernr)
191. 13.244 321.629 ↓ 0.0 0 77

Nested Loop (cost=0.28..585.80 rows=1 width=42) (actual time=4.174..4.177 rows=0 loops=77)

  • Join Filter: (cr2_14.so_ref = wt_14.sernr)
  • Rows Removed by Join Filter: 2572
192. 0.539 0.539 ↑ 1.0 1 77

Index Scan using co_rows_pkey on co_rows cr2_14 (cost=0.28..2.29 rows=1 width=8) (actual time=0.006..0.007 rows=1 loops=77)

  • Index Cond: (cr_3.id = id)
193. 307.846 307.846 ↑ 1.7 2,572 77

Seq Scan on working_times wt_14 (cost=0.00..529.37 rows=4,331 width=42) (actual time=3.075..3.998 rows=2,572 loops=77)

  • Filter: ((operation_end IS NOT NULL) AND (date(operation_start) >= '2018-12-01'::date))
  • Rows Removed by Filter: 10585
194. 322.630 322.630 ↓ 0.0 0 77

Function Scan on json_to_recordset d_12 (cost=0.00..1.00 rows=100 width=36) (actual time=4.190..4.190 rows=0 loops=77)

195. 0.000 324.478 ↑ 1.0 1 77

Aggregate (cost=587.09..587.10 rows=1 width=8) (actual time=4.214..4.214 rows=1 loops=77)

196.          

Initplan (forAggregate)

197. 0.231 323.862 ↑ 1.0 1 77

Aggregate (cost=585.83..585.84 rows=1 width=32) (actual time=4.206..4.206 rows=1 loops=77)

198. 0.077 323.631 ↓ 0.0 0 77

Result (cost=0.28..585.80 rows=1 width=42) (actual time=4.199..4.203 rows=0 loops=77)

  • One-Time Filter: (cr_3.sernr = h.sernr)
199. 13.552 323.554 ↓ 0.0 0 77

Nested Loop (cost=0.28..585.80 rows=1 width=42) (actual time=4.197..4.202 rows=0 loops=77)

  • Join Filter: (cr2_15.so_ref = wt_15.sernr)
  • Rows Removed by Join Filter: 2572
200. 0.539 0.539 ↑ 1.0 1 77

Index Scan using co_rows_pkey on co_rows cr2_15 (cost=0.28..2.29 rows=1 width=8) (actual time=0.005..0.007 rows=1 loops=77)

  • Index Cond: (cr_3.id = id)
201. 309.463 309.463 ↑ 1.7 2,572 77

Seq Scan on working_times wt_15 (cost=0.00..529.37 rows=4,331 width=42) (actual time=3.071..4.019 rows=2,572 loops=77)

  • Filter: ((operation_end IS NOT NULL) AND (date(operation_start) >= '2018-12-01'::date))
  • Rows Removed by Filter: 10585
202. 324.324 324.324 ↓ 0.0 0 77

Function Scan on json_to_recordset d_13 (cost=0.00..1.00 rows=100 width=4) (actual time=4.212..4.212 rows=0 loops=77)

203. 0.027 1,310.472 ↓ 0.0 0 9

ProjectSet (cost=0.00..51.75 rows=10,000 width=32) (actual time=145.608..145.608 rows=0 loops=9)

204. 1,310.445 1,310.445 ↓ 0.0 0 9

Function Scan on json_to_recordset d_14 (cost=0.00..1.00 rows=100 width=32) (actual time=145.604..145.605 rows=0 loops=9)

  • Filter: (machines_totals IS NOT NULL)
  • Rows Removed by Filter: 8