-
Notifications
You must be signed in to change notification settings - Fork 16
/
example.json
295 lines (295 loc) · 12.9 KB
/
example.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
[
{
"Plan": {
"Node Type": "Aggregate",
"Strategy": "Plain",
"Partial Mode": "Simple",
"Parallel Aware": false,
"Startup Cost": 251.59,
"Total Cost": 251.61,
"Plan Rows": 1,
"Plan Width": 80,
"Actual Startup Time": 18.166,
"Actual Total Time": 18.166,
"Actual Rows": 1,
"Actual Loops": 1,
"Output": ["$3", "count(ROW(pg_source.uuid, pg_source.task_state, pg_source.exit_code, pg_source.stopped_at, pg_source.started_at, pg_source.\"user\", pg_source.image))", "'{}'::text[]", "(COALESCE(json_agg(ROW(pg_source.uuid, pg_source.task_state, pg_source.exit_code, pg_source.stopped_at, pg_source.started_at, pg_source.\"user\", pg_source.image)), '[]'::json))::character varying"],
"Shared Hit Blocks": 2537,
"Shared Read Blocks": 0,
"Shared Dirtied Blocks": 0,
"Shared Written Blocks": 0,
"Local Hit Blocks": 0,
"Local Read Blocks": 0,
"Local Dirtied Blocks": 0,
"Local Written Blocks": 0,
"Temp Read Blocks": 0,
"Temp Written Blocks": 0,
"Plans": [
{
"Node Type": "Limit",
"Parent Relationship": "InitPlan",
"Subplan Name": "CTE pg_source",
"Parallel Aware": false,
"Startup Cost": 0.55,
"Total Cost": 46.74,
"Plan Rows": 51,
"Plan Width": 108,
"Actual Startup Time": 0.738,
"Actual Total Time": 3.968,
"Actual Rows": 51,
"Actual Loops": 1,
"Output": ["tasks.uuid", "(CASE WHEN tasks.defunct THEN 'defunct'::task_state WHEN (tasks.cancelled_at IS NOT NULL) THEN 'cancelled'::task_state WHEN (tasks.stopped_at IS NOT NULL) THEN CASE tasks.exit_code WHEN 0 THEN 'success'::task_state ELSE 'failed'::task_state END ELSE 'running'::task_state END)", "tasks.exit_code", "tasks.stopped_at", "tasks.started_at", "(row_to_json((ROW(users.username))))", "(row_to_json((ROW(images.id, images.name, images.description, images.cost, images.hash, images.author, images.tags, images.owner_id, images.deleted_at, images.updated_at, images.icon))))", "tasks.id"],
"Shared Hit Blocks": 371,
"Shared Read Blocks": 0,
"Shared Dirtied Blocks": 0,
"Shared Written Blocks": 0,
"Local Hit Blocks": 0,
"Local Read Blocks": 0,
"Local Dirtied Blocks": 0,
"Local Written Blocks": 0,
"Temp Read Blocks": 0,
"Temp Written Blocks": 0,
"Plans": [
{
"Node Type": "Nested Loop",
"Parent Relationship": "Outer",
"Parallel Aware": false,
"Join Type": "Left",
"Startup Cost": 0.55,
"Total Cost": 430.75,
"Plan Rows": 475,
"Plan Width": 108,
"Actual Startup Time": 0.736,
"Actual Total Time": 3.945,
"Actual Rows": 51,
"Actual Loops": 1,
"Output": ["tasks.uuid", "CASE WHEN tasks.defunct THEN 'defunct'::task_state WHEN (tasks.cancelled_at IS NOT NULL) THEN 'cancelled'::task_state WHEN (tasks.stopped_at IS NOT NULL) THEN CASE tasks.exit_code WHEN 0 THEN 'success'::task_state ELSE 'failed'::task_state END ELSE 'running'::task_state END", "tasks.exit_code", "tasks.stopped_at", "tasks.started_at", "row_to_json((ROW(users.username)))", "row_to_json((ROW(images.id, images.name, images.description, images.cost, images.hash, images.author, images.tags, images.owner_id, images.deleted_at, images.updated_at, images.icon)))", "tasks.id"],
"Inner Unique": true,
"Shared Hit Blocks": 371,
"Shared Read Blocks": 0,
"Shared Dirtied Blocks": 0,
"Shared Written Blocks": 0,
"Local Hit Blocks": 0,
"Local Read Blocks": 0,
"Local Dirtied Blocks": 0,
"Local Written Blocks": 0,
"Temp Read Blocks": 0,
"Temp Written Blocks": 0,
"Plans": [
{
"Node Type": "Nested Loop",
"Parent Relationship": "Outer",
"Parallel Aware": false,
"Join Type": "Left",
"Startup Cost": 0.41,
"Total Cost": 343.75,
"Plan Rows": 475,
"Plan Width": 85,
"Actual Startup Time": 0.605,
"Actual Total Time": 2.267,
"Actual Rows": 51,
"Actual Loops": 1,
"Output": ["tasks.uuid", "tasks.defunct", "tasks.cancelled_at", "tasks.stopped_at", "tasks.exit_code", "tasks.started_at", "tasks.id", "tasks.image_id", "(ROW(users.username))"],
"Inner Unique": true,
"Shared Hit Blocks": 265,
"Shared Read Blocks": 0,
"Shared Dirtied Blocks": 0,
"Shared Written Blocks": 0,
"Local Hit Blocks": 0,
"Local Read Blocks": 0,
"Local Dirtied Blocks": 0,
"Local Written Blocks": 0,
"Temp Read Blocks": 0,
"Temp Written Blocks": 0,
"Plans": [
{
"Node Type": "Index Scan",
"Parent Relationship": "Outer",
"Parallel Aware": false,
"Scan Direction": "Backward",
"Index Name": "tasks_pkey",
"Relation Name": "tasks",
"Schema": "public",
"Alias": "tasks",
"Startup Cost": 0.28,
"Total Cost": 258.71,
"Plan Rows": 475,
"Plan Width": 57,
"Actual Startup Time": 0.593,
"Actual Total Time": 2.013,
"Actual Rows": 51,
"Actual Loops": 1,
"Output": ["tasks.id", "tasks.image_id", "tasks.container_id", "tasks.uuid", "tasks.user_id", "tasks.exit_code", "tasks.defunct", "tasks.started_at", "tasks.stopped_at", "tasks.cancelled_at", "tasks.cancelled_by"],
"Filter": "(is_running(tasks.*) IS FALSE)",
"Rows Removed by Filter": 2,
"Shared Hit Blocks": 163,
"Shared Read Blocks": 0,
"Shared Dirtied Blocks": 0,
"Shared Written Blocks": 0,
"Local Hit Blocks": 0,
"Local Read Blocks": 0,
"Local Dirtied Blocks": 0,
"Local Written Blocks": 0,
"Temp Read Blocks": 0,
"Temp Written Blocks": 0
},
{
"Node Type": "Index Scan",
"Parent Relationship": "Inner",
"Parallel Aware": false,
"Scan Direction": "Forward",
"Index Name": "users_pkey",
"Relation Name": "users",
"Schema": "public",
"Alias": "users",
"Startup Cost": 0.14,
"Total Cost": 0.18,
"Plan Rows": 1,
"Plan Width": 36,
"Actual Startup Time": 0.003,
"Actual Total Time": 0.003,
"Actual Rows": 1,
"Actual Loops": 51,
"Output": ["users.id", "ROW(users.username)"],
"Index Cond": "(users.id = tasks.user_id)",
"Rows Removed by Index Recheck": 0,
"Shared Hit Blocks": 102,
"Shared Read Blocks": 0,
"Shared Dirtied Blocks": 0,
"Shared Written Blocks": 0,
"Local Hit Blocks": 0,
"Local Read Blocks": 0,
"Local Dirtied Blocks": 0,
"Local Written Blocks": 0,
"Temp Read Blocks": 0,
"Temp Written Blocks": 0
}
]
},
{
"Node Type": "Index Scan",
"Parent Relationship": "Inner",
"Parallel Aware": false,
"Scan Direction": "Forward",
"Index Name": "images_pkey",
"Relation Name": "images",
"Schema": "public",
"Alias": "images",
"Startup Cost": 0.14,
"Total Cost": 0.18,
"Plan Rows": 1,
"Plan Width": 36,
"Actual Startup Time": 0.004,
"Actual Total Time": 0.004,
"Actual Rows": 1,
"Actual Loops": 51,
"Output": ["images.id", "ROW(images.id, images.name, images.description, images.cost, images.hash, images.author, images.tags, images.owner_id, images.deleted_at, images.updated_at, images.icon)"],
"Index Cond": "(images.id = tasks.image_id)",
"Rows Removed by Index Recheck": 0,
"Shared Hit Blocks": 102,
"Shared Read Blocks": 0,
"Shared Dirtied Blocks": 0,
"Shared Written Blocks": 0,
"Local Hit Blocks": 0,
"Local Read Blocks": 0,
"Local Dirtied Blocks": 0,
"Local Written Blocks": 0,
"Temp Read Blocks": 0,
"Temp Written Blocks": 0
}
]
}
]
},
{
"Node Type": "Aggregate",
"Strategy": "Plain",
"Partial Mode": "Simple",
"Parent Relationship": "InitPlan",
"Subplan Name": "InitPlan 2 (returns $3)",
"Parallel Aware": false,
"Startup Cost": 203.57,
"Total Cost": 203.58,
"Plan Rows": 1,
"Plan Width": 8,
"Actual Startup Time": 12.861,
"Actual Total Time": 12.862,
"Actual Rows": 1,
"Actual Loops": 1,
"Output": ["count(*)"],
"Shared Hit Blocks": 2158,
"Shared Read Blocks": 0,
"Shared Dirtied Blocks": 0,
"Shared Written Blocks": 0,
"Local Hit Blocks": 0,
"Local Read Blocks": 0,
"Local Dirtied Blocks": 0,
"Local Written Blocks": 0,
"Temp Read Blocks": 0,
"Temp Written Blocks": 0,
"Plans": [
{
"Node Type": "Seq Scan",
"Parent Relationship": "Outer",
"Parallel Aware": false,
"Relation Name": "tasks",
"Schema": "public",
"Alias": "tasks_1",
"Startup Cost": 0.00,
"Total Cost": 202.38,
"Plan Rows": 475,
"Plan Width": 0,
"Actual Startup Time": 0.505,
"Actual Total Time": 12.615,
"Actual Rows": 711,
"Actual Loops": 1,
"Output": ["tasks_1.id", "tasks_1.image_id", "tasks_1.container_id", "tasks_1.uuid", "tasks_1.user_id", "tasks_1.exit_code", "tasks_1.defunct", "tasks_1.started_at", "tasks_1.stopped_at", "tasks_1.cancelled_at", "tasks_1.cancelled_by"],
"Filter": "(is_running(tasks_1.*) IS FALSE)",
"Rows Removed by Filter": 2,
"Shared Hit Blocks": 2158,
"Shared Read Blocks": 0,
"Shared Dirtied Blocks": 0,
"Shared Written Blocks": 0,
"Local Hit Blocks": 0,
"Local Read Blocks": 0,
"Local Dirtied Blocks": 0,
"Local Written Blocks": 0,
"Temp Read Blocks": 0,
"Temp Written Blocks": 0
}
]
},
{
"Node Type": "CTE Scan",
"Parent Relationship": "Outer",
"Parallel Aware": false,
"CTE Name": "pg_source",
"Alias": "pg_source",
"Startup Cost": 0.00,
"Total Cost": 1.02,
"Plan Rows": 51,
"Plan Width": 104,
"Actual Startup Time": 0.759,
"Actual Total Time": 4.202,
"Actual Rows": 51,
"Actual Loops": 1,
"Output": ["pg_source.uuid", "pg_source.task_state", "pg_source.exit_code", "pg_source.stopped_at", "pg_source.started_at", "pg_source.\"user\"", "pg_source.image"],
"Shared Hit Blocks": 371,
"Shared Read Blocks": 0,
"Shared Dirtied Blocks": 0,
"Shared Written Blocks": 0,
"Local Hit Blocks": 0,
"Local Read Blocks": 0,
"Local Dirtied Blocks": 0,
"Local Written Blocks": 0,
"Temp Read Blocks": 0,
"Temp Written Blocks": 0
}
]
},
"Planning Time": 4.029,
"Triggers": [
],
"Execution Time": 18.795
}
]