1
|
"QUERY PLAN"
|
2
|
"[
|
3
|
{
|
4
|
""Plan"": {
|
5
|
""Node Type"": ""Sort"",
|
6
|
""Parallel Aware"": false,
|
7
|
""Async Capable"": false,
|
8
|
""Startup Cost"": 3444.66,
|
9
|
""Total Cost"": 3448.82,
|
10
|
""Plan Rows"": 1665,
|
11
|
""Plan Width"": 276,
|
12
|
""Actual Rows"": 0,
|
13
|
""Actual Loops"": 1,
|
14
|
""Sort Key"": [""issues.id DESC""],
|
15
|
""Sort Method"": ""quicksort"",
|
16
|
""Sort Space Used"": 25,
|
17
|
""Sort Space Type"": ""Memory"",
|
18
|
""Plans"": [
|
19
|
{
|
20
|
""Node Type"": ""Hash Join"",
|
21
|
""Parent Relationship"": ""Outer"",
|
22
|
""Parallel Aware"": false,
|
23
|
""Async Capable"": false,
|
24
|
""Join Type"": ""Inner"",
|
25
|
""Startup Cost"": 122.45,
|
26
|
""Total Cost"": 3355.57,
|
27
|
""Plan Rows"": 1665,
|
28
|
""Plan Width"": 276,
|
29
|
""Actual Rows"": 0,
|
30
|
""Actual Loops"": 1,
|
31
|
""Inner Unique"": true,
|
32
|
""Hash Cond"": ""(issues.status_id = issue_statuses.id)"",
|
33
|
""Plans"": [
|
34
|
{
|
35
|
""Node Type"": ""Hash Join"",
|
36
|
""Parent Relationship"": ""Outer"",
|
37
|
""Parallel Aware"": false,
|
38
|
""Async Capable"": false,
|
39
|
""Join Type"": ""Semi"",
|
40
|
""Startup Cost"": 121.31,
|
41
|
""Total Cost"": 3346.97,
|
42
|
""Plan Rows"": 1665,
|
43
|
""Plan Width"": 260,
|
44
|
""Actual Rows"": 0,
|
45
|
""Actual Loops"": 1,
|
46
|
""Inner Unique"": false,
|
47
|
""Hash Cond"": ""(projects.id = em.project_id)"",
|
48
|
""Plans"": [
|
49
|
{
|
50
|
""Node Type"": ""Hash Join"",
|
51
|
""Parent Relationship"": ""Outer"",
|
52
|
""Parallel Aware"": false,
|
53
|
""Async Capable"": false,
|
54
|
""Join Type"": ""Inner"",
|
55
|
""Startup Cost"": 22.05,
|
56
|
""Total Cost"": 3206.07,
|
57
|
""Plan Rows"": 1672,
|
58
|
""Plan Width"": 260,
|
59
|
""Actual Rows"": 0,
|
60
|
""Actual Loops"": 1,
|
61
|
""Inner Unique"": true,
|
62
|
""Hash Cond"": ""(issues.project_id = projects.id)"",
|
63
|
""Join Filter"": ""(SubPlan 4)"",
|
64
|
""Rows Removed by Join Filter"": 5012,
|
65
|
""Plans"": [
|
66
|
{
|
67
|
""Node Type"": ""Hash Join"",
|
68
|
""Parent Relationship"": ""Outer"",
|
69
|
""Parallel Aware"": false,
|
70
|
""Async Capable"": false,
|
71
|
""Join Type"": ""Inner"",
|
72
|
""Startup Cost"": 1.11,
|
73
|
""Total Cost"": 149.72,
|
74
|
""Plan Rows"": 3343,
|
75
|
""Plan Width"": 152,
|
76
|
""Actual Rows"": 5012,
|
77
|
""Actual Loops"": 1,
|
78
|
""Inner Unique"": true,
|
79
|
""Hash Cond"": ""(issues.status_id = issue_statuses_1.id)"",
|
80
|
""Plans"": [
|
81
|
{
|
82
|
""Node Type"": ""Seq Scan"",
|
83
|
""Parent Relationship"": ""Outer"",
|
84
|
""Parallel Aware"": false,
|
85
|
""Async Capable"": false,
|
86
|
""Relation Name"": ""issues"",
|
87
|
""Alias"": ""issues"",
|
88
|
""Startup Cost"": 0.00,
|
89
|
""Total Cost"": 126.15,
|
90
|
""Plan Rows"": 5015,
|
91
|
""Plan Width"": 148,
|
92
|
""Actual Rows"": 5015,
|
93
|
""Actual Loops"": 1
|
94
|
},
|
95
|
{
|
96
|
""Node Type"": ""Hash"",
|
97
|
""Parent Relationship"": ""Inner"",
|
98
|
""Parallel Aware"": false,
|
99
|
""Async Capable"": false,
|
100
|
""Startup Cost"": 1.06,
|
101
|
""Total Cost"": 1.06,
|
102
|
""Plan Rows"": 4,
|
103
|
""Plan Width"": 4,
|
104
|
""Actual Rows"": 4,
|
105
|
""Actual Loops"": 1,
|
106
|
""Hash Buckets"": 1024,
|
107
|
""Original Hash Buckets"": 1024,
|
108
|
""Hash Batches"": 1,
|
109
|
""Original Hash Batches"": 1,
|
110
|
""Peak Memory Usage"": 9,
|
111
|
""Plans"": [
|
112
|
{
|
113
|
""Node Type"": ""Seq Scan"",
|
114
|
""Parent Relationship"": ""Outer"",
|
115
|
""Parallel Aware"": false,
|
116
|
""Async Capable"": false,
|
117
|
""Relation Name"": ""issue_statuses"",
|
118
|
""Alias"": ""issue_statuses_1"",
|
119
|
""Startup Cost"": 0.00,
|
120
|
""Total Cost"": 1.06,
|
121
|
""Plan Rows"": 4,
|
122
|
""Plan Width"": 4,
|
123
|
""Actual Rows"": 4,
|
124
|
""Actual Loops"": 1,
|
125
|
""Filter"": ""(NOT is_closed)"",
|
126
|
""Rows Removed by Filter"": 2
|
127
|
}
|
128
|
]
|
129
|
}
|
130
|
]
|
131
|
},
|
132
|
{
|
133
|
""Node Type"": ""Hash"",
|
134
|
""Parent Relationship"": ""Inner"",
|
135
|
""Parallel Aware"": false,
|
136
|
""Async Capable"": false,
|
137
|
""Startup Cost"": 14.61,
|
138
|
""Total Cost"": 14.61,
|
139
|
""Plan Rows"": 507,
|
140
|
""Plan Width"": 108,
|
141
|
""Actual Rows"": 507,
|
142
|
""Actual Loops"": 1,
|
143
|
""Hash Buckets"": 1024,
|
144
|
""Original Hash Buckets"": 1024,
|
145
|
""Hash Batches"": 1,
|
146
|
""Original Hash Batches"": 1,
|
147
|
""Peak Memory Usage"": 63,
|
148
|
""Plans"": [
|
149
|
{
|
150
|
""Node Type"": ""Seq Scan"",
|
151
|
""Parent Relationship"": ""Outer"",
|
152
|
""Parallel Aware"": false,
|
153
|
""Async Capable"": false,
|
154
|
""Relation Name"": ""projects"",
|
155
|
""Alias"": ""projects"",
|
156
|
""Startup Cost"": 0.00,
|
157
|
""Total Cost"": 14.61,
|
158
|
""Plan Rows"": 507,
|
159
|
""Plan Width"": 108,
|
160
|
""Actual Rows"": 507,
|
161
|
""Actual Loops"": 1,
|
162
|
""Filter"": ""((status <> 9) AND (status <> 10))"",
|
163
|
""Rows Removed by Filter"": 0
|
164
|
}
|
165
|
]
|
166
|
},
|
167
|
{
|
168
|
""Node Type"": ""Result"",
|
169
|
""Parent Relationship"": ""SubPlan"",
|
170
|
""Subplan Name"": ""SubPlan 4"",
|
171
|
""Parallel Aware"": false,
|
172
|
""Async Capable"": false,
|
173
|
""Startup Cost"": 77.45,
|
174
|
""Total Cost"": 1940.27,
|
175
|
""Plan Rows"": 1,
|
176
|
""Plan Width"": 4,
|
177
|
""Actual Rows"": 0,
|
178
|
""Actual Loops"": 5012,
|
179
|
""One-Time Filter"": ""((projects.status <> 9) AND (projects.status <> 10) AND $3)"",
|
180
|
""Plans"": [
|
181
|
{
|
182
|
""Node Type"": ""Seq Scan"",
|
183
|
""Parent Relationship"": ""InitPlan"",
|
184
|
""Subplan Name"": ""InitPlan 1 (returns $0)"",
|
185
|
""Parallel Aware"": false,
|
186
|
""Async Capable"": false,
|
187
|
""Relation Name"": ""custom_fields"",
|
188
|
""Alias"": ""ifa"",
|
189
|
""Startup Cost"": 0.00,
|
190
|
""Total Cost"": 1.14,
|
191
|
""Plan Rows"": 1,
|
192
|
""Plan Width"": 0,
|
193
|
""Actual Rows"": 0,
|
194
|
""Actual Loops"": 0,
|
195
|
""Filter"": ""(is_for_all AND (id = 13))"",
|
196
|
""Rows Removed by Filter"": 0
|
197
|
},
|
198
|
{
|
199
|
""Node Type"": ""Index Scan"",
|
200
|
""Parent Relationship"": ""InitPlan"",
|
201
|
""Subplan Name"": ""InitPlan 3 (returns $3)"",
|
202
|
""Parallel Aware"": false,
|
203
|
""Async Capable"": false,
|
204
|
""Scan Direction"": ""Forward"",
|
205
|
""Index Name"": ""enabled_modules_project_id"",
|
206
|
""Relation Name"": ""enabled_modules"",
|
207
|
""Alias"": ""em_1"",
|
208
|
""Startup Cost"": 0.28,
|
209
|
""Total Cost"": 8.48,
|
210
|
""Plan Rows"": 1,
|
211
|
""Plan Width"": 0,
|
212
|
""Actual Rows"": 1,
|
213
|
""Actual Loops"": 5012,
|
214
|
""Index Cond"": ""(project_id = projects.id)"",
|
215
|
""Rows Removed by Index Recheck"": 0,
|
216
|
""Filter"": ""((name)::text = 'issue_tracking'::text)"",
|
217
|
""Rows Removed by Filter"": 0
|
218
|
},
|
219
|
{
|
220
|
""Node Type"": ""Nested Loop"",
|
221
|
""Parent Relationship"": ""Outer"",
|
222
|
""Parallel Aware"": false,
|
223
|
""Async Capable"": false,
|
224
|
""Join Type"": ""Inner"",
|
225
|
""Startup Cost"": 77.45,
|
226
|
""Total Cost"": 1940.27,
|
227
|
""Plan Rows"": 1,
|
228
|
""Plan Width"": 4,
|
229
|
""Actual Rows"": 0,
|
230
|
""Actual Loops"": 4988,
|
231
|
""Inner Unique"": true,
|
232
|
""Join Filter"": ""(issues_1.tracker_id = custom_fields_trackers.tracker_id)"",
|
233
|
""Rows Removed by Join Filter"": 0,
|
234
|
""Plans"": [
|
235
|
{
|
236
|
""Node Type"": ""Nested Loop"",
|
237
|
""Parent Relationship"": ""Outer"",
|
238
|
""Parallel Aware"": false,
|
239
|
""Async Capable"": false,
|
240
|
""Join Type"": ""Inner"",
|
241
|
""Startup Cost"": 67.83,
|
242
|
""Total Cost"": 1927.57,
|
243
|
""Plan Rows"": 1,
|
244
|
""Plan Width"": 8,
|
245
|
""Actual Rows"": 0,
|
246
|
""Actual Loops"": 4988,
|
247
|
""Inner Unique"": true,
|
248
|
""Plans"": [
|
249
|
{
|
250
|
""Node Type"": ""Bitmap Heap Scan"",
|
251
|
""Parent Relationship"": ""Outer"",
|
252
|
""Parallel Aware"": false,
|
253
|
""Async Capable"": false,
|
254
|
""Relation Name"": ""custom_values"",
|
255
|
""Alias"": ""custom_values"",
|
256
|
""Startup Cost"": 52.61,
|
257
|
""Total Cost"": 1904.32,
|
258
|
""Plan Rows"": 1,
|
259
|
""Plan Width"": 4,
|
260
|
""Actual Rows"": 0,
|
261
|
""Actual Loops"": 4988,
|
262
|
""Recheck Cond"": ""(custom_field_id = 13)"",
|
263
|
""Rows Removed by Index Recheck"": 0,
|
264
|
""Filter"": ""((value ~~* '%text%'::text) AND ((customized_type)::text = 'Issue'::text))"",
|
265
|
""Rows Removed by Filter"": 5001,
|
266
|
""Exact Heap Blocks"": 8798832,
|
267
|
""Lossy Heap Blocks"": 0,
|
268
|
""Plans"": [
|
269
|
{
|
270
|
""Node Type"": ""Bitmap Index Scan"",
|
271
|
""Parent Relationship"": ""Outer"",
|
272
|
""Parallel Aware"": false,
|
273
|
""Async Capable"": false,
|
274
|
""Index Name"": ""index_custom_values_on_custom_field_id"",
|
275
|
""Startup Cost"": 0.00,
|
276
|
""Total Cost"": 52.60,
|
277
|
""Plan Rows"": 4841,
|
278
|
""Plan Width"": 0,
|
279
|
""Actual Rows"": 5001,
|
280
|
""Actual Loops"": 4988,
|
281
|
""Index Cond"": ""(custom_field_id = 13)""
|
282
|
}
|
283
|
]
|
284
|
},
|
285
|
{
|
286
|
""Node Type"": ""Index Scan"",
|
287
|
""Parent Relationship"": ""Inner"",
|
288
|
""Parallel Aware"": false,
|
289
|
""Async Capable"": false,
|
290
|
""Scan Direction"": ""Forward"",
|
291
|
""Index Name"": ""issues_pkey"",
|
292
|
""Relation Name"": ""issues"",
|
293
|
""Alias"": ""issues_1"",
|
294
|
""Startup Cost"": 15.22,
|
295
|
""Total Cost"": 23.24,
|
296
|
""Plan Rows"": 1,
|
297
|
""Plan Width"": 8,
|
298
|
""Actual Rows"": 0,
|
299
|
""Actual Loops"": 0,
|
300
|
""Index Cond"": ""(id = custom_values.customized_id)"",
|
301
|
""Rows Removed by Index Recheck"": 0,
|
302
|
""Filter"": ""($0 OR (hashed SubPlan 2))"",
|
303
|
""Rows Removed by Filter"": 0,
|
304
|
""Plans"": [
|
305
|
{
|
306
|
""Node Type"": ""Bitmap Heap Scan"",
|
307
|
""Parent Relationship"": ""SubPlan"",
|
308
|
""Subplan Name"": ""SubPlan 2"",
|
309
|
""Parallel Aware"": false,
|
310
|
""Async Capable"": false,
|
311
|
""Relation Name"": ""custom_fields_projects"",
|
312
|
""Alias"": ""custom_fields_projects"",
|
313
|
""Startup Cost"": 4.24,
|
314
|
""Total Cost"": 14.91,
|
315
|
""Plan Rows"": 11,
|
316
|
""Plan Width"": 4,
|
317
|
""Actual Rows"": 0,
|
318
|
""Actual Loops"": 0,
|
319
|
""Recheck Cond"": ""(custom_field_id = 13)"",
|
320
|
""Rows Removed by Index Recheck"": 0,
|
321
|
""Exact Heap Blocks"": 0,
|
322
|
""Lossy Heap Blocks"": 0,
|
323
|
""Plans"": [
|
324
|
{
|
325
|
""Node Type"": ""Bitmap Index Scan"",
|
326
|
""Parent Relationship"": ""Outer"",
|
327
|
""Parallel Aware"": false,
|
328
|
""Async Capable"": false,
|
329
|
""Index Name"": ""index_custom_fields_projects_on_custom_field_id_and_project_id"",
|
330
|
""Startup Cost"": 0.00,
|
331
|
""Total Cost"": 4.24,
|
332
|
""Plan Rows"": 11,
|
333
|
""Plan Width"": 0,
|
334
|
""Actual Rows"": 0,
|
335
|
""Actual Loops"": 0,
|
336
|
""Index Cond"": ""(custom_field_id = 13)""
|
337
|
}
|
338
|
]
|
339
|
}
|
340
|
]
|
341
|
}
|
342
|
]
|
343
|
},
|
344
|
{
|
345
|
""Node Type"": ""Seq Scan"",
|
346
|
""Parent Relationship"": ""Inner"",
|
347
|
""Parallel Aware"": false,
|
348
|
""Async Capable"": false,
|
349
|
""Relation Name"": ""custom_fields_trackers"",
|
350
|
""Alias"": ""custom_fields_trackers"",
|
351
|
""Startup Cost"": 0.00,
|
352
|
""Total Cost"": 3.04,
|
353
|
""Plan Rows"": 3,
|
354
|
""Plan Width"": 4,
|
355
|
""Actual Rows"": 0,
|
356
|
""Actual Loops"": 0,
|
357
|
""Filter"": ""(custom_field_id = 13)"",
|
358
|
""Rows Removed by Filter"": 0
|
359
|
}
|
360
|
]
|
361
|
}
|
362
|
]
|
363
|
}
|
364
|
]
|
365
|
},
|
366
|
{
|
367
|
""Node Type"": ""Hash"",
|
368
|
""Parent Relationship"": ""Inner"",
|
369
|
""Parallel Aware"": false,
|
370
|
""Async Capable"": false,
|
371
|
""Startup Cost"": 92.95,
|
372
|
""Total Cost"": 92.95,
|
373
|
""Plan Rows"": 505,
|
374
|
""Plan Width"": 4,
|
375
|
""Actual Rows"": 0,
|
376
|
""Actual Loops"": 0,
|
377
|
""Plans"": [
|
378
|
{
|
379
|
""Node Type"": ""Seq Scan"",
|
380
|
""Parent Relationship"": ""Outer"",
|
381
|
""Parallel Aware"": false,
|
382
|
""Async Capable"": false,
|
383
|
""Relation Name"": ""enabled_modules"",
|
384
|
""Alias"": ""em"",
|
385
|
""Startup Cost"": 0.00,
|
386
|
""Total Cost"": 92.95,
|
387
|
""Plan Rows"": 505,
|
388
|
""Plan Width"": 4,
|
389
|
""Actual Rows"": 0,
|
390
|
""Actual Loops"": 0,
|
391
|
""Filter"": ""((name)::text = 'issue_tracking'::text)"",
|
392
|
""Rows Removed by Filter"": 0
|
393
|
}
|
394
|
]
|
395
|
}
|
396
|
]
|
397
|
},
|
398
|
{
|
399
|
""Node Type"": ""Hash"",
|
400
|
""Parent Relationship"": ""Inner"",
|
401
|
""Parallel Aware"": false,
|
402
|
""Async Capable"": false,
|
403
|
""Startup Cost"": 1.06,
|
404
|
""Total Cost"": 1.06,
|
405
|
""Plan Rows"": 6,
|
406
|
""Plan Width"": 20,
|
407
|
""Actual Rows"": 6,
|
408
|
""Actual Loops"": 1,
|
409
|
""Hash Buckets"": 1024,
|
410
|
""Original Hash Buckets"": 1024,
|
411
|
""Hash Batches"": 1,
|
412
|
""Original Hash Batches"": 1,
|
413
|
""Peak Memory Usage"": 9,
|
414
|
""Plans"": [
|
415
|
{
|
416
|
""Node Type"": ""Seq Scan"",
|
417
|
""Parent Relationship"": ""Outer"",
|
418
|
""Parallel Aware"": false,
|
419
|
""Async Capable"": false,
|
420
|
""Relation Name"": ""issue_statuses"",
|
421
|
""Alias"": ""issue_statuses"",
|
422
|
""Startup Cost"": 0.00,
|
423
|
""Total Cost"": 1.06,
|
424
|
""Plan Rows"": 6,
|
425
|
""Plan Width"": 20,
|
426
|
""Actual Rows"": 6,
|
427
|
""Actual Loops"": 1
|
428
|
}
|
429
|
]
|
430
|
}
|
431
|
]
|
432
|
}
|
433
|
]
|
434
|
},
|
435
|
""Planning Time"": 16.942,
|
436
|
""Triggers"": [
|
437
|
],
|
438
|
""Execution Time"": 5417.890
|
439
|
}
|
440
|
]"
|