UPDATE plans SET splan = pg_store_plans_shorten(lplan);
###### tag abbreviation test
SELECT splan FROM plans WHERE id = -1;
- splan
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
- {"p":0,"l":0,"t":"a","t":"b","t":"c","t":"d","t":"e","t":"f","t":"g","t":"h","t":"i","t":"j","t":"k","t":"l","t":"m","t":"n","t":"o","t":"p","t":"q","t":"r","t":"s","t":"t","t":"u","t":"v","t":"w","t":"x","t":"y","t":"z","t":"0","t":"1","t":"2","t":"3","t":"4","t":"5","h":"o","h":"i","h":"s","h":"m","h":"I","h":"S","d":"b","d":"n","d":"f","i":0,"n":0,"f":0,"c":0,"s":0,"a":0,"o":"[]","m":"a","g":"p","g":"s","g":"h","j":"i","j":"l","j":"f","j":"r","j":"s","j":"a","b":"i","b":"I","b":"e","b":"E","e":"h","e":"q","e":"e","e":"E","e":"s","k":"a","5":"a","6":"a","7":"a","8":"a","9":"a","0":"a","!":"i","!":"d","!":"u","q":"a","r":0,"u":0,"v":0,"w":0,"x":0,"y":0,"1":0,"2":0,"3":0,"4":0,"A":0,"B":0,"C":0,"D":0,"E":0,"F":0,"G":0,"H":0,"I":0,"J":0,"K":0,"L":0,"M":0,"N":0,"O":0,"P":0,"Q":0,"R":0,"S":"d","S":"m","T":0,"U":0,"V":0,"W":0,"X":0,"Y":0,"Z":0,"z":0,"#":0,"$":0,"&":0,"(":0,")":0}
+ splan
+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+ {"p":0,"l":0,"t":"a","t":"b","t":"c","t":"d","t":"e","t":"f","t":"g","t":"h","t":"i","t":"j","t":"k","t":"l","t":"m","t":"n","t":"o","t":"p","t":"q","t":"r","t":"s","t":"t","t":"u","t":"v","t":"w","t":"x","t":"y","t":"z","t":"0","t":"1","t":"2","t":"3","t":"4","t":"5","h":"o","h":"i","h":"s","h":"m","h":"I","h":"S","d":"b","d":"n","d":"f","i":0,"n":0,"f":0,"c":0,"s":0,"a":0,"o":"[]","m":"a","g":"p","g":"s","g":"h","j":"i","j":"l","j":"f","j":"r","j":"s","j":"a","b":"i","b":"I","b":"e","b":"E","e":"h","e":"q","e":"e","e":"E","e":"s","k":"a","-":"a","=":"a","\\":"a","5":"a","6":"a","7":"a","8":"a","9":"a","0":"a","%":"a","@":"a","^":0,"+":0,"_":"a","!":"i","!":"d","!":"u","q":"a","r":0,"u":0,"v":0,"w":0,"x":0,"y":0,"1":0,"2":0,"3":0,"4":0,"A":0,"B":0,"C":0,"D":0,"E":0,"F":0,"G":0,"H":0,"I":0,"J":0,"K":0,"L":0,"M":0,"N":0,"O":0,"P":0,"Q":0,"R":0,"S":"d","S":"m","T":0,"U":0,"*":0,"V":0,"W":0,"X":0,"Y":0,"Z":0,"z":0,"#":0,"$":0,"&":0,"(":0,")":0}
(1 row)
###### JSON properties round-trip test
Total Cost: 10.00
Plan Rows: 1000
Plan Width: 4
- Actual Startup Time: 278.453
- Actual Total Time: 278.453
+ Actual Startup Time: 210.478
+ Actual Total Time: 210.478
Actual Rows: 0
Actual Loops: 1
- Shared Hit Blocks: 29735
- Shared Read Blocks: 87
+ Shared Hit Blocks: 29737
+ Shared Read Blocks: 88
Shared Dirtied Blocks: 85
Shared Written Blocks: 0
Local Hit Blocks: 0
Local Written Blocks: 0
Temp Read Blocks: 0
Temp Written Blocks: 0
- I/O Read Time: 0.000
+ I/O Read Time: 0.260
I/O Write Time: 0.000
Plans:
- Node Type: "Function Scan"
Total Cost: 10.00
Plan Rows: 1000
Plan Width: 4
- Actual Startup Time: 3.470
- Actual Total Time: 9.319
+ Actual Startup Time: 1.689
+ Actual Total Time: 7.253
Actual Rows: 10001
Actual Loops: 1
Output:
Temp Written Blocks: 0
I/O Read Time: 0.000
I/O Write Time: 0.000
- Planning Time: 0.072
+ Planning Time: 0.049
Triggers:
- Trigger Name: "tt1_trig_1"
Relation: "tt1"
- Time: 100.983
+ Time: 71.597
Calls: 10001
- Trigger Name: "tt1_trig_2"
Relation: "tt1"
- Time: 85.683
+ Time: 62.334
Calls: 10001
- Execution Time: 279.083
+ Execution Time: 210.989
=======
### yaml-short ###### Plan 2: Update, Trigger
Schema: "public"
Alias: "tt1"
Startup Cost: 0.00
- Total Cost: 134.75
- Plan Rows: 6380
+ Total Cost: 137.50
+ Plan Rows: 6600
Plan Width: 46
- Actual Startup Time: 340.377
- Actual Total Time: 340.377
+ Actual Startup Time: 241.750
+ Actual Total Time: 241.750
Actual Rows: 0
Actual Loops: 1
Shared Hit Blocks: 50276
Schema: "public"
Alias: "tt1"
Startup Cost: 0.00
- Total Cost: 134.75
- Plan Rows: 6380
+ Total Cost: 137.50
+ Plan Rows: 6600
Plan Width: 46
- Actual Startup Time: 0.022
- Actual Total Time: 10.544
+ Actual Startup Time: 0.019
+ Actual Total Time: 9.455
Actual Rows: 10001
Actual Loops: 1
Output:
Temp Written Blocks: 0
I/O Read Time: 0.000
I/O Write Time: 0.000
- Planning Time: 0.109
+ Planning Time: 0.152
Triggers:
- Trigger Name: "tt1_trig_1"
Relation: "tt1"
- Time: 106.386
+ Time: 72.650
Calls: 10001
- Trigger Name: "tt1_trig_2"
Relation: "tt1"
- Time: 88.764
+ Time: 57.490
Calls: 10001
- Execution Time: 340.407
+ Execution Time: 241.978
=======
### yaml-short ###### Plan 3: Delete
Schema: "public"
Alias: "tt1"
Startup Cost: 0.00
- Total Cost: 298.66
- Plan Rows: 63
+ Total Cost: 305.20
+ Plan Rows: 65
Plan Width: 6
- Actual Startup Time: 13.983
- Actual Total Time: 13.983
+ Actual Startup Time: 6.298
+ Actual Total Time: 6.298
Actual Rows: 0
Actual Loops: 1
Shared Hit Blocks: 1109
Schema: "public"
Alias: "tt1"
Startup Cost: 0.00
- Total Cost: 298.66
- Plan Rows: 63
+ Total Cost: 305.20
+ Plan Rows: 65
Plan Width: 6
- Actual Startup Time: 3.535
- Actual Total Time: 11.047
+ Actual Startup Time: 1.408
+ Actual Total Time: 5.116
Actual Rows: 1000
Actual Loops: 1
Output:
Temp Written Blocks: 0
I/O Read Time: 0.000
I/O Write Time: 0.000
- Planning Time: 0.147
+ Planning Time: 0.165
Triggers:
- Execution Time: 14.024
+ Execution Time: 6.503
##################
SELECT '### '||'xml-short '||title||E'\n'||
pg_store_plans_xmlplan(splan)
<Total-Cost>10.00</Total-Cost>
<Plan-Rows>1000</Plan-Rows>
<Plan-Width>4</Plan-Width>
- <Actual-Startup-Time>278.453</Actual-Startup-Time>
- <Actual-Total-Time>278.453</Actual-Total-Time>
+ <Actual-Startup-Time>210.478</Actual-Startup-Time>
+ <Actual-Total-Time>210.478</Actual-Total-Time>
<Actual-Rows>0</Actual-Rows>
<Actual-Loops>1</Actual-Loops>
- <Shared-Hit-Blocks>29735</Shared-Hit-Blocks>
- <Shared-Read-Blocks>87</Shared-Read-Blocks>
+ <Shared-Hit-Blocks>29737</Shared-Hit-Blocks>
+ <Shared-Read-Blocks>88</Shared-Read-Blocks>
<Shared-Dirtied-Blocks>85</Shared-Dirtied-Blocks>
<Shared-Written-Blocks>0</Shared-Written-Blocks>
<Local-Hit-Blocks>0</Local-Hit-Blocks>
<Local-Written-Blocks>0</Local-Written-Blocks>
<Temp-Read-Blocks>0</Temp-Read-Blocks>
<Temp-Written-Blocks>0</Temp-Written-Blocks>
- <I/O-Read-Time>0.000</I/O-Read-Time>
+ <I/O-Read-Time>0.260</I/O-Read-Time>
<I/O-Write-Time>0.000</I/O-Write-Time>
<Plans>
<Plan>
<Total-Cost>10.00</Total-Cost>
<Plan-Rows>1000</Plan-Rows>
<Plan-Width>4</Plan-Width>
- <Actual-Startup-Time>3.470</Actual-Startup-Time>
- <Actual-Total-Time>9.319</Actual-Total-Time>
+ <Actual-Startup-Time>1.689</Actual-Startup-Time>
+ <Actual-Total-Time>7.253</Actual-Total-Time>
<Actual-Rows>10001</Actual-Rows>
<Actual-Loops>1</Actual-Loops>
<Output>
</Plan>
</Plans>
</Plan>
- <Planning-Time>0.072</Planning-Time>
+ <Planning-Time>0.049</Planning-Time>
<Triggers>
<Trigger>
<Trigger-Name>tt1_trig_1</Trigger-Name>
<Relation>tt1</Relation>
- <Time>100.983</Time>
+ <Time>71.597</Time>
<Calls>10001</Calls>
</Trigger>
<Trigger>
<Trigger-Name>tt1_trig_2</Trigger-Name>
<Relation>tt1</Relation>
- <Time>85.683</Time>
+ <Time>62.334</Time>
<Calls>10001</Calls>
</Trigger>
</Triggers>
- <Execution-Time>279.083</Execution-Time>
+ <Execution-Time>210.989</Execution-Time>
</Query>
</explain>
<Total-Cost>418.02</Total-Cost>
<Plan-Rows>20002</Plan-Rows>
<Plan-Width>8</Plan-Width>
- <Actual-Startup-Time>2.484</Actual-Startup-Time>
- <Actual-Total-Time>16.162</Actual-Total-Time>
+ <Actual-Startup-Time>1.913</Actual-Startup-Time>
+ <Actual-Total-Time>27.382</Actual-Total-Time>
<Actual-Rows>20002</Actual-Rows>
<Actual-Loops>1</Actual-Loops>
<Output>
<Total-Cost>418.02</Total-Cost>
<Plan-Rows>20002</Plan-Rows>
<Plan-Width>8</Plan-Width>
- <Actual-Startup-Time>2.483</Actual-Startup-Time>
- <Actual-Total-Time>11.347</Actual-Total-Time>
+ <Actual-Startup-Time>1.911</Actual-Startup-Time>
+ <Actual-Total-Time>18.649</Actual-Total-Time>
<Actual-Rows>20002</Actual-Rows>
<Actual-Loops>1</Actual-Loops>
<Shared-Hit-Blocks>218</Shared-Hit-Blocks>
<Total-Cost>263.01</Total-Cost>
<Plan-Rows>10001</Plan-Rows>
<Plan-Width>8</Plan-Width>
- <Actual-Startup-Time>2.482</Actual-Startup-Time>
- <Actual-Total-Time>6.131</Actual-Total-Time>
+ <Actual-Startup-Time>1.910</Actual-Startup-Time>
+ <Actual-Total-Time>8.458</Actual-Total-Time>
<Actual-Rows>10001</Actual-Rows>
<Actual-Loops>1</Actual-Loops>
<Output>
<Total-Cost>155.01</Total-Cost>
<Plan-Rows>10001</Plan-Rows>
<Plan-Width>8</Plan-Width>
- <Actual-Startup-Time>0.006</Actual-Startup-Time>
- <Actual-Total-Time>2.478</Actual-Total-Time>
+ <Actual-Startup-Time>0.013</Actual-Startup-Time>
+ <Actual-Total-Time>4.940</Actual-Total-Time>
<Actual-Rows>10001</Actual-Rows>
<Actual-Loops>1</Actual-Loops>
<Output>
</Plan>
</Plans>
</Plan>
- <Planning-Time>0.470</Planning-Time>
+ <Planning-Time>0.409</Planning-Time>
<Triggers>
</Triggers>
- <Execution-Time>17.849</Execution-Time>
+ <Execution-Time>31.264</Execution-Time>
</Query>
</explain>
<Total-Cost>21.21</Total-Cost>
<Plan-Rows>4</Plan-Rows>
<Plan-Width>12</Plan-Width>
- <Actual-Startup-Time>0.006</Actual-Startup-Time>
- <Actual-Total-Time>0.023</Actual-Total-Time>
+ <Actual-Startup-Time>0.010</Actual-Startup-Time>
+ <Actual-Total-Time>0.043</Actual-Total-Time>
<Actual-Rows>4</Actual-Rows>
<Actual-Loops>1</Actual-Loops>
<Output>
</Output>
<Index-Cond>("x""y".a = ANY ('{50,120,300,500}'::integer[]))</Index-Cond>
<Rows-Removed-by-Index-Recheck>0</Rows-Removed-by-Index-Recheck>
- <Shared-Hit-Blocks>20</Shared-Hit-Blocks>
+ <Shared-Hit-Blocks>24</Shared-Hit-Blocks>
<Shared-Read-Blocks>0</Shared-Read-Blocks>
<Shared-Dirtied-Blocks>0</Shared-Dirtied-Blocks>
<Shared-Written-Blocks>0</Shared-Written-Blocks>
<I/O-Read-Time>0.000</I/O-Read-Time>
<I/O-Write-Time>0.000</I/O-Write-Time>
</Plan>
- <Planning-Time>0.088</Planning-Time>
+ <Planning-Time>0.129</Planning-Time>
<Triggers>
</Triggers>
- <Execution-Time>0.061</Execution-Time>
+ <Execution-Time>0.316</Execution-Time>
</Query>
</explain>
=======
-### xml-short ###### Plan 6: Index scan (backward), MergeJoin, Sort, quichsort, alias
+### xml-short ###### Plan 6: Index scan (backward), MergeJoin, Sort, quicksort, alias
<explain xmlns="http://www.postgresql.org/2009/explain">
<Query>
<Plan>
<Total-Cost>820.79</Total-Cost>
<Plan-Rows>10</Plan-Rows>
<Plan-Width>12</Plan-Width>
- <Actual-Startup-Time>10.948</Actual-Startup-Time>
- <Actual-Total-Time>10.948</Actual-Total-Time>
+ <Actual-Startup-Time>20.508</Actual-Startup-Time>
+ <Actual-Total-Time>20.508</Actual-Total-Time>
<Actual-Rows>0</Actual-Rows>
<Actual-Loops>1</Actual-Loops>
<Output>
<Total-Cost>1854.80</Total-Cost>
<Plan-Rows>10001</Plan-Rows>
<Plan-Width>12</Plan-Width>
- <Actual-Startup-Time>10.948</Actual-Startup-Time>
- <Actual-Total-Time>10.948</Actual-Total-Time>
+ <Actual-Startup-Time>20.506</Actual-Startup-Time>
+ <Actual-Total-Time>20.506</Actual-Total-Time>
<Actual-Rows>0</Actual-Rows>
<Actual-Loops>1</Actual-Loops>
<Output>
<Total-Cost>760.30</Total-Cost>
<Plan-Rows>10001</Plan-Rows>
<Plan-Width>12</Plan-Width>
- <Actual-Startup-Time>0.015</Actual-Startup-Time>
- <Actual-Total-Time>0.015</Actual-Total-Time>
+ <Actual-Startup-Time>0.027</Actual-Startup-Time>
+ <Actual-Total-Time>0.027</Actual-Total-Time>
<Actual-Rows>1</Actual-Rows>
<Actual-Loops>1</Actual-Loops>
<Output>
<Total-Cost>844.47</Total-Cost>
<Plan-Rows>10001</Plan-Rows>
<Plan-Width>4</Plan-Width>
- <Actual-Startup-Time>8.449</Actual-Startup-Time>
- <Actual-Total-Time>9.138</Actual-Total-Time>
+ <Actual-Startup-Time>16.125</Actual-Startup-Time>
+ <Actual-Total-Time>17.303</Actual-Total-Time>
<Actual-Rows>10001</Actual-Rows>
<Actual-Loops>1</Actual-Loops>
<Output>
<Item>(((- y.b) * 3))</Item>
</Output>
<Sort-Key>
- <Item>(((- y.b) * 3))</Item>
+ <Item>(((- y.b) * 3)) DESC</Item>
</Sort-Key>
<Sort-Method>quicksort</Sort-Method>
- <Sort-Space-Used>855</Sort-Space-Used>
+ <Sort-Space-Used>811</Sort-Space-Used>
<Sort-Space-Type>Memory</Sort-Space-Type>
<Shared-Hit-Blocks>55</Shared-Hit-Blocks>
<Shared-Read-Blocks>0</Shared-Read-Blocks>
<Total-Cost>155.01</Total-Cost>
<Plan-Rows>10001</Plan-Rows>
<Plan-Width>4</Plan-Width>
- <Actual-Startup-Time>0.008</Actual-Startup-Time>
- <Actual-Total-Time>3.308</Actual-Total-Time>
+ <Actual-Startup-Time>0.015</Actual-Startup-Time>
+ <Actual-Total-Time>6.452</Actual-Total-Time>
<Actual-Rows>10001</Actual-Rows>
<Actual-Loops>1</Actual-Loops>
<Output>
</Plan>
</Plans>
</Plan>
- <Planning-Time>0.214</Planning-Time>
+ <Planning-Time>0.348</Planning-Time>
<Triggers>
</Triggers>
- <Execution-Time>11.162</Execution-Time>
+ <Execution-Time>21.312</Execution-Time>
</Query>
</explain>
=======
### TEXT-short ###### Plan 1: Insert, Trigger
-Insert on public.tt1 (cost=0.00..10.00 rows=1000 width=4) (actual time=278.453..278.453 rows=0 loops=1)
- Buffers: shared hit=29735 read=87 dirtied=85
- -> Function Scan on pg_catalog.generate_series a (cost=0.00..10.00 rows=1000 width=4) (actual time=3.470..9.319 rows=10001 loops=1)
+Insert on public.tt1 (cost=0.00..10.00 rows=1000 width=4) (actual time=210.478..210.478 rows=0 loops=1)
+ Buffers: shared hit=29737 read=88 dirtied=85
+ I/O Timings: read=0.260
+ -> Function Scan on pg_catalog.generate_series a (cost=0.00..10.00 rows=1000 width=4) (actual time=1.689..7.253 rows=10001 loops=1)
Output: a.a, NULL::integer, NULL::text
Function Call: generate_series(0, 10000)
-Planning Time: 0.072 ms
-Trigger tt1_trig_1: time=100.983 calls=10001
-Trigger tt1_trig_2: time=85.683 calls=10001
-Execution Time: 279.083 ms
+Planning Time: 0.049 ms
+Trigger tt1_trig_1: time=71.597 calls=10001
+Trigger tt1_trig_2: time=62.334 calls=10001
+Execution Time: 210.989 ms
=======
### TEXT-short ###### Plan 2: Update, Trigger
-Update on public.tt1 (cost=0.00..134.75 rows=6380 width=46) (actual time=340.377..340.377 rows=0 loops=1)
+Update on public.tt1 (cost=0.00..137.50 rows=6600 width=46) (actual time=241.750..241.750 rows=0 loops=1)
Buffers: shared hit=50276 read=108 dirtied=108
- -> Seq Scan on public.tt1 (cost=0.00..134.75 rows=6380 width=46) (actual time=0.022..10.544 rows=10001 loops=1)
+ -> Seq Scan on public.tt1 (cost=0.00..137.50 rows=6600 width=46) (actual time=0.019..9.455 rows=10001 loops=1)
Output: (a + 1), b, c, ctid
Buffers: shared hit=55
-Planning Time: 0.109 ms
-Trigger tt1_trig_1: time=106.386 calls=10001
-Trigger tt1_trig_2: time=88.764 calls=10001
-Execution Time: 340.407 ms
+Planning Time: 0.152 ms
+Trigger tt1_trig_1: time=72.650 calls=10001
+Trigger tt1_trig_2: time=57.490 calls=10001
+Execution Time: 241.978 ms
=======
### TEXT-short ###### Plan 3: Delete
-Delete on public.tt1 (cost=0.00..298.66 rows=63 width=6) (actual time=13.983..13.983 rows=0 loops=1)
+Delete on public.tt1 (cost=0.00..305.20 rows=65 width=6) (actual time=6.298..6.298 rows=0 loops=1)
Buffers: shared hit=1109
- -> Seq Scan on public.tt1 (cost=0.00..298.66 rows=63 width=6) (actual time=3.535..11.047 rows=1000 loops=1)
+ -> Seq Scan on public.tt1 (cost=0.00..305.20 rows=65 width=6) (actual time=1.408..5.116 rows=1000 loops=1)
Output: ctid
Filter: ((tt1.a % 10) = 0)
Rows Removed by Filter: 9001
Buffers: shared hit=109
-Planning Time: 0.147 ms
-Execution Time: 14.024 ms
+Planning Time: 0.165 ms
+Execution Time: 6.503 ms
=======
### TEXT-short ###### Plan 4: Result, Append Seq Scan
-Result (cost=0.00..418.02 rows=20002 width=8) (actual time=2.484..16.162 rows=20002 loops=1)
+Result (cost=0.00..418.02 rows=20002 width=8) (actual time=1.913..27.382 rows=20002 loops=1)
Output: ((tt1.a + 1)), (3), 1
Buffers: shared hit=218
- -> Append (cost=0.00..418.02 rows=20002 width=8) (actual time=2.483..11.347 rows=20002 loops=1)
+ -> Append (cost=0.00..418.02 rows=20002 width=8) (actual time=1.911..18.649 rows=20002 loops=1)
Buffers: shared hit=218
- -> Seq Scan on public.tt1 (cost=0.00..263.01 rows=10001 width=8) (actual time=2.482..6.131 rows=10001 loops=1)
+ -> Seq Scan on public.tt1 (cost=0.00..263.01 rows=10001 width=8) (actual time=1.910..8.458 rows=10001 loops=1)
Output: (tt1.a + 1), 3
Buffers: shared hit=163
- -> Seq Scan on public.tt2 (cost=0.00..155.01 rows=10001 width=8) (actual time=0.006..2.478 rows=10001 loops=1)
+ -> Seq Scan on public.tt2 (cost=0.00..155.01 rows=10001 width=8) (actual time=0.013..4.940 rows=10001 loops=1)
Output: tt2.a, 4
Buffers: shared hit=55
-Planning Time: 0.470 ms
-Execution Time: 17.849 ms
+Planning Time: 0.409 ms
+Execution Time: 31.264 ms
=======
### TEXT-short ###### Plan 5: Index scan (forward) ANY, array in expr, escape
-Index Scan using i_tt1 on public.tt1 "x""y" (cost=0.29..21.21 rows=4 width=12) (actual time=0.006..0.023 rows=4 loops=1)
+Index Scan using i_tt1 on public.tt1 "x""y" (cost=0.29..21.21 rows=4 width=12) (actual time=0.010..0.043 rows=4 loops=1)
Output: a, b, c
Index Cond: ("x""y".a = ANY ('{50,120,300,500}'::integer[]))
- Buffers: shared hit=20
-Planning Time: 0.088 ms
-Execution Time: 0.061 ms
+ Buffers: shared hit=24
+Planning Time: 0.129 ms
+Execution Time: 0.316 ms
=======
-### TEXT-short ###### Plan 6: Index scan (backward), MergeJoin, Sort, quichsort, alias
-Limit (cost=819.75..820.79 rows=10 width=12) (actual time=10.948..10.948 rows=0 loops=1)
+### TEXT-short ###### Plan 6: Index scan (backward), MergeJoin, Sort, quicksort, alias
+Limit (cost=819.75..820.79 rows=10 width=12) (actual time=20.508..20.508 rows=0 loops=1)
Output: x.b, x.c, x.a
Buffers: shared hit=61
- -> Merge Join (cost=819.75..1854.80 rows=10001 width=12) (actual time=10.948..10.948 rows=0 loops=1)
+ -> Merge Join (cost=819.75..1854.80 rows=10001 width=12) (actual time=20.506..20.506 rows=0 loops=1)
Output: x.b, x.c, x.a
Merge Cond: (x.a = (((- y.b) * 3)))
Buffers: shared hit=61
- -> Index Scan Backward using i_tt1 on public.tt1 x (cost=0.29..760.30 rows=10001 width=12) (actual time=0.015..0.015 rows=1 loops=1)
+ -> Index Scan Backward using i_tt1 on public.tt1 x (cost=0.29..760.30 rows=10001 width=12) (actual time=0.027..0.027 rows=1 loops=1)
Output: x.a, x.b, x.c
Buffers: shared hit=6
- -> Sort (cost=819.47..844.47 rows=10001 width=4) (actual time=8.449..9.138 rows=10001 loops=1)
+ -> Sort (cost=819.47..844.47 rows=10001 width=4) (actual time=16.125..17.303 rows=10001 loops=1)
Output: y.b, (((- y.b) * 3))
- Sort Key: (((- y.b) * 3))
- Sort Method: quicksort Memory: 855kB
+ Sort Key: (((- y.b) * 3)) DESC
+ Sort Method: quicksort Memory: 811kB
Buffers: shared hit=55
- -> Seq Scan on public.tt2 y (cost=0.00..155.01 rows=10001 width=4) (actual time=0.008..3.308 rows=10001 loops=1)
+ -> Seq Scan on public.tt2 y (cost=0.00..155.01 rows=10001 width=4) (actual time=0.015..6.452 rows=10001 loops=1)
Output: y.b, ((- y.b) * 3)
Buffers: shared hit=55
-Planning Time: 0.214 ms
-Execution Time: 11.162 ms
+Planning Time: 0.348 ms
+Execution Time: 21.312 ms
=======
### TEXT-short ###### Plan 7: IndexOnlyScan
-Index Only Scan using i_tt1 on public.tt1 (cost=0.29..8.46 rows=10 width=4) (actual time=0.016..0.033 rows=10 loops=1)
+Index Only Scan using i_tt1 on public.tt1 (cost=0.29..8.46 rows=10 width=4) (actual time=0.020..0.052 rows=10 loops=1)
Output: a
Index Cond: (tt1.a < 10)
Heap Fetches: 29
Buffers: shared hit=31
-Planning Time: 0.063 ms
-Execution Time: 0.051 ms
+Planning Time: 0.095 ms
+Execution Time: 0.277 ms
=======
### TEXT-short ###### Plan 8: Plain Aggregate, CTE, Recursive Union, WorkTable Scan, CTE Scan
-Aggregate (cost=3.65..3.66 rows=1 width=4) (actual time=0.034..0.034 rows=1 loops=1)
+Aggregate (cost=3.65..3.66 rows=1 width=4) (actual time=0.052..0.052 rows=1 loops=1)
Output: sum(cte1.a)
CTE cte1
- -> Recursive Union (cost=0.00..2.95 rows=31 width=4) (actual time=0.002..0.023 rows=10 loops=1)
- -> Result (cost=0.00..0.01 rows=1 width=0) (actual time=0.000..0.000 rows=1 loops=1)
+ -> Recursive Union (cost=0.00..2.95 rows=31 width=4) (actual time=0.002..0.031 rows=10 loops=1)
+ -> Result (cost=0.00..0.01 rows=1 width=0) (actual time=0.001..0.001 rows=1 loops=1)
Output: 1
-> WorkTable Scan on cte1 cte1_1 (cost=0.00..0.23 rows=3 width=4) (actual time=0.001..0.001 rows=1 loops=10)
Output: (cte1_1.a + 1)
Filter: (cte1_1.a < 10)
- -> CTE Scan on cte1 (cost=0.00..0.62 rows=31 width=4) (actual time=0.002..0.028 rows=10 loops=1)
+ -> CTE Scan on cte1 (cost=0.00..0.62 rows=31 width=4) (actual time=0.004..0.042 rows=10 loops=1)
Output: cte1.a
-Planning Time: 0.077 ms
-Execution Time: 0.075 ms
+Planning Time: 0.137 ms
+Execution Time: 0.727 ms
=======
### TEXT-short ###### Plan 9: FunctionScan, Hash/HashJoin, Nested Loop
-Nested Loop (cost=1.15..2.69 rows=1 width=64) (actual time=0.043..0.049 rows=2 loops=1)
+Nested Loop (cost=1.15..2.69 rows=1 width=64) (actual time=0.068..0.070 rows=1 loops=1)
Output: d.datname
- Buffers: shared hit=5
- -> Hash Join (cost=1.02..2.41 rows=1 width=4) (actual time=0.037..0.038 rows=2 loops=1)
+ Buffers: shared hit=3
+ -> Hash Join (cost=1.02..2.41 rows=1 width=4) (actual time=0.057..0.058 rows=1 loops=1)
Output: s.datid
Hash Cond: (s.usesysid = u.oid)
Buffers: shared hit=1
- -> Function Scan on pg_catalog.pg_stat_get_activity s (cost=0.00..1.00 rows=100 width=8) (actual time=0.026..0.026 rows=2 loops=1)
- Output: s.datid, s.pid, s.usesysid, s.application_name, s.state, s.query, s.waiting, s.xact_start, s.query_start, s.backend_start, s.state_change, s.client_addr, s.client_hostname, s.client_port, s.backend_xid, s.backend_xmin
+ -> Function Scan on pg_catalog.pg_stat_get_activity s (cost=0.00..1.00 rows=100 width=8) (actual time=0.040..0.041 rows=1 loops=1)
+ Output: s.datid, s.pid, s.usesysid, s.application_name, s.state, s.query, s.waiting, s.xact_start, s.query_start, s.backend_start, s.state_change, s.client_addr, s.client_hostname, s.client_port, s.backend_xid, s.backend_xmin, s.ssl, s.sslversion, s.sslcipher, s.sslbits, s.sslcompression, s.sslclientdn
Function Call: pg_stat_get_activity(NULL::integer)
- -> Hash (cost=1.01..1.01 rows=1 width=4) (actual time=0.004..0.004 rows=1 loops=1)
+ -> Hash (cost=1.01..1.01 rows=1 width=4) (actual time=0.007..0.007 rows=1 loops=1)
Output: u.oid
- Buckets: 1024 Batches: 1 Memory Usage: 1kB
+ Buckets: 1024 Batches: 1 Memory Usage: 9kB
Buffers: shared hit=1
- -> Seq Scan on pg_catalog.pg_authid u (cost=0.00..1.01 rows=1 width=4) (actual time=0.003..0.003 rows=1 loops=1)
+ -> Seq Scan on pg_catalog.pg_authid u (cost=0.00..1.01 rows=1 width=4) (actual time=0.004..0.005 rows=1 loops=1)
Output: u.oid
Buffers: shared hit=1
- -> Index Scan using pg_database_oid_index on pg_catalog.pg_database d (cost=0.13..0.27 rows=1 width=68) (actual time=0.004..0.005 rows=1 loops=2)
+ -> Index Scan using pg_database_oid_index on pg_catalog.pg_database d (cost=0.13..0.27 rows=1 width=68) (actual time=0.007..0.008 rows=1 loops=1)
Output: d.datname, d.oid
Index Cond: (d.oid = s.datid)
- Buffers: shared hit=4
-Planning Time: 0.356 ms
-Execution Time: 0.118 ms
+ Buffers: shared hit=2
+Planning Time: 0.668 ms
+Execution Time: 1.162 ms
=======
### TEXT-short ###### Plan 10: MergeAppend, Values
-Merge Append (cost=0.36..985.44 rows=10004 width=4) (actual time=0.018..19.887 rows=10004 loops=1)
+Merge Append (cost=0.36..985.44 rows=10004 width=4) (actual time=0.029..30.688 rows=10004 loops=1)
Sort Key: tt1.a
Buffers: shared hit=30069
- -> Index Only Scan using i_tt1 on public.tt1 (cost=0.29..760.30 rows=10001 width=4) (actual time=0.010..17.933 rows=10001 loops=1)
+ -> Index Only Scan using i_tt1 on public.tt1 (cost=0.29..760.30 rows=10001 width=4) (actual time=0.017..28.032 rows=10001 loops=1)
Output: tt1.a
Heap Fetches: 29973
Buffers: shared hit=30069
- -> Sort (cost=0.06..0.07 rows=3 width=4) (actual time=0.007..0.008 rows=3 loops=1)
+ -> Sort (cost=0.06..0.07 rows=3 width=4) (actual time=0.010..0.010 rows=3 loops=1)
Output: "*VALUES*".column1
Sort Key: "*VALUES*".column1
Sort Method: quicksort Memory: 25kB
- -> Values Scan on "*VALUES*" (cost=0.00..0.04 rows=3 width=4) (actual time=0.001..0.002 rows=3 loops=1)
+ -> Values Scan on "*VALUES*" (cost=0.00..0.04 rows=3 width=4) (actual time=0.002..0.004 rows=3 loops=1)
Output: "*VALUES*".column1
-Planning Time: 0.087 ms
-Execution Time: 20.999 ms
+Planning Time: 0.136 ms
+Execution Time: 32.772 ms
=======
### TEXT-short ###### Plan 11: Append, HashAggregate
-HashAggregate (cost=668.04..868.06 rows=20002 width=4) (actual time=14.097..18.092 rows=20002 loops=1)
+HashAggregate (cost=668.04..868.06 rows=20002 width=4) (actual time=21.602..27.370 rows=20002 loops=1)
Output: tt1.a
+ Group Key: tt1.a
Buffers: shared hit=218
- -> Append (cost=0.00..618.04 rows=20002 width=4) (actual time=0.093..7.382 rows=20002 loops=1)
+ -> Append (cost=0.00..618.04 rows=20002 width=4) (actual time=0.167..10.785 rows=20002 loops=1)
Buffers: shared hit=218
- -> Seq Scan on public.tt1 (cost=0.00..263.01 rows=10001 width=4) (actual time=0.092..2.370 rows=10001 loops=1)
+ -> Seq Scan on public.tt1 (cost=0.00..263.01 rows=10001 width=4) (actual time=0.167..3.519 rows=10001 loops=1)
Output: tt1.a
Buffers: shared hit=163
- -> Seq Scan on public.tt2 (cost=0.00..155.01 rows=10001 width=4) (actual time=0.006..2.367 rows=10001 loops=1)
+ -> Seq Scan on public.tt2 (cost=0.00..155.01 rows=10001 width=4) (actual time=0.010..3.366 rows=10001 loops=1)
Output: tt2.b
Buffers: shared hit=55
-Planning Time: 0.055 ms
-Execution Time: 20.063 ms
+Planning Time: 0.072 ms
+Execution Time: 30.173 ms
=======
### TEXT-short ###### Plan 12: GroupAggregate
-GroupAggregate (cost=1067.47..1242.49 rows=10001 width=8) (actual time=10.889..20.301 rows=10001 loops=1)
+GroupAggregate (cost=1067.47..1242.49 rows=10001 width=8) (actual time=13.280..25.173 rows=10001 loops=1)
Output: sum(a), b
- Buffers: shared hit=163, temp read=33 written=33
- -> Sort (cost=1067.47..1092.47 rows=10001 width=8) (actual time=10.886..14.220 rows=10001 loops=1)
+ Group Key: tt1.b
+ Buffers: shared hit=163, temp read=22 written=22
+ -> Sort (cost=1067.47..1092.47 rows=10001 width=8) (actual time=13.275..17.306 rows=10001 loops=1)
Output: b, a
Sort Key: tt1.b
- Sort Method: external merge Disk: 168kB
- Buffers: shared hit=163, temp read=33 written=33
- -> Seq Scan on public.tt1 (cost=0.00..263.01 rows=10001 width=8) (actual time=0.114..2.441 rows=10001 loops=1)
+ Sort Method: external merge Disk: 136kB
+ Buffers: shared hit=163, temp read=22 written=22
+ -> Seq Scan on public.tt1 (cost=0.00..263.01 rows=10001 width=8) (actual time=0.137..3.119 rows=10001 loops=1)
Output: b, a
Buffers: shared hit=163
-Planning Time: 0.041 ms
-Execution Time: 21.797 ms
+Planning Time: 0.048 ms
+Execution Time: 27.082 ms
=======
### TEXT-short ###### Plan 13: Group
-Group (cost=1067.47..1117.47 rows=10001 width=4) (actual time=10.358..17.790 rows=10001 loops=1)
+Group (cost=1067.47..1117.47 rows=10001 width=4) (actual time=12.006..20.222 rows=10001 loops=1)
Output: b
- Buffers: shared hit=163, temp read=25 written=25
- -> Sort (cost=1067.47..1092.47 rows=10001 width=4) (actual time=10.356..13.699 rows=10001 loops=1)
+ Group Key: tt1.b
+ Buffers: shared hit=163, temp read=22 written=22
+ -> Sort (cost=1067.47..1092.47 rows=10001 width=4) (actual time=12.005..15.570 rows=10001 loops=1)
Output: b
Sort Key: tt1.b
- Sort Method: external merge Disk: 120kB
- Buffers: shared hit=163, temp read=25 written=25
- -> Seq Scan on public.tt1 (cost=0.00..263.01 rows=10001 width=4) (actual time=0.092..2.298 rows=10001 loops=1)
+ Sort Method: external merge Disk: 136kB
+ Buffers: shared hit=163, temp read=22 written=22
+ -> Seq Scan on public.tt1 (cost=0.00..263.01 rows=10001 width=4) (actual time=0.134..2.915 rows=10001 loops=1)
Output: b
Buffers: shared hit=163
-Planning Time: 0.032 ms
-Execution Time: 18.628 ms
+Planning Time: 0.037 ms
+Execution Time: 21.590 ms
=======
### TEXT-short ###### Plan 14: SetOp intersect, SbuqueryScan
-Sort (cost=1332.50..1357.51 rows=10001 width=4) (actual time=17.468..17.468 rows=0 loops=1)
+Sort (cost=1332.50..1357.51 rows=10001 width=4) (actual time=20.706..20.706 rows=0 loops=1)
Output: "*SELECT* 1".a, (0)
Sort Key: "*SELECT* 1".a
Sort Method: quicksort Memory: 25kB
Buffers: shared hit=218
- -> HashSetOp Intersect (cost=0.00..668.04 rows=10001 width=4) (actual time=17.465..17.465 rows=0 loops=1)
+ -> HashSetOp Intersect (cost=0.00..668.04 rows=10001 width=4) (actual time=20.703..20.703 rows=0 loops=1)
Output: "*SELECT* 1".a, (0)
Buffers: shared hit=218
- -> Append (cost=0.00..618.04 rows=20002 width=4) (actual time=0.095..11.726 rows=20002 loops=1)
+ -> Append (cost=0.00..618.04 rows=20002 width=4) (actual time=0.125..13.961 rows=20002 loops=1)
Buffers: shared hit=218
- -> Subquery Scan on "*SELECT* 1" (cost=0.00..363.02 rows=10001 width=4) (actual time=0.095..4.614 rows=10001 loops=1)
+ -> Subquery Scan on "*SELECT* 1" (cost=0.00..363.02 rows=10001 width=4) (actual time=0.125..5.660 rows=10001 loops=1)
Output: "*SELECT* 1".a, 0
Buffers: shared hit=163
- -> Seq Scan on public.tt1 (cost=0.00..263.01 rows=10001 width=4) (actual time=0.094..2.368 rows=10001 loops=1)
+ -> Seq Scan on public.tt1 (cost=0.00..263.01 rows=10001 width=4) (actual time=0.120..2.671 rows=10001 loops=1)
Output: tt1.a
Buffers: shared hit=163
- -> Subquery Scan on "*SELECT* 2" (cost=0.00..255.02 rows=10001 width=4) (actual time=0.007..4.576 rows=10001 loops=1)
+ -> Subquery Scan on "*SELECT* 2" (cost=0.00..255.02 rows=10001 width=4) (actual time=0.007..5.275 rows=10001 loops=1)
Output: "*SELECT* 2".b, 1
Buffers: shared hit=55
- -> Seq Scan on public.tt2 (cost=0.00..155.01 rows=10001 width=4) (actual time=0.006..2.340 rows=10001 loops=1)
+ -> Seq Scan on public.tt2 (cost=0.00..155.01 rows=10001 width=4) (actual time=0.007..2.600 rows=10001 loops=1)
Output: tt2.b
Buffers: shared hit=55
-Planning Time: 0.061 ms
-Execution Time: 17.700 ms
+Planning Time: 0.067 ms
+Execution Time: 21.351 ms
=======
### TEXT-short ###### Plan 15: Sorted SetOp, Sort on Disk
-SetOp Intersect (cost=2323.47..2423.48 rows=10001 width=4) (actual time=44.652..44.652 rows=0 loops=1)
+SetOp Intersect (cost=2323.47..2423.48 rows=10001 width=4) (actual time=44.251..44.251 rows=0 loops=1)
Output: "*SELECT* 1".a, (0)
- Buffers: shared hit=218, temp read=77 written=77
- -> Sort (cost=2323.47..2373.47 rows=20002 width=4) (actual time=32.559..38.440 rows=20002 loops=1)
+ Buffers: shared hit=218, temp read=70 written=70
+ -> Sort (cost=2323.47..2373.47 rows=20002 width=4) (actual time=32.669..38.315 rows=20002 loops=1)
Output: "*SELECT* 1".a, (0)
Sort Key: "*SELECT* 1".a
- Sort Method: external merge Disk: 352kB
- Buffers: shared hit=218, temp read=77 written=77
- -> Append (cost=0.00..618.04 rows=20002 width=4) (actual time=0.095..12.510 rows=20002 loops=1)
+ Sort Method: external merge Disk: 320kB
+ Buffers: shared hit=218, temp read=70 written=70
+ -> Append (cost=0.00..618.04 rows=20002 width=4) (actual time=0.117..12.979 rows=20002 loops=1)
Buffers: shared hit=218
- -> Subquery Scan on "*SELECT* 1" (cost=0.00..363.02 rows=10001 width=4) (actual time=0.095..5.112 rows=10001 loops=1)
+ -> Subquery Scan on "*SELECT* 1" (cost=0.00..363.02 rows=10001 width=4) (actual time=0.117..5.283 rows=10001 loops=1)
Output: "*SELECT* 1".a, 0
Buffers: shared hit=163
- -> Seq Scan on public.tt1 (cost=0.00..263.01 rows=10001 width=4) (actual time=0.095..2.550 rows=10001 loops=1)
+ -> Seq Scan on public.tt1 (cost=0.00..263.01 rows=10001 width=4) (actual time=0.116..2.577 rows=10001 loops=1)
Output: tt1.a
Buffers: shared hit=163
- -> Subquery Scan on "*SELECT* 2" (cost=0.00..255.02 rows=10001 width=4) (actual time=0.006..4.729 rows=10001 loops=1)
+ -> Subquery Scan on "*SELECT* 2" (cost=0.00..255.02 rows=10001 width=4) (actual time=0.007..4.910 rows=10001 loops=1)
Output: "*SELECT* 2".b, 1
Buffers: shared hit=55
- -> Seq Scan on public.tt2 (cost=0.00..155.01 rows=10001 width=4) (actual time=0.006..2.414 rows=10001 loops=1)
+ -> Seq Scan on public.tt2 (cost=0.00..155.01 rows=10001 width=4) (actual time=0.006..2.426 rows=10001 loops=1)
Output: tt2.b
Buffers: shared hit=55
-Planning Time: 0.062 ms
-Execution Time: 44.785 ms
+Planning Time: 0.063 ms
+Execution Time: 44.861 ms
=======
### TEXT-short ###### Plan 16: HashSetOp intersect All, SubqueryScan
-Sort (cost=1332.50..1357.51 rows=10001 width=4) (actual time=18.390..18.390 rows=0 loops=1)
+Sort (cost=1332.50..1357.51 rows=10001 width=4) (actual time=16.635..16.635 rows=0 loops=1)
Output: "*SELECT* 1".a, (0)
Sort Key: "*SELECT* 1".a
Sort Method: quicksort Memory: 25kB
Buffers: shared hit=218
- -> HashSetOp Intersect All (cost=0.00..668.04 rows=10001 width=4) (actual time=18.387..18.387 rows=0 loops=1)
+ -> HashSetOp Intersect All (cost=0.00..668.04 rows=10001 width=4) (actual time=16.632..16.632 rows=0 loops=1)
Output: "*SELECT* 1".a, (0)
Buffers: shared hit=218
- -> Append (cost=0.00..618.04 rows=20002 width=4) (actual time=0.096..12.322 rows=20002 loops=1)
+ -> Append (cost=0.00..618.04 rows=20002 width=4) (actual time=0.100..11.135 rows=20002 loops=1)
Buffers: shared hit=218
- -> Subquery Scan on "*SELECT* 1" (cost=0.00..363.02 rows=10001 width=4) (actual time=0.095..4.829 rows=10001 loops=1)
+ -> Subquery Scan on "*SELECT* 1" (cost=0.00..363.02 rows=10001 width=4) (actual time=0.100..4.444 rows=10001 loops=1)
Output: "*SELECT* 1".a, 0
Buffers: shared hit=163
- -> Seq Scan on public.tt1 (cost=0.00..263.01 rows=10001 width=4) (actual time=0.095..2.460 rows=10001 loops=1)
+ -> Seq Scan on public.tt1 (cost=0.00..263.01 rows=10001 width=4) (actual time=0.099..2.122 rows=10001 loops=1)
Output: tt1.a
Buffers: shared hit=163
- -> Subquery Scan on "*SELECT* 2" (cost=0.00..255.02 rows=10001 width=4) (actual time=0.007..4.660 rows=10001 loops=1)
+ -> Subquery Scan on "*SELECT* 2" (cost=0.00..255.02 rows=10001 width=4) (actual time=0.006..4.310 rows=10001 loops=1)
Output: "*SELECT* 2".b, 1
Buffers: shared hit=55
- -> Seq Scan on public.tt2 (cost=0.00..155.01 rows=10001 width=4) (actual time=0.007..2.402 rows=10001 loops=1)
+ -> Seq Scan on public.tt2 (cost=0.00..155.01 rows=10001 width=4) (actual time=0.006..2.100 rows=10001 loops=1)
Output: tt2.b
Buffers: shared hit=55
-Planning Time: 0.061 ms
-Execution Time: 18.626 ms
+Planning Time: 0.054 ms
+Execution Time: 17.161 ms
=======
### TEXT-short ###### Plan 17: HashSetOp except, SubqueryScan
-Sort (cost=1332.50..1357.51 rows=10001 width=4) (actual time=24.448..25.233 rows=10001 loops=1)
+Sort (cost=1332.50..1357.51 rows=10001 width=4) (actual time=21.220..21.898 rows=10001 loops=1)
Output: "*SELECT* 1".a, (0)
Sort Key: "*SELECT* 1".a
- Sort Method: quicksort Memory: 855kB
+ Sort Method: quicksort Memory: 811kB
Buffers: shared hit=218
- -> HashSetOp Except (cost=0.00..668.04 rows=10001 width=4) (actual time=18.989..20.104 rows=10001 loops=1)
+ -> HashSetOp Except (cost=0.00..668.04 rows=10001 width=4) (actual time=16.219..17.188 rows=10001 loops=1)
Output: "*SELECT* 1".a, (0)
Buffers: shared hit=218
- -> Append (cost=0.00..618.04 rows=20002 width=4) (actual time=0.095..12.996 rows=20002 loops=1)
+ -> Append (cost=0.00..618.04 rows=20002 width=4) (actual time=0.105..11.155 rows=20002 loops=1)
Buffers: shared hit=218
- -> Subquery Scan on "*SELECT* 1" (cost=0.00..363.02 rows=10001 width=4) (actual time=0.094..5.579 rows=10001 loops=1)
+ -> Subquery Scan on "*SELECT* 1" (cost=0.00..363.02 rows=10001 width=4) (actual time=0.105..4.451 rows=10001 loops=1)
Output: "*SELECT* 1".a, 0
Buffers: shared hit=163
- -> Seq Scan on public.tt1 (cost=0.00..263.01 rows=10001 width=4) (actual time=0.093..2.839 rows=10001 loops=1)
+ -> Seq Scan on public.tt1 (cost=0.00..263.01 rows=10001 width=4) (actual time=0.104..2.108 rows=10001 loops=1)
Output: tt1.a
Buffers: shared hit=163
- -> Subquery Scan on "*SELECT* 2" (cost=0.00..255.02 rows=10001 width=4) (actual time=0.007..4.559 rows=10001 loops=1)
+ -> Subquery Scan on "*SELECT* 2" (cost=0.00..255.02 rows=10001 width=4) (actual time=0.006..4.298 rows=10001 loops=1)
Output: "*SELECT* 2".b, 1
Buffers: shared hit=55
- -> Seq Scan on public.tt2 (cost=0.00..155.01 rows=10001 width=4) (actual time=0.006..2.353 rows=10001 loops=1)
+ -> Seq Scan on public.tt2 (cost=0.00..155.01 rows=10001 width=4) (actual time=0.006..2.079 rows=10001 loops=1)
Output: tt2.b
Buffers: shared hit=55
-Planning Time: 0.060 ms
-Execution Time: 27.190 ms
+Planning Time: 0.053 ms
+Execution Time: 23.793 ms
=======
### TEXT-short ###### Plan 18: HashSetOp except all, SubqueryScan
-Sort (cost=1332.50..1357.51 rows=10001 width=4) (actual time=24.246..25.047 rows=10001 loops=1)
+Sort (cost=1332.50..1357.51 rows=10001 width=4) (actual time=21.153..21.804 rows=10001 loops=1)
Output: "*SELECT* 1".a, (0)
Sort Key: "*SELECT* 1".a
- Sort Method: quicksort Memory: 855kB
+ Sort Method: quicksort Memory: 811kB
Buffers: shared hit=218
- -> HashSetOp Except All (cost=0.00..668.04 rows=10001 width=4) (actual time=18.981..20.120 rows=10001 loops=1)
+ -> HashSetOp Except All (cost=0.00..668.04 rows=10001 width=4) (actual time=16.271..17.182 rows=10001 loops=1)
Output: "*SELECT* 1".a, (0)
Buffers: shared hit=218
- -> Append (cost=0.00..618.04 rows=20002 width=4) (actual time=0.117..12.994 rows=20002 loops=1)
+ -> Append (cost=0.00..618.04 rows=20002 width=4) (actual time=0.102..11.170 rows=20002 loops=1)
Buffers: shared hit=218
- -> Subquery Scan on "*SELECT* 1" (cost=0.00..363.02 rows=10001 width=4) (actual time=0.117..5.606 rows=10001 loops=1)
+ -> Subquery Scan on "*SELECT* 1" (cost=0.00..363.02 rows=10001 width=4) (actual time=0.102..4.446 rows=10001 loops=1)
Output: "*SELECT* 1".a, 0
Buffers: shared hit=163
- -> Seq Scan on public.tt1 (cost=0.00..263.01 rows=10001 width=4) (actual time=0.116..2.894 rows=10001 loops=1)
+ -> Seq Scan on public.tt1 (cost=0.00..263.01 rows=10001 width=4) (actual time=0.100..2.136 rows=10001 loops=1)
Output: tt1.a
Buffers: shared hit=163
- -> Subquery Scan on "*SELECT* 2" (cost=0.00..255.02 rows=10001 width=4) (actual time=0.007..4.520 rows=10001 loops=1)
+ -> Subquery Scan on "*SELECT* 2" (cost=0.00..255.02 rows=10001 width=4) (actual time=0.006..4.259 rows=10001 loops=1)
Output: "*SELECT* 2".b, 1
Buffers: shared hit=55
- -> Seq Scan on public.tt2 (cost=0.00..155.01 rows=10001 width=4) (actual time=0.006..2.336 rows=10001 loops=1)
+ -> Seq Scan on public.tt2 (cost=0.00..155.01 rows=10001 width=4) (actual time=0.006..2.117 rows=10001 loops=1)
Output: tt2.b
Buffers: shared hit=55
-Planning Time: 0.079 ms
-Execution Time: 26.975 ms
+Planning Time: 0.054 ms
+Execution Time: 23.716 ms
=======
### TEXT-short ###### Plan 19: merge LEFT join
-Merge Left Join (cost=0.71..4245.45 rows=33453 width=4) (actual time=0.034..56.948 rows=60003 loops=1)
+Merge Left Join (cost=0.71..4300.43 rows=33599 width=4) (actual time=0.029..51.083 rows=60003 loops=1)
Output: x.b
Merge Cond: (x.a = y.a)
- Buffers: shared hit=20930
- -> Index Scan using i_tt1 on public.tt1 x (cost=0.29..760.30 rows=10001 width=8) (actual time=0.008..4.032 rows=10001 loops=1)
+ Buffers: shared hit=20944
+ -> Index Scan using i_tt1 on public.tt1 x (cost=0.29..760.30 rows=10001 width=8) (actual time=0.006..3.337 rows=10001 loops=1)
Output: x.a, x.b, x.c
Buffers: shared hit=165
- -> Index Only Scan using i_tt3_a on public.tt3 y (cost=0.42..9034.11 rows=180003 width=4) (actual time=0.022..29.832 rows=60004 loops=1)
+ -> Index Only Scan using i_tt3_a on public.tt3 y (cost=0.42..9040.38 rows=180003 width=4) (actual time=0.019..26.518 rows=60004 loops=1)
Output: y.a
Heap Fetches: 60004
- Buffers: shared hit=20765
-Planning Time: 0.390 ms
-Execution Time: 62.450 ms
+ Buffers: shared hit=20779
+Planning Time: 0.288 ms
+Execution Time: 56.031 ms
=======
### TEXT-short ###### Plan 20: hash FULL join
-Hash Full Join (cost=280.02..793.06 rows=10001 width=4) (actual time=11.957..21.814 rows=17001 loops=1)
+Hash Full Join (cost=280.02..680.55 rows=10001 width=4) (actual time=4.774..10.603 rows=17001 loops=1)
Output: x.b
Hash Cond: (x.a = y.a)
Buffers: shared hit=218
- -> Seq Scan on public.tt1 x (cost=0.00..263.01 rows=10001 width=8) (actual time=0.205..2.212 rows=10001 loops=1)
+ -> Seq Scan on public.tt1 x (cost=0.00..263.01 rows=10001 width=8) (actual time=0.115..1.414 rows=10001 loops=1)
Output: x.a, x.b, x.c
Buffers: shared hit=163
- -> Hash (cost=155.01..155.01 rows=10001 width=4) (actual time=11.741..11.741 rows=10001 loops=1)
+ -> Hash (cost=155.01..155.01 rows=10001 width=4) (actual time=4.644..4.644 rows=10001 loops=1)
Output: y.a
- Buckets: 1024 Batches: 1 Memory Usage: 352kB
+ Buckets: 16384 Batches: 1 Memory Usage: 480kB
Buffers: shared hit=55
- -> Seq Scan on public.tt2 y (cost=0.00..155.01 rows=10001 width=4) (actual time=0.018..5.489 rows=10001 loops=1)
+ -> Seq Scan on public.tt2 y (cost=0.00..155.01 rows=10001 width=4) (actual time=0.008..2.078 rows=10001 loops=1)
Output: y.a
Buffers: shared hit=55
-Planning Time: 0.194 ms
-Execution Time: 23.606 ms
+Planning Time: 0.095 ms
+Execution Time: 12.117 ms
=======
### TEXT-short ###### Plan 21: hash SEMI join
-Hash Semi Join (cost=280.02..793.06 rows=10001 width=12) (actual time=10.770..10.770 rows=0 loops=1)
+Hash Semi Join (cost=280.02..680.55 rows=10001 width=12) (actual time=7.910..7.910 rows=0 loops=1)
Output: tt1.a, tt1.b, tt1.c
Hash Cond: (tt1.a = tt2.b)
Buffers: shared hit=218
- -> Seq Scan on public.tt1 (cost=0.00..263.01 rows=10001 width=12) (actual time=0.091..1.495 rows=10001 loops=1)
+ -> Seq Scan on public.tt1 (cost=0.00..263.01 rows=10001 width=12) (actual time=0.093..1.237 rows=10001 loops=1)
Output: tt1.a, tt1.b, tt1.c
Buffers: shared hit=163
- -> Hash (cost=155.01..155.01 rows=10001 width=4) (actual time=5.798..5.798 rows=10001 loops=1)
+ -> Hash (cost=155.01..155.01 rows=10001 width=4) (actual time=4.703..4.703 rows=10001 loops=1)
Output: tt2.b
- Buckets: 1024 Batches: 1 Memory Usage: 352kB
+ Buckets: 16384 Batches: 1 Memory Usage: 480kB
Buffers: shared hit=55
- -> Seq Scan on public.tt2 (cost=0.00..155.01 rows=10001 width=4) (actual time=0.007..2.812 rows=10001 loops=1)
+ -> Seq Scan on public.tt2 (cost=0.00..155.01 rows=10001 width=4) (actual time=0.006..2.134 rows=10001 loops=1)
Output: tt2.b
Buffers: shared hit=55
-Planning Time: 0.182 ms
-Execution Time: 10.988 ms
+Planning Time: 0.157 ms
+Execution Time: 8.236 ms
=======
### TEXT-short ###### Plan 22: Hash Anti Join
-Hash Anti Join (cost=280.02..693.05 rows=1 width=12) (actual time=5.985..12.403 rows=10001 loops=1)
+Hash Anti Join (cost=280.02..580.54 rows=1 width=12) (actual time=4.918..9.632 rows=10001 loops=1)
Output: tt1.a, tt1.b, tt1.c
Hash Cond: (tt1.a = tt2.b)
Buffers: shared hit=218
- -> Seq Scan on public.tt1 (cost=0.00..263.01 rows=10001 width=12) (actual time=0.095..1.543 rows=10001 loops=1)
+ -> Seq Scan on public.tt1 (cost=0.00..263.01 rows=10001 width=12) (actual time=0.097..1.312 rows=10001 loops=1)
Output: tt1.a, tt1.b, tt1.c
Buffers: shared hit=163
- -> Hash (cost=155.01..155.01 rows=10001 width=4) (actual time=5.884..5.884 rows=10001 loops=1)
+ -> Hash (cost=155.01..155.01 rows=10001 width=4) (actual time=4.812..4.812 rows=10001 loops=1)
Output: tt2.b
- Buckets: 1024 Batches: 1 Memory Usage: 352kB
+ Buckets: 16384 Batches: 1 Memory Usage: 480kB
Buffers: shared hit=55
- -> Seq Scan on public.tt2 (cost=0.00..155.01 rows=10001 width=4) (actual time=0.007..2.808 rows=10001 loops=1)
+ -> Seq Scan on public.tt2 (cost=0.00..155.01 rows=10001 width=4) (actual time=0.007..2.274 rows=10001 loops=1)
Output: tt2.b
Buffers: shared hit=55
-Planning Time: 0.133 ms
-Execution Time: 13.415 ms
+Planning Time: 0.110 ms
+Execution Time: 10.650 ms
=======
### TEXT-short ###### Plan 23: WindowAgg
-WindowAgg (cost=927.47..1127.49 rows=10001 width=4) (actual time=5.593..16.541 rows=10001 loops=1)
+WindowAgg (cost=927.47..1127.49 rows=10001 width=4) (actual time=5.164..14.618 rows=10001 loops=1)
Output: first_value(a) OVER (?), ((a / 10))
Buffers: shared hit=163
- -> Sort (cost=927.47..952.47 rows=10001 width=4) (actual time=5.585..6.517 rows=10001 loops=1)
+ -> Sort (cost=927.47..952.47 rows=10001 width=4) (actual time=5.157..6.014 rows=10001 loops=1)
Output: ((a / 10)), a
Sort Key: ((tt1.a / 10))
- Sort Method: quicksort Memory: 855kB
+ Sort Method: quicksort Memory: 811kB
Buffers: shared hit=163
- -> Seq Scan on public.tt1 (cost=0.00..263.01 rows=10001 width=4) (actual time=0.096..2.997 rows=10001 loops=1)
+ -> Seq Scan on public.tt1 (cost=0.00..263.01 rows=10001 width=4) (actual time=0.099..2.822 rows=10001 loops=1)
Output: (a / 10), a
Buffers: shared hit=163
-Planning Time: 0.051 ms
-Execution Time: 17.892 ms
+Planning Time: 0.046 ms
+Execution Time: 15.926 ms
=======
### TEXT-short ###### Plan 24: Unique
-Unique (cost=0.29..785.30 rows=10001 width=4) (actual time=0.010..7.878 rows=10001 loops=1)
+Unique (cost=0.29..785.30 rows=10001 width=4) (actual time=0.009..6.684 rows=10001 loops=1)
Output: a
Buffers: shared hit=165
- -> Index Only Scan using i_tt1 on public.tt1 (cost=0.29..760.30 rows=10001 width=4) (actual time=0.010..4.020 rows=10001 loops=1)
+ -> Index Only Scan using i_tt1 on public.tt1 (cost=0.29..760.30 rows=10001 width=4) (actual time=0.008..3.517 rows=10001 loops=1)
Output: a
Heap Fetches: 10001
Buffers: shared hit=165
-Planning Time: 0.044 ms
-Execution Time: 8.769 ms
+Planning Time: 0.034 ms
+Execution Time: 7.610 ms
=======
### TEXT-short ###### Plan 25: PlainAggregate
-Aggregate (cost=288.01..288.02 rows=1 width=4) (actual time=3.283..3.283 rows=1 loops=1)
+Aggregate (cost=288.01..288.02 rows=1 width=4) (actual time=3.056..3.056 rows=1 loops=1)
Output: sum(a)
Buffers: shared hit=163
- -> Seq Scan on public.tt1 (cost=0.00..263.01 rows=10001 width=4) (actual time=0.095..1.442 rows=10001 loops=1)
+ -> Seq Scan on public.tt1 (cost=0.00..263.01 rows=10001 width=4) (actual time=0.097..1.249 rows=10001 loops=1)
Output: a, b, c
Buffers: shared hit=163
-Planning Time: 0.031 ms
-Execution Time: 3.307 ms
+Planning Time: 0.032 ms
+Execution Time: 3.229 ms
=======
### TEXT-short ###### Plan 26: BitmapIndexScan/BitmapHeapScan, BitmapOr, lossy
-Bitmap Heap Scan on public.tt3 (cost=4243.43..7466.44 rows=180001 width=12) (actual time=26.161..65.167 rows=180000 loops=1)
+Bitmap Heap Scan on public.tt3 (cost=4271.43..7494.44 rows=180001 width=12) (actual time=23.643..56.113 rows=180000 loops=1)
Output: a, b, c
- Recheck Cond: (tt3.b > (-99998))
+ Recheck Cond: (tt3.b > '-99998'::integer)
Rows Removed by Index Recheck: 3
Heap Blocks: exact=558 lossy=415
- Buffers: shared hit=1683
- -> Bitmap Index Scan using i_tt3_b (cost=0.00..4198.43 rows=180001 width=0) (actual time=26.049..26.049 rows=180000 loops=1)
- Index Cond: (tt3.b > (-99998))
- Buffers: shared hit=710
-Planning Time: 0.102 ms
-Execution Time: 79.090 ms
+ Buffers: shared hit=1690
+ -> Bitmap Index Scan using i_tt3_b (cost=0.00..4226.43 rows=180001 width=0) (actual time=23.536..23.536 rows=180000 loops=1)
+ Index Cond: (tt3.b > '-99998'::integer)
+ Buffers: shared hit=717
+Planning Time: 0.090 ms
+Execution Time: 69.513 ms
=======
### TEXT-short ###### Plan 27: Join Filter
-Limit (cost=0.00..21.52 rows=100 width=12) (actual time=5.323..5.448 rows=100 loops=1)
+Limit (cost=0.00..21.52 rows=100 width=12) (actual time=4.752..4.861 rows=100 loops=1)
Output: tt2.a, tt2.b, tt2.c
Buffers: shared hit=40, temp written=12
- -> Nested Loop (cost=0.00..43048282.11 rows=200023334 width=12) (actual time=5.323..5.435 rows=100 loops=1)
+ -> Nested Loop (cost=0.00..43048282.11 rows=200023334 width=12) (actual time=4.751..4.848 rows=100 loops=1)
Output: tt2.a, tt2.b, tt2.c
Join Filter: ((tt2.a < tt3.a) AND ((tt3.a + tt2.a) < 100000))
Rows Removed by Join Filter: 7001
Buffers: shared hit=40, temp written=12
- -> Seq Scan on public.tt2 (cost=0.00..155.01 rows=10001 width=12) (actual time=0.009..0.009 rows=1 loops=1)
+ -> Seq Scan on public.tt2 (cost=0.00..155.01 rows=10001 width=12) (actual time=0.013..0.013 rows=1 loops=1)
Output: tt2.a, tt2.b, tt2.c
Buffers: shared hit=1
- -> Materialize (cost=0.00..4377.05 rows=180003 width=4) (actual time=0.009..4.223 rows=7101 loops=1)
+ -> Materialize (cost=0.00..4377.05 rows=180003 width=4) (actual time=0.008..3.712 rows=7101 loops=1)
Output: tt3.a
Buffers: shared hit=39, temp written=12
- -> Seq Scan on public.tt3 (cost=0.00..2773.03 rows=180003 width=4) (actual time=0.007..1.608 rows=7101 loops=1)
+ -> Seq Scan on public.tt3 (cost=0.00..2773.03 rows=180003 width=4) (actual time=0.007..1.475 rows=7101 loops=1)
Output: tt3.a
Buffers: shared hit=39
-Planning Time: 0.165 ms
-Execution Time: 5.553 ms
+Planning Time: 0.153 ms
+Execution Time: 5.363 ms
=======
### TEXT-short ###### Plan 28: TidScan
Output: a, b, c
Tid Cond: (tt3.ctid = '(0,28)'::tid)
Buffers: shared hit=1
-Planning Time: 0.068 ms
-Execution Time: 0.017 ms
+Planning Time: 0.058 ms
+Execution Time: 0.113 ms
=======
### TEXT-short ###### Plan 29: LockRows
-LockRows (cost=0.00..313.51 rows=50 width=10) (actual time=0.146..5.055 rows=1001 loops=1)
+LockRows (cost=0.00..313.51 rows=50 width=10) (actual time=0.132..4.061 rows=1001 loops=1)
Output: a, ctid
Buffers: shared hit=1164
- -> Seq Scan on public.tt1 (cost=0.00..313.01 rows=50 width=10) (actual time=0.134..3.621 rows=1001 loops=1)
+ -> Seq Scan on public.tt1 (cost=0.00..313.01 rows=50 width=10) (actual time=0.123..3.139 rows=1001 loops=1)
Output: a, ctid
Filter: ((tt1.a % 10) = 0)
Rows Removed by Filter: 9000
Buffers: shared hit=163
-Planning Time: 0.041 ms
-Execution Time: 5.217 ms
+Planning Time: 0.034 ms
+Execution Time: 4.378 ms
=======
### TEXT-short ###### Plan 30: Materialize
-Seq Scan on public.tt1 (cost=0.00..1150490.52 rows=5000 width=12) (actual time=5.929..5.929 rows=0 loops=1)
+Seq Scan on public.tt1 (cost=0.00..1150490.52 rows=5000 width=12) (actual time=4.470..4.470 rows=0 loops=1)
Output: tt1.a, tt1.b, tt1.c
Filter: (SubPlan 1)
Rows Removed by Filter: 10001
-> Materialize (cost=0.00..205.01 rows=10001 width=4) (actual time=0.000..0.000 rows=1 loops=10001)
Output: tt2.b
Buffers: shared hit=1
- -> Seq Scan on public.tt2 (cost=0.00..155.01 rows=10001 width=4) (actual time=0.008..0.008 rows=1 loops=1)
+ -> Seq Scan on public.tt2 (cost=0.00..155.01 rows=10001 width=4) (actual time=0.007..0.007 rows=1 loops=1)
Output: tt2.b
Buffers: shared hit=1
-Planning Time: 0.102 ms
-Execution Time: 5.957 ms
+Planning Time: 0.047 ms
+Execution Time: 4.715 ms
+
+=======
+### TEXT-short ###### Plan 31: Update on partitioned tables
+Update on public.p (cost=0.00..3691.07 rows=200006 width=18) (actual time=2976.258..2976.258 rows=0 loops=1)
+ Update on public.p
+ Update on public.tt1
+ Update on public.tt2
+ Update on public.tt3
+ Buffers: shared hit=1566205 read=2648 dirtied=2648
+ -> Seq Scan on public.p (cost=0.00..0.00 rows=1 width=46) (actual time=0.000..0.000 rows=0 loops=1)
+ Output: p.a, (p.b + 1), p.c, p.ctid
+ -> Seq Scan on public.tt1 (cost=0.00..288.01 rows=10001 width=18) (actual time=0.098..8.471 rows=10001 loops=1)
+ Output: tt1.a, (tt1.b + 1), tt1.c, tt1.ctid
+ Buffers: shared hit=163
+ -> Seq Scan on public.tt2 (cost=0.00..180.01 rows=10001 width=18) (actual time=0.010..5.672 rows=10001 loops=1)
+ Output: tt2.a, (tt2.b + 1), tt2.c, tt2.ctid
+ Buffers: shared hit=55
+ -> Seq Scan on public.tt3 (cost=0.00..3223.04 rows=180003 width=18) (actual time=0.010..109.066 rows=180003 loops=1)
+ Output: tt3.a, (tt3.b + 1), tt3.c, tt3.ctid
+ Buffers: shared hit=973
+Planning Time: 0.153 ms
+Trigger tt1_trig_1: time=70.532 calls=10001
+Trigger tt1_trig_2: time=56.766 calls=10001
+Execution Time: 2976.755 ms
+
+=======
+### TEXT-short ###### Plan 32: Delete on partitioned tables
+Delete on public.p (cost=0.00..32.81 rows=6 width=6) (actual time=0.257..0.257 rows=0 loops=1)
+ Delete on public.p
+ Delete on public.tt1
+ Delete on public.tt2
+ Delete on public.tt3
+ Buffers: shared hit=18
+ -> Seq Scan on public.p (cost=0.00..0.00 rows=1 width=6) (actual time=0.001..0.001 rows=0 loops=1)
+ Output: p.ctid
+ Filter: (p.a = 100)
+ -> Index Scan using i_tt1 on public.tt1 (cost=0.29..8.30 rows=1 width=6) (actual time=0.070..0.121 rows=1 loops=1)
+ Output: tt1.ctid
+ Index Cond: (tt1.a = 100)
+ Buffers: shared hit=5
+ -> Index Scan using i_tt2 on public.tt2 (cost=0.29..8.30 rows=1 width=6) (actual time=0.007..0.007 rows=0 loops=1)
+ Output: tt2.ctid
+ Index Cond: (tt2.a = 100)
+ Buffers: shared hit=2
+ -> Index Scan using i_tt3_a on public.tt3 (cost=0.42..16.20 rows=3 width=6) (actual time=0.013..0.108 rows=2 loops=1)
+ Output: tt3.ctid
+ Index Cond: (tt3.a = 100)
+ Buffers: shared hit=8
+Planning Time: 0.333 ms
+Execution Time: 1.258 ms
+
+=======
+### TEXT-short ###### Plan 33: ON CONFLICT
+Insert on public.ct1 (cost=0.00..0.01 rows=1 width=0) (actual time=0.055..0.055 rows=0 loops=1)
+ Conflict Resolution: UPDATE
+ Conflict Arbiter Indexes: ct1_a_key
+ Tuples Inserted: 0
+ Conflicting Tuples: 1
+ Buffers: shared hit=4
+ -> Result (cost=0.00..0.01 rows=1 width=0) (actual time=0.001..0.002 rows=1 loops=1)
+ Output: 1, 1
+Planning Time: 0.031 ms
+Execution Time: 0.443 ms
+
+=======
+### TEXT-short ###### Plan 34: GROUP BY
+HashAggregate (cost=450.00..583.13 rows=13314 width=12) (actual time=17.687..24.180 rows=10000 loops=1)
+ Output: a, b, max(c)
+ Group Key: tt1.a, tt1.b
+ Buffers: shared hit=217
+ -> Seq Scan on public.tt1 (cost=0.00..350.14 rows=13314 width=12) (actual time=0.215..5.890 rows=10000 loops=1)
+ Output: a, b, c
+ Buffers: shared hit=217
+Planning Time: 0.111 ms
+Execution Time: 26.038 ms
+
+=======
+### TEXT-short ###### Plan 35: GROUPING SETS
+GroupAggregate (cost=0.29..2475.05 rows=26629 width=12) (actual time=0.026..57.973 rows=20001 loops=1)
+ Output: a, b, max(c)
+ Group Key: tt1.a
+ Group Key: ()
+ Sort Key: tt1.b
+ Group Key: tt1.b
+ Buffers: shared hit=20180
+ -> Index Scan using i_tt1 on public.tt1 (cost=0.29..863.99 rows=13314 width=12) (actual time=0.016..21.131 rows=10000 loops=1)
+ Output: a, b, c
+ Buffers: shared hit=20180
+Planning Time: 0.091 ms
+Execution Time: 61.219 ms
+
+=======
+### TEXT-short ###### Plan 36: Table sample
+Sample Scan (cost=0.00..9.33 rows=133 width=12) (actual time=0.018..0.061 rows=185 loops=1)
+ Output: a, b, c
+ Sampling: system ('1'::real) REPEATABLE ('1'::double precision)
+ Buffers: shared hit=1
+Planning Time: 0.062 ms
+Execution Time: 0.271 ms
###### long-json-as-a-source test
SELECT '### '||'yaml-long JSON '||title||E'\n'||
pg_store_plans_yamlplan(lplan)
Total Cost: 10.00
Plan Rows: 1000
Plan Width: 4
- Actual Startup Time: 278.453
- Actual Total Time: 278.453
+ Actual Startup Time: 210.478
+ Actual Total Time: 210.478
Actual Rows: 0
Actual Loops: 1
- Shared Hit Blocks: 29735
- Shared Read Blocks: 87
+ Shared Hit Blocks: 29737
+ Shared Read Blocks: 88
Shared Dirtied Blocks: 85
Shared Written Blocks: 0
Local Hit Blocks: 0
Local Written Blocks: 0
Temp Read Blocks: 0
Temp Written Blocks: 0
- I/O Read Time: 0.000
+ I/O Read Time: 0.260
I/O Write Time: 0.000
Plans:
- Node Type: "Function Scan"
Total Cost: 10.00
Plan Rows: 1000
Plan Width: 4
- Actual Startup Time: 3.470
- Actual Total Time: 9.319
+ Actual Startup Time: 1.689
+ Actual Total Time: 7.253
Actual Rows: 10001
Actual Loops: 1
Output:
Temp Written Blocks: 0
I/O Read Time: 0.000
I/O Write Time: 0.000
- Planning Time: 0.072
+ Planning Time: 0.049
Triggers:
- Trigger Name: "tt1_trig_1"
Relation: "tt1"
- Time: 100.983
+ Time: 71.597
Calls: 10001
- Trigger Name: "tt1_trig_2"
Relation: "tt1"
- Time: 85.683
+ Time: 62.334
Calls: 10001
- Execution Time: 279.083
+ Execution Time: 210.989
##################
SELECT '### '||'xml-long JSON '||title||E'\n'||
pg_store_plans_xmlplan(lplan)
<Total-Cost>10.00</Total-Cost>
<Plan-Rows>1000</Plan-Rows>
<Plan-Width>4</Plan-Width>
- <Actual-Startup-Time>278.453</Actual-Startup-Time>
- <Actual-Total-Time>278.453</Actual-Total-Time>
+ <Actual-Startup-Time>210.478</Actual-Startup-Time>
+ <Actual-Total-Time>210.478</Actual-Total-Time>
<Actual-Rows>0</Actual-Rows>
<Actual-Loops>1</Actual-Loops>
- <Shared-Hit-Blocks>29735</Shared-Hit-Blocks>
- <Shared-Read-Blocks>87</Shared-Read-Blocks>
+ <Shared-Hit-Blocks>29737</Shared-Hit-Blocks>
+ <Shared-Read-Blocks>88</Shared-Read-Blocks>
<Shared-Dirtied-Blocks>85</Shared-Dirtied-Blocks>
<Shared-Written-Blocks>0</Shared-Written-Blocks>
<Local-Hit-Blocks>0</Local-Hit-Blocks>
<Local-Written-Blocks>0</Local-Written-Blocks>
<Temp-Read-Blocks>0</Temp-Read-Blocks>
<Temp-Written-Blocks>0</Temp-Written-Blocks>
- <I/O-Read-Time>0.000</I/O-Read-Time>
+ <I/O-Read-Time>0.260</I/O-Read-Time>
<I/O-Write-Time>0.000</I/O-Write-Time>
<Plans>
<Item>
<Total-Cost>10.00</Total-Cost>
<Plan-Rows>1000</Plan-Rows>
<Plan-Width>4</Plan-Width>
- <Actual-Startup-Time>3.470</Actual-Startup-Time>
- <Actual-Total-Time>9.319</Actual-Total-Time>
+ <Actual-Startup-Time>1.689</Actual-Startup-Time>
+ <Actual-Total-Time>7.253</Actual-Total-Time>
<Actual-Rows>10001</Actual-Rows>
<Actual-Loops>1</Actual-Loops>
<Output>
</Item>
</Plans>
</Plan>
- <Planning-Time>0.072</Planning-Time>
+ <Planning-Time>0.049</Planning-Time>
<Triggers>
<Item>
<Trigger-Name>tt1_trig_1</Trigger-Name>
<Relation>tt1</Relation>
- <Time>100.983</Time>
+ <Time>71.597</Time>
<Calls>10001</Calls>
</Item>
<Item>
<Trigger-Name>tt1_trig_2</Trigger-Name>
<Relation>tt1</Relation>
- <Time>85.683</Time>
+ <Time>62.334</Time>
<Calls>10001</Calls>
</Item>
</Triggers>
- <Execution-Time>279.083</Execution-Time>
+ <Execution-Time>210.989</Execution-Time>
</Query>
</explain>
<Total-Cost>10.00</Total-Cost>
<Plan-Rows>1000</Plan-Rows>
<Plan-Width>4</Plan-Width>
- <Actual-Startup-Time>278.453</Actual-Startup-Time>
- <Actual-Total-Time>278.453</Actual-Total-Time>
+ <Actual-Startup-Time>210.478</Actual-Startup-Time>
+ <Actual-Total-Time>210.478</Actual-Total-Time>
<Actual-Rows>0</Actual-Rows>
<Actual-Loops>1</Actual-Loops>
- <Shared-Hit-Blocks>29735</Shared-Hit-Blocks>
- <Shared-Read-Blocks>87</Shared-Read-Blocks>
+ <Shared-Hit-Blocks>29737</Shared-Hit-Blocks>
+ <Shared-Read-Blocks>88</Shared-Read-Blocks>
<Shared-Dirtied-Blocks>85</Shared-Dirtied-Blocks>
<Shared-Written-Blocks>0</Shared-Written-Blocks>
<Local-Hit-Blocks>0</Local-Hit-Blocks>
<Local-Written-Blocks>0</Local-Written-Blocks>
<Temp-Read-Blocks>0</Temp-Read-Blocks>
<Temp-Written-Blocks>0</Temp-Written-Blocks>
- <I/O-Read-Time>0.000</I/O-Read-Time>
+ <I/O-Read-Time>0.260</I/O-Read-Time>
<I/O-Write-Time>0.000</I/O-Write-Time>
<Plans>
<Item>
<Total-Cost>10.00</Total-Cost>
<Plan-Rows>1000</Plan-Rows>
<Plan-Width>4</Plan-Width>
- <Actual-Startup-Time>3.470</Actual-Startup-Time>
- <Actual-Total-Time>9.319</Actual-Total-Time>
+ <Actual-Startup-Time>1.689</Actual-Startup-Time>
+ <Actual-Total-Time>7.253</Actual-Total-Time>
<Actual-Rows>10001</Actual-Rows>
<Actual-Loops>1</Actual-Loops>
<Output>
</Item>
</Plans>
</Plan>
- <Planning-Time>0.072</Planning-Time>
+ <Planning-Time>0.049</Planning-Time>
<Triggers>
<Item>
<Trigger-Name>tt1_trig_1</Trigger-Name>
<Relation>tt1</Relation>
- <Time>100.983</Time>
+ <Time>71.597</Time>
<Calls>10001</Calls>
</Item>
<Item>
<Trigger-Name>tt1_trig_2</Trigger-Name>
<Relation>tt1</Relation>
- <Time>85.683</Time>
+ <Time>62.334</Time>
<Calls>10001</Calls>
</Item>
</Triggers>
- <Execution-Time>279.083</Execution-Time>
+ <Execution-Time>210.989</Execution-Time>
</Query>
</explain>
"Total Cost": 1357.51,
"Plan Rows": 10001,
"Plan Width": 4,
- "Actual Startup Time": 18.390,
- "Actual Total Time": 18.390,
+ "Actual Startup Time": 16.635,
+ "Actual Total Time": 16.635,
"Actual Rows": 0,
"Actual Loops": 1,
"Output": ["\"*SELECT* 1\".a", "(0)"],
"Total Cost": 668.04,
"Plan Rows": 10001,
"Plan Width": 4,
- "Actual Startup Time": 18.387,
- "Actual Total Time": 18.387,
+ "Actual Startup Time": 16.632,
+ "Actual Total Time": 16.632,
"Actual Rows": 0,
"Actual Loops": 1,
"Output": ["\"*SELECT* 1\".a", "(0)"],
"Total Cost": 1357.51,
"Plan Rows": 10001,
"Plan Width": 4,
- "Actual Startup Time": 24.448,
- "Actual Total Time": 25.233,
+ "Actual Startup Time": 21.220,
+ "Actual Total Time": 21.898,
"Actual Rows": 10001,
"Actual Loops": 1,
"Output": ["\"*SELECT* 1\".a", "(0)"],
"Sort Key": ["\"*SELECT* 1\".a"],
"Sort Method": "quicksort",
- "Sort Space Used": 855,
+ "Sort Space Used": 811,
"Sort Space Type": "Memory",
"Shared Hit Blocks": 218,
"Shared Read Blocks": 0,
"Total Cost": 668.04,
"Plan Rows": 10001,
"Plan Width": 4,
- "Actual Startup Time": 18.989,
- "Actual Total Time": 20.104,
+ "Actual Startup Time": 16.219,
+ "Actual Total Time": 17.188,
"Actual Rows": 10001,
"Actual Loops": 1,
"Output": ["\"*SELECT* 1\".a", "(0)"],
"Total Cost": 1357.51,
"Plan Rows": 10001,
"Plan Width": 4,
- "Actual Startup Time": 24.246,
- "Actual Total Time": 25.047,
+ "Actual Startup Time": 21.153,
+ "Actual Total Time": 21.804,
"Actual Rows": 10001,
"Actual Loops": 1,
"Output": ["\"*SELECT* 1\".a", "(0)"],
"Sort Key": ["\"*SELECT* 1\".a"],
"Sort Method": "quicksort",
- "Sort Space Used": 855,
+ "Sort Space Used": 811,
"Sort Space Type": "Memory",
"Shared Hit Blocks": 218,
"Shared Read Blocks": 0,
"Total Cost": 668.04,
"Plan Rows": 10001,
"Plan Width": 4,
- "Actual Startup Time": 18.981,
- "Actual Total Time": 20.120,
+ "Actual Startup Time": 16.271,
+ "Actual Total Time": 17.182,
"Actual Rows": 10001,
"Actual Loops": 1,
"Output": ["\"*SELECT* 1\".a", "(0)"],
Node Type: "Merge Join"
Join Type: "Left"
Startup Cost: 0.71
- Total Cost: 4245.45
- Plan Rows: 33453
+ Total Cost: 4300.43
+ Plan Rows: 33599
Plan Width: 4
- Actual Startup Time: 0.034
- Actual Total Time: 56.948
+ Actual Startup Time: 0.029
+ Actual Total Time: 51.083
Actual Rows: 60003
Actual Loops: 1
Output:
- "x.b"
Merge Cond: "(x.a = y.a)"
- Shared Hit Blocks: 20930
+ Shared Hit Blocks: 20944
Shared Read Blocks: 0
Shared Dirtied Blocks: 0
Shared Written Blocks: 0
Node Type: "Hash Join"
Join Type: "Full"
Startup Cost: 280.02
- Total Cost: 793.06
+ Total Cost: 680.55
Plan Rows: 10001
Plan Width: 4
- Actual Startup Time: 11.957
- Actual Total Time: 21.814
+ Actual Startup Time: 4.774
+ Actual Total Time: 10.603
Actual Rows: 17001
Actual Loops: 1
Output:
Total Cost: 263.01
Plan Rows: 10001
Plan Width: 8
+ Actual Startup Time: 0.1
<truncated>
=======
Node Type: "Hash Join"
Join Type: "Semi"
Startup Cost: 280.02
- Total Cost: 793.06
+ Total Cost: 680.55
Plan Rows: 10001
Plan Width: 12
- Actual Startup Time: 10.770
- Actual Total Time: 10.770
+ Actual Startup Time: 7.910
+ Actual Total Time: 7.910
Actual Rows: 0
Actual Loops: 1
Output:
Startup Cost: 0.00
Total Cost: 263.01
Plan Rows: 10001
+
<truncated>
##################
SELECT '### '||'xml-chopped '||title||E'\n'||
<Node-Type>Hash Join</Node-Type>
<Join-Type>Anti</Join-Type>
<Startup-Cost>280.02</Startup-Cost>
- <Total-Cost>693.05</Total-Cost>
+ <Total-Cost>580.54</Total-Cost>
<Plan-Rows>1</Plan-Rows>
<Plan-Width>12</Plan-Width>
- <Actual-Startup-Time>5.985</Actual-Startup-Time>
- <Actual-Total-Time>12.403</Actual-Total-Time>
+ <Actual-Startup-Time>4.918</Actual-Startup-Time>
+ <Actual-Total-Time>9.632</Actual-Total-Time>
<Actual-Rows>10001</Actual-Rows>
<Actual-Loops>1</Actual-Loops>
<Output>
<Startup-Cost>0.00</Startup-Cost>
<Total-Cost>263.01</Total-Cost>
<Plan-Rows>10001</Plan-Rows>
+ <Plan-Width>
<truncated>
=======
<Total-Cost>1127.49</Total-Cost>
<Plan-Rows>10001</Plan-Rows>
<Plan-Width>4</Plan-Width>
- <Actual-Startup-Time>5.593</Actual-Startup-Time>
- <Actual-Total-Time>16.541</Actual-Total-Time>
+ <Actual-Startup-Time>5.164</Actual-Startup-Time>
+ <Actual-Total-Time>14.618</Actual-Total-Time>
<Actual-Rows>10001</Actual-Rows>
<Actual-Loops>1</Actual-Loops>
<Output>
<Total-Cost>785.30</Total-Cost>
<Plan-Rows>10001</Plan-Rows>
<Plan-Width>4</Plan-Width>
- <Actual-Startup-Time>0.010</Actual-Startup-Time>
- <Actual-Total-Time>7.878</Actual-Total-Time>
+ <Actual-Startup-Time>0.009</Actual-Startup-Time>
+ <Actual-Total-Time>6.684</Actual-Total-Time>
<Actual-Rows>10001</Actual-Rows>
<Actual-Loops>1</Actual-Loops>
<Output>
pg_store_plans_textplan(substring(splan from 1 for char_length(splan) / 3))
FROM plans WHERE id BETWEEN 25 AND 27 ORDER BY id;
### text-chopped ###### Plan 25: PlainAggregate
-Aggregate (cost=288.01..288.02 rows=1 width=4) (actual time=3.283..3.283 rows=1 loops=1)
+Aggregate (cost=288.01..288.02 rows=1 width=4) (actual time=3.056..3.056 rows=1 loops=1)
Output: sum(a)
Buffers: shared hit=163
<truncated>
=======
### text-chopped ###### Plan 26: BitmapIndexScan/BitmapHeapScan, BitmapOr, lossy
-Bitmap Heap Scan on public.tt3 (cost=4243.43..7466.44 rows=180001 width=12) (actual time=26.161..65.167 rows=180000 loops=1)
+Bitmap Heap Scan on public.tt3 (cost=4271.43..7494.44 rows=180001 width=12) (actual time=23.643..56.113 rows=180000 loops=1)
Output: a, b, c
- Recheck Cond: (tt3.b > (-99998))
+ Recheck Cond: (tt3.b > '-99998'::integer)
<truncated>
=======
### text-chopped ###### Plan 27: Join Filter
-Limit (cost=0.00..21.52 rows=100 width=12) (actual time=5.323..5.448 rows=100 loops=1)
+Limit (cost=0.00..21.52 rows=100 width=12) (actual time=4.752..4.861 rows=100 loops=1)
Output: tt2.a, tt2.b, tt2.c
Buffers: shared hit=40, temp written=12
- -> Nested Loop (cost=0.00..43048282.11 rows=200023334 width=12) (actual time=5.323..5.435 rows=100 loops=1)
+ -> Nested Loop (cost=0.00..43048282.11 rows=200023334 width=12) (actual time=4.751..4.848 rows=100 loops=1)
Output: tt2.a, tt2.b, tt2.c
<truncated>
###### shorten test
pg_store_plans_shorten(lplan)
FROM plans WHERE id = -2 ORDER BY id;
### shorten ###### Plan -2: all properties plus unknown key
-{"p":0,"l":0,"t":"a","t":"b","t":"c","t":"d","t":"e","t":"f","t":"g","t":"h","t":"i","t":"j","t":"k","t":"l","t":"m","t":"n","t":"o","t":"p","t":"q","t":"r","t":"s","t":"t","t":"u","t":"v","t":"w","t":"x","t":"y","t":"z","t":"0","t":"1","t":"2","t":"3","t":"4","t":"5","h":"o","h":"i","h":"s","h":"m","h":"I","h":"S","d":"b","d":"n","d":"f","i":0,"n":0,"f":0,"c":0,"s":0,"a":0,"o":"[]","m":"a","g":"p","g":"s","g":"h","j":"i","j":"l","j":"f","j":"r","j":"s","j":"a","b":"i","b":"I","b":"e","b":"E","e":"h","e":"q","e":"e","e":"E","e":"s","k":"a","5":"a","6":"a","7":"a","8":"a","9":"a","0":"a","!":"i","!":"d","!":"u","q":"a","r":0,"u":0,"v":0,"w":0,"x":0,"y":0,"1":0,"2":0,"3":0,"4":0,"A":0,"B":0,"C":0,"D":0,"E":0,"F":0,"G":0,"H":0,"I":0,"J":0,"K":0,"L":0,"M":0,"N":0,"O":0,"P":0,"Q":0,"R":0,"S":"d","S":"m","T":0,"U":0,"V":0,"W":0,"X":0,"Y":0,"Z":0,"z":0,"#":0,"$":0,"&":0,"(":0,")":0,"Unknown Key":"Unknown Value"}
+{"p":0,"l":0,"t":"a","t":"b","t":"c","t":"d","t":"e","t":"f","t":"g","t":"h","t":"i","t":"j","t":"k","t":"l","t":"m","t":"n","t":"o","t":"p","t":"q","t":"r","t":"s","t":"t","t":"u","t":"v","t":"w","t":"x","t":"y","t":"z","t":"0","t":"1","t":"2","t":"3","t":"4","t":"5","h":"o","h":"i","h":"s","h":"m","h":"I","h":"S","d":"b","d":"n","d":"f","i":0,"n":0,"f":0,"c":0,"s":0,"a":0,"o":"[]","m":"a","g":"p","g":"s","g":"h","j":"i","j":"l","j":"f","j":"r","j":"s","j":"a","b":"i","b":"I","b":"e","b":"E","e":"h","e":"q","e":"e","e":"E","e":"s","k":"a","-":"a","=":"a","\\":"a","5":"a","6":"a","7":"a","8":"a","9":"a","0":"a","%":"a","@":"a","^":0,"+":0,"_":"a","!":"i","!":"d","!":"u","q":"a","r":0,"u":0,"v":0,"w":0,"x":0,"y":0,"1":0,"2":0,"3":0,"4":0,"A":0,"B":0,"C":0,"D":0,"E":0,"F":0,"G":0,"H":0,"I":0,"J":0,"K":0,"L":0,"M":0,"N":0,"O":0,"P":0,"Q":0,"R":0,"S":"d","S":"m","T":0,"U":0,"*":0,"V":0,"W":0,"X":0,"Y":0,"Z":0,"z":0,"#":0,"$":0,"&":0,"(":0,")":0,"Unknown Key":"Unknown Value"}
###### normalize test
SELECT '### '||'normalize '||title||E'\n'||
pg_store_plans_normalize(lplan)
FROM plans ORDER BY id;
### normalize ###### Plan -2: all properties plus unknown key
-{"p":0,"l":0,"t":"a","t":"b","t":"c","t":"d","t":"e","t":"f","t":"g","t":"h","t":"i","t":"j","t":"k","t":"l","t":"m","t":"n","t":"o","t":"p","t":"q","t":"r","t":"s","t":"t","t":"u","t":"v","t":"w","t":"x","t":"y","t":"z","t":"0","t":"1","t":"2","t":"3","t":"4","t":"5","h":"o","h":"i","h":"s","h":"m","h":"I","h":"S","d":"b","d":"n","d":"f","i":0,"n":0,"f":0,"c":0,"s":0,"a":0,"o":"[]","m":"a","g":"p","g":"s","g":"h","j":"i","j":"l","j":"f","j":"r","j":"s","j":"a","b":"i","b":"I","b":"e","b":"E","e":"h","e":"q","e":"e","e":"E","e":"s","k":"a","5":"a","6":"a","7":"a","8":"a","9":"a","0":"a","!":"i","!":"d","!":"u","q":"a","r":0,"u":0,"v":0,"w":0,"x":0}
+{"p":0,"l":0,"t":"a","t":"b","t":"c","t":"d","t":"e","t":"f","t":"g","t":"h","t":"i","t":"j","t":"k","t":"l","t":"m","t":"n","t":"o","t":"p","t":"q","t":"r","t":"s","t":"t","t":"u","t":"v","t":"w","t":"x","t":"y","t":"z","t":"0","t":"1","t":"2","t":"3","t":"4","t":"5","h":"o","h":"i","h":"s","h":"m","h":"I","h":"S","d":"b","d":"n","d":"f","i":0,"n":0,"f":0,"c":0,"s":0,"a":0,"o":"[]","m":"a","g":"p","g":"s","g":"h","j":"i","j":"l","j":"f","j":"r","j":"s","j":"a","b":"i","b":"I","b":"e","b":"E","e":"h","e":"q","e":"e","e":"E","e":"s","k":"a","-":"a","=":"a","\\":"a","5":"a","6":"a","7":"a","8":"a","9":"a","0":"a","!":"i","!":"d","!":"u","q":"a","r":0,"u":0,"v":0,"w":0,"x":0}
=======
### normalize ###### Plan -1: all properties
-{"p":0,"l":0,"t":"a","t":"b","t":"c","t":"d","t":"e","t":"f","t":"g","t":"h","t":"i","t":"j","t":"k","t":"l","t":"m","t":"n","t":"o","t":"p","t":"q","t":"r","t":"s","t":"t","t":"u","t":"v","t":"w","t":"x","t":"y","t":"z","t":"0","t":"1","t":"2","t":"3","t":"4","t":"5","h":"o","h":"i","h":"s","h":"m","h":"I","h":"S","d":"b","d":"n","d":"f","i":0,"n":0,"f":0,"c":0,"s":0,"a":0,"o":"[]","m":"a","g":"p","g":"s","g":"h","j":"i","j":"l","j":"f","j":"r","j":"s","j":"a","b":"i","b":"I","b":"e","b":"E","e":"h","e":"q","e":"e","e":"E","e":"s","k":"a","5":"a","6":"a","7":"a","8":"a","9":"a","0":"a","!":"i","!":"d","!":"u","q":"a","r":0,"u":0,"v":0,"w":0,"x":0}
+{"p":0,"l":0,"t":"a","t":"b","t":"c","t":"d","t":"e","t":"f","t":"g","t":"h","t":"i","t":"j","t":"k","t":"l","t":"m","t":"n","t":"o","t":"p","t":"q","t":"r","t":"s","t":"t","t":"u","t":"v","t":"w","t":"x","t":"y","t":"z","t":"0","t":"1","t":"2","t":"3","t":"4","t":"5","h":"o","h":"i","h":"s","h":"m","h":"I","h":"S","d":"b","d":"n","d":"f","i":0,"n":0,"f":0,"c":0,"s":0,"a":0,"o":"[]","m":"a","g":"p","g":"s","g":"h","j":"i","j":"l","j":"f","j":"r","j":"s","j":"a","b":"i","b":"I","b":"e","b":"E","e":"h","e":"q","e":"e","e":"E","e":"s","k":"a","-":"a","=":"a","\\":"a","5":"a","6":"a","7":"a","8":"a","9":"a","0":"a","!":"i","!":"d","!":"u","q":"a","r":0,"u":0,"v":0,"w":0,"x":0}
=======
### normalize ###### Plan 1: Insert, Trigger
{"p":{"t":"i","d":"f","i":"i_tt1","n":"tt1","s":"public","a":"x\"y","o":["a","b","c"],"8":"(\"x\"\"y\".a = ANY (?::INTEGER[]))"},"r":[]}
=======
-### normalize ###### Plan 6: Index scan (backward), MergeJoin, Sort, quichsort, alias
-{"p":{"t":"5","o":["x.b","x.c","x.a"],"l":[{"t":"u","h":"o","j":"i","o":["x.b","x.c","x.a"],"m":"(x.a = (((y.b) * ?)))","l":[{"t":"i","h":"o","d":"b","i":"i_tt1","n":"tt1","s":"public","a":"x","o":["x.a","x.b","x.c"]}{"t":"x","h":"i","o":["y.b","(((y.b) * ?))"],"k":["(((y.b) * ?))"],"e":"q","l":[{"t":"h","h":"o","n":"tt2","s":"public","a":"y","o":["y.b","((y.b) * ?)"]}]}]}]},"r":[]}
+### normalize ###### Plan 6: Index scan (backward), MergeJoin, Sort, quicksort, alias
+{"p":{"t":"5","o":["x.b","x.c","x.a"],"l":[{"t":"u","h":"o","j":"i","o":["x.b","x.c","x.a"],"m":"(x.a = (((y.b) * ?)))","l":[{"t":"i","h":"o","d":"b","i":"i_tt1","n":"tt1","s":"public","a":"x","o":["x.a","x.b","x.c"]}{"t":"x","h":"i","o":["y.b","(((y.b) * ?))"],"k":["(((y.b) * ?)) DESC"],"e":"q","l":[{"t":"h","h":"o","n":"tt2","s":"public","a":"y","o":["y.b","((y.b) * ?)"]}]}]}]},"r":[]}
=======
### normalize ###### Plan 7: IndexOnlyScan
=======
### normalize ###### Plan 9: FunctionScan, Hash/HashJoin, Nested Loop
-{"p":{"t":"t","j":"i","o":["d.datname"],"l":[{"t":"v","h":"o","j":"i","o":["s.datid"],"7":"(s.usesysid = u.oid)","l":[{"t":"o","h":"o","f":"pg_stat_get_activity","s":"pg_catalog","a":"s","o":["s.datid","s.pid","s.usesysid","s.application_name","s.state","s.query","s.waiting","s.xact_start","s.query_start","s.backend_start","s.state_change","s.client_addr","s.client_hostname","s.client_port","s.backend_xid","s.backend_xmin"]}{"t":"2","h":"i","o":["u.oid"],"l":[{"t":"h","h":"o","n":"pg_authid","s":"pg_catalog","a":"u","o":["u.oid"]}]}]}{"t":"i","h":"i","d":"f","i":"pg_database_oid_index","n":"pg_database","s":"pg_catalog","a":"d","o":["d.datname","d.oid"],"8":"(d.oid = s.datid)"}]},"r":[]}
+{"p":{"t":"t","j":"i","o":["d.datname"],"l":[{"t":"v","h":"o","j":"i","o":["s.datid"],"7":"(s.usesysid = u.oid)","l":[{"t":"o","h":"o","f":"pg_stat_get_activity","s":"pg_catalog","a":"s","o":["s.datid","s.pid","s.usesysid","s.application_name","s.state","s.query","s.waiting","s.xact_start","s.query_start","s.backend_start","s.state_change","s.client_addr","s.client_hostname","s.client_port","s.backend_xid","s.backend_xmin","s.ssl","s.sslversion","s.sslcipher","s.sslbits","s.sslcompression","s.sslclientdn"]}{"t":"2","h":"i","o":["u.oid"],"l":[{"t":"h","h":"o","n":"pg_authid","s":"pg_catalog","a":"u","o":["u.oid"]}]}]}{"t":"i","h":"i","d":"f","i":"pg_database_oid_index","n":"pg_database","s":"pg_catalog","a":"d","o":["d.datname","d.oid"],"8":"(d.oid = s.datid)"}]},"r":[]}
=======
### normalize ###### Plan 10: MergeAppend, Values
=======
### normalize ###### Plan 11: Append, HashAggregate
-{"p":{"t":"z","g":"h","o":["tt1.a"][],"l":[{"t":"c","h":"o","l":[{"t":"h","h":"m","n":"tt1","s":"public","a":"tt1","o":["tt1.a"]}{"t":"h","h":"m","n":"tt2","s":"public","a":"tt2","o":["tt2.b"]}]}]},"r":[]}
+{"p":{"t":"z","g":"h","o":["tt1.a"],"-":["tt1.a"],"l":[{"t":"c","h":"o","l":[{"t":"h","h":"m","n":"tt1","s":"public","a":"tt1","o":["tt1.a"]}{"t":"h","h":"m","n":"tt2","s":"public","a":"tt2","o":["tt2.b"]}]}]},"r":[]}
=======
### normalize ###### Plan 12: GroupAggregate
-{"p":{"t":"z","g":"s","o":["sum(a)","b"][],"l":[{"t":"x","h":"o","o":["b","a"],"k":["tt1.b"],"e":"E","l":[{"t":"h","h":"o","n":"tt1","s":"public","a":"tt1","o":["b","a"]}]}]},"r":[]}
+{"p":{"t":"z","g":"s","o":["sum(a)","b"],"-":["tt1.b"],"l":[{"t":"x","h":"o","o":["b","a"],"k":["tt1.b"],"e":"E","l":[{"t":"h","h":"o","n":"tt1","s":"public","a":"tt1","o":["b","a"]}]}]},"r":[]}
=======
### normalize ###### Plan 13: Group
-{"p":{"t":"y","o":["b"][],"l":[{"t":"x","h":"o","o":["b"],"k":["tt1.b"],"e":"E","l":[{"t":"h","h":"o","n":"tt1","s":"public","a":"tt1","o":["b"]}]}]},"r":[]}
+{"p":{"t":"y","o":["b"],"-":["tt1.b"],"l":[{"t":"x","h":"o","o":["b"],"k":["tt1.b"],"e":"E","l":[{"t":"h","h":"o","n":"tt1","s":"public","a":"tt1","o":["b"]}]}]},"r":[]}
=======
### normalize ###### Plan 14: SetOp intersect, SbuqueryScan
=======
### normalize ###### Plan 26: BitmapIndexScan/BitmapHeapScan, BitmapOr, lossy
-{"p":{"t":"l","n":"tt3","s":"public","a":"tt3","o":["a","b","c"],"0":"(tt3.b > ?)","l":[{"t":"k","h":"o","i":"i_tt3_b","8":"(tt3.b > ?)"}]},"r":[]}
+{"p":{"t":"l","n":"tt3","s":"public","a":"tt3","o":["a","b","c"],"0":"(tt3.b > ?::INTEGER)","l":[{"t":"k","h":"o","i":"i_tt3_b","8":"(tt3.b > ?::INTEGER)"}]},"r":[]}
=======
### normalize ###### Plan 27: Join Filter
=======
### normalize ###### Plan 30: Materialize
{"p":{"t":"h","n":"tt1","s":"public","a":"tt1","o":["tt1.a","tt1.b","tt1.c"],"5":"(SubPlan ?)","l":[{"t":"w","h":"S","q":"SubPlan 1","o":["tt2.b"],"l":[{"t":"h","h":"o","n":"tt2","s":"public","a":"tt2","o":["tt2.b"]}]}]},"r":[]}
+
+=======
+### normalize ###### Plan 31: Update on partitioned tables
+{"p":{"t":"b","!":"u","n":"p","s":"public","a":"p"[{"n":"p","s":"public","a":"p"},{"n":"tt1","s":"public","a":"tt1"},{"n":"tt2","s":"public","a":"tt2"},{"n":"tt3","s":"public","a":"tt3"}],"l":[{"t":"h","h":"m","n":"p","s":"public","a":"p","o":["p.a","(p.b + ?)","p.c","p.ctid"]}{"t":"h","h":"m","n":"tt1","s":"public","a":"tt1","o":["tt1.a","(tt1.b + ?)","tt1.c","tt1.ctid"]}{"t":"h","h":"m","n":"tt2","s":"public","a":"tt2","o":["tt2.a","(tt2.b + ?)","tt2.c","tt2.ctid"]}{"t":"h","h":"m","n":"tt3","s":"public","a":"tt3","o":["tt3.a","(tt3.b + ?)","tt3.c","tt3.ctid"]}]},"r":[{"v":"tt1_trig_1","w":"tt1"}{"v":"tt1_trig_2","w":"tt1"}]}
+
+=======
+### normalize ###### Plan 32: Delete on partitioned tables
+{"p":{"t":"b","!":"d","n":"p","s":"public","a":"p"[{"n":"p","s":"public","a":"p"},{"n":"tt1","s":"public","a":"tt1"},{"n":"tt2","s":"public","a":"tt2"},{"n":"tt3","s":"public","a":"tt3"}],"l":[{"t":"h","h":"m","n":"p","s":"public","a":"p","o":["p.ctid"],"5":"(p.a = ?)"}{"t":"i","h":"m","d":"f","i":"i_tt1","n":"tt1","s":"public","a":"tt1","o":["tt1.ctid"],"8":"(tt1.a = ?)"}{"t":"i","h":"m","d":"f","i":"i_tt2","n":"tt2","s":"public","a":"tt2","o":["tt2.ctid"],"8":"(tt2.a = ?)"}{"t":"i","h":"m","d":"f","i":"i_tt3_a","n":"tt3","s":"public","a":"tt3","o":["tt3.ctid"],"8":"(tt3.a = ?)"}]},"r":[]}
+
+=======
+### normalize ###### Plan 33: ON CONFLICT
+{"p":{"t":"b","!":"i","n":"ct1","s":"public","a":"ct1"[],"l":[{"t":"a","h":"m","o":["?","?"]}]},"r":[]}
+
+=======
+### normalize ###### Plan 34: GROUP BY
+{"p":{"t":"z","g":"h","o":["a","b","max(c)"],"-":["tt1.a","tt1.b"],"l":[{"t":"h","h":"o","n":"tt1","s":"public","a":"tt1","o":["a","b","c"]}]},"r":[]}
+
+=======
+### normalize ###### Plan 35: GROUPING SETS
+{"p":{"t":"z","g":"s","o":["a","b","max(c)"],"=":[{"\\":[
+ ["tt1.a"],
+ []
+ ]},{"k":["tt1.b"],"\\":[
+ ["tt1.b"]
+ ]}],"l":[{"t":"i","h":"o","d":"f","i":"i_tt1","n":"tt1","s":"public","a":"tt1","o":["a","b","c"]}]},"r":[]}
+
+=======
+### normalize ###### Plan 36: Table sample
+{"p":{"t":"Sample Scan","n":"tt1","s":"public","a":"tt1","o":["a","b","c"][]},"r":[]}
"Sort Method": "external merge",
"Sort Method": "still in progress",
"Sort Key": "a",
+ "Group Key": "a",
+ "Grouping Sets": "a",
+ "Group Keys": "a",
"Filter": "a",
"Join Filter": "a",
"Hash Cond": "a",
"Index Cond": "a",
"TID Cond": "a",
"Recheck Cond": "a",
+ "Conflict Resolution": "a",
+ "Conflict Arbiter Indexes": "a",
+ "Tuples Inserted": 0,
+ "Conflicting Tuples": 0,
+ "Target Tables": "a",
"Operation": "Insert",
"Operation": "Delete",
"Operation": "Update",
"Sort Space Type": "Memory",
"Peak Memory Usage": 0,
"Original Hash Batches": 0,
+ "Original Hash Buckets": 0,
"Hash Batches": 0,
"Hash Buckets": 0,
"Rows Removed by Filter": 0,
"Sort Method": "external merge",
"Sort Method": "still in progress",
"Sort Key": "a",
+ "Group Key": "a",
+ "Grouping Sets": "a",
+ "Group Keys": "a",
"Filter": "a",
"Join Filter": "a",
"Hash Cond": "a",
"Index Cond": "a",
"TID Cond": "a",
"Recheck Cond": "a",
+ "Conflict Resolution": "a",
+ "Conflict Arbiter Indexes": "a",
+ "Tuples Inserted": 0,
+ "Conflicting Tuples": 0,
+ "Target Tables": "a",
"Operation": "Insert",
"Operation": "Delete",
"Operation": "Update",
"Sort Space Type": "Memory",
"Peak Memory Usage": 0,
"Original Hash Batches": 0,
+ "Original Hash Buckets": 0,
"Hash Batches": 0,
"Hash Buckets": 0,
"Rows Removed by Filter": 0,
"Total Cost": 10.00,
"Plan Rows": 1000,
"Plan Width": 4,
- "Actual Startup Time": 278.453,
- "Actual Total Time": 278.453,
+ "Actual Startup Time": 210.478,
+ "Actual Total Time": 210.478,
"Actual Rows": 0,
"Actual Loops": 1,
- "Shared Hit Blocks": 29735,
- "Shared Read Blocks": 87,
+ "Shared Hit Blocks": 29737,
+ "Shared Read Blocks": 88,
"Shared Dirtied Blocks": 85,
"Shared Written Blocks": 0,
"Local Hit Blocks": 0,
"Local Written Blocks": 0,
"Temp Read Blocks": 0,
"Temp Written Blocks": 0,
- "I/O Read Time": 0.000,
+ "I/O Read Time": 0.260,
"I/O Write Time": 0.000,
"Plans": [
{
"Total Cost": 10.00,
"Plan Rows": 1000,
"Plan Width": 4,
- "Actual Startup Time": 3.470,
- "Actual Total Time": 9.319,
+ "Actual Startup Time": 1.689,
+ "Actual Total Time": 7.253,
"Actual Rows": 10001,
"Actual Loops": 1,
"Output": ["a.a", "NULL::integer", "NULL::text"],
}
]
},
- "Planning Time": 0.072,
+ "Planning Time": 0.049,
"Triggers": [
{
"Trigger Name": "tt1_trig_1",
"Relation": "tt1",
- "Time": 100.983,
+ "Time": 71.597,
"Calls": 10001
},
{
"Trigger Name": "tt1_trig_2",
"Relation": "tt1",
- "Time": 85.683,
+ "Time": 62.334,
"Calls": 10001
}
],
- "Execution Time": 279.083
+ "Execution Time": 210.989
}'),
(2, '###### Plan 2: Update, Trigger',
'{
"Schema": "public",
"Alias": "tt1",
"Startup Cost": 0.00,
- "Total Cost": 134.75,
- "Plan Rows": 6380,
+ "Total Cost": 137.50,
+ "Plan Rows": 6600,
"Plan Width": 46,
- "Actual Startup Time": 340.377,
- "Actual Total Time": 340.377,
+ "Actual Startup Time": 241.750,
+ "Actual Total Time": 241.750,
"Actual Rows": 0,
"Actual Loops": 1,
"Shared Hit Blocks": 50276,
"Schema": "public",
"Alias": "tt1",
"Startup Cost": 0.00,
- "Total Cost": 134.75,
- "Plan Rows": 6380,
+ "Total Cost": 137.50,
+ "Plan Rows": 6600,
"Plan Width": 46,
- "Actual Startup Time": 0.022,
- "Actual Total Time": 10.544,
+ "Actual Startup Time": 0.019,
+ "Actual Total Time": 9.455,
"Actual Rows": 10001,
"Actual Loops": 1,
"Output": ["(a + 1)", "b", "c", "ctid"],
}
]
},
- "Planning Time": 0.109,
+ "Planning Time": 0.152,
"Triggers": [
{
"Trigger Name": "tt1_trig_1",
"Relation": "tt1",
- "Time": 106.386,
+ "Time": 72.650,
"Calls": 10001
},
{
"Trigger Name": "tt1_trig_2",
"Relation": "tt1",
- "Time": 88.764,
+ "Time": 57.490,
"Calls": 10001
}
],
- "Execution Time": 340.407
+ "Execution Time": 241.978
}'),
(3, '###### Plan 3: Delete',
'{
"Schema": "public",
"Alias": "tt1",
"Startup Cost": 0.00,
- "Total Cost": 298.66,
- "Plan Rows": 63,
+ "Total Cost": 305.20,
+ "Plan Rows": 65,
"Plan Width": 6,
- "Actual Startup Time": 13.983,
- "Actual Total Time": 13.983,
+ "Actual Startup Time": 6.298,
+ "Actual Total Time": 6.298,
"Actual Rows": 0,
"Actual Loops": 1,
"Shared Hit Blocks": 1109,
"Schema": "public",
"Alias": "tt1",
"Startup Cost": 0.00,
- "Total Cost": 298.66,
- "Plan Rows": 63,
+ "Total Cost": 305.20,
+ "Plan Rows": 65,
"Plan Width": 6,
- "Actual Startup Time": 3.535,
- "Actual Total Time": 11.047,
+ "Actual Startup Time": 1.408,
+ "Actual Total Time": 5.116,
"Actual Rows": 1000,
"Actual Loops": 1,
"Output": ["ctid"],
}
]
},
- "Planning Time": 0.147,
+ "Planning Time": 0.165,
"Triggers": [
],
- "Execution Time": 14.024
+ "Execution Time": 6.503
}'),
(4, '###### Plan 4: Result, Append Seq Scan',
'{
"Total Cost": 418.02,
"Plan Rows": 20002,
"Plan Width": 8,
- "Actual Startup Time": 2.484,
- "Actual Total Time": 16.162,
+ "Actual Startup Time": 1.913,
+ "Actual Total Time": 27.382,
"Actual Rows": 20002,
"Actual Loops": 1,
"Output": ["((tt1.a + 1))", "(3)", "1"],
"Total Cost": 418.02,
"Plan Rows": 20002,
"Plan Width": 8,
- "Actual Startup Time": 2.483,
- "Actual Total Time": 11.347,
+ "Actual Startup Time": 1.911,
+ "Actual Total Time": 18.649,
"Actual Rows": 20002,
"Actual Loops": 1,
"Shared Hit Blocks": 218,
"Total Cost": 263.01,
"Plan Rows": 10001,
"Plan Width": 8,
- "Actual Startup Time": 2.482,
- "Actual Total Time": 6.131,
+ "Actual Startup Time": 1.910,
+ "Actual Total Time": 8.458,
"Actual Rows": 10001,
"Actual Loops": 1,
"Output": ["(tt1.a + 1)", "3"],
"Total Cost": 155.01,
"Plan Rows": 10001,
"Plan Width": 8,
- "Actual Startup Time": 0.006,
- "Actual Total Time": 2.478,
+ "Actual Startup Time": 0.013,
+ "Actual Total Time": 4.940,
"Actual Rows": 10001,
"Actual Loops": 1,
"Output": ["tt2.a", "4"],
}
]
},
- "Planning Time": 0.470,
+ "Planning Time": 0.409,
"Triggers": [
],
- "Execution Time": 17.849
+ "Execution Time": 31.264
}'),
(5, '###### Plan 5: Index scan (forward) ANY, array in expr, escape',
E'{
"Total Cost": 21.21,
"Plan Rows": 4,
"Plan Width": 12,
- "Actual Startup Time": 0.006,
- "Actual Total Time": 0.023,
+ "Actual Startup Time": 0.010,
+ "Actual Total Time": 0.043,
"Actual Rows": 4,
"Actual Loops": 1,
"Output": ["a", "b", "c"],
"Index Cond": "(\\"x\\"\\"y\\".a = ANY (\'{50,120,300,500}\'::integer[]))",
"Rows Removed by Index Recheck": 0,
- "Shared Hit Blocks": 20,
+ "Shared Hit Blocks": 24,
"Shared Read Blocks": 0,
"Shared Dirtied Blocks": 0,
"Shared Written Blocks": 0,
"I/O Read Time": 0.000,
"I/O Write Time": 0.000
},
- "Planning Time": 0.088,
+ "Planning Time": 0.129,
"Triggers": [
],
- "Execution Time": 0.061
+ "Execution Time": 0.316
}'),
-(6, '###### Plan 6: Index scan (backward), MergeJoin, Sort, quichsort, alias',
+(6, '###### Plan 6: Index scan (backward), MergeJoin, Sort, quicksort, alias',
'{
"Plan": {
"Node Type": "Limit",
"Total Cost": 820.79,
"Plan Rows": 10,
"Plan Width": 12,
- "Actual Startup Time": 10.948,
- "Actual Total Time": 10.948,
+ "Actual Startup Time": 20.508,
+ "Actual Total Time": 20.508,
"Actual Rows": 0,
"Actual Loops": 1,
"Output": ["x.b", "x.c", "x.a"],
"Total Cost": 1854.80,
"Plan Rows": 10001,
"Plan Width": 12,
- "Actual Startup Time": 10.948,
- "Actual Total Time": 10.948,
+ "Actual Startup Time": 20.506,
+ "Actual Total Time": 20.506,
"Actual Rows": 0,
"Actual Loops": 1,
"Output": ["x.b", "x.c", "x.a"],
"Total Cost": 760.30,
"Plan Rows": 10001,
"Plan Width": 12,
- "Actual Startup Time": 0.015,
- "Actual Total Time": 0.015,
+ "Actual Startup Time": 0.027,
+ "Actual Total Time": 0.027,
"Actual Rows": 1,
"Actual Loops": 1,
"Output": ["x.a", "x.b", "x.c"],
"Total Cost": 844.47,
"Plan Rows": 10001,
"Plan Width": 4,
- "Actual Startup Time": 8.449,
- "Actual Total Time": 9.138,
+ "Actual Startup Time": 16.125,
+ "Actual Total Time": 17.303,
"Actual Rows": 10001,
"Actual Loops": 1,
"Output": ["y.b", "(((- y.b) * 3))"],
- "Sort Key": ["(((- y.b) * 3))"],
+ "Sort Key": ["(((- y.b) * 3)) DESC"],
"Sort Method": "quicksort",
- "Sort Space Used": 855,
+ "Sort Space Used": 811,
"Sort Space Type": "Memory",
"Shared Hit Blocks": 55,
"Shared Read Blocks": 0,
"Total Cost": 155.01,
"Plan Rows": 10001,
"Plan Width": 4,
- "Actual Startup Time": 0.008,
- "Actual Total Time": 3.308,
+ "Actual Startup Time": 0.015,
+ "Actual Total Time": 6.452,
"Actual Rows": 10001,
"Actual Loops": 1,
"Output": ["y.b", "((- y.b) * 3)"],
}
]
},
- "Planning Time": 0.214,
+ "Planning Time": 0.348,
"Triggers": [
],
- "Execution Time": 11.162
+ "Execution Time": 21.312
}'),
(7, '###### Plan 7: IndexOnlyScan',
'{
"Total Cost": 8.46,
"Plan Rows": 10,
"Plan Width": 4,
- "Actual Startup Time": 0.016,
- "Actual Total Time": 0.033,
+ "Actual Startup Time": 0.020,
+ "Actual Total Time": 0.052,
"Actual Rows": 10,
"Actual Loops": 1,
"Output": ["a"],
"I/O Read Time": 0.000,
"I/O Write Time": 0.000
},
- "Planning Time": 0.063,
+ "Planning Time": 0.095,
"Triggers": [
],
- "Execution Time": 0.051
+ "Execution Time": 0.277
}'),
(8, '###### Plan 8: Plain Aggregate, CTE, Recursive Union, WorkTable Scan, CTE Scan',
'{
"Total Cost": 3.66,
"Plan Rows": 1,
"Plan Width": 4,
- "Actual Startup Time": 0.034,
- "Actual Total Time": 0.034,
+ "Actual Startup Time": 0.052,
+ "Actual Total Time": 0.052,
"Actual Rows": 1,
"Actual Loops": 1,
"Output": ["sum(cte1.a)"],
"Plan Rows": 31,
"Plan Width": 4,
"Actual Startup Time": 0.002,
- "Actual Total Time": 0.023,
+ "Actual Total Time": 0.031,
"Actual Rows": 10,
"Actual Loops": 1,
"Shared Hit Blocks": 0,
"Total Cost": 0.01,
"Plan Rows": 1,
"Plan Width": 0,
- "Actual Startup Time": 0.000,
- "Actual Total Time": 0.000,
+ "Actual Startup Time": 0.001,
+ "Actual Total Time": 0.001,
"Actual Rows": 1,
"Actual Loops": 1,
"Output": ["1"],
"Total Cost": 0.62,
"Plan Rows": 31,
"Plan Width": 4,
- "Actual Startup Time": 0.002,
- "Actual Total Time": 0.028,
+ "Actual Startup Time": 0.004,
+ "Actual Total Time": 0.042,
"Actual Rows": 10,
"Actual Loops": 1,
"Output": ["cte1.a"],
}
]
},
- "Planning Time": 0.077,
+ "Planning Time": 0.137,
"Triggers": [
],
- "Execution Time": 0.075
+ "Execution Time": 0.727
}'),
(9, '###### Plan 9: FunctionScan, Hash/HashJoin, Nested Loop',
'{
"Total Cost": 2.69,
"Plan Rows": 1,
"Plan Width": 64,
- "Actual Startup Time": 0.043,
- "Actual Total Time": 0.049,
- "Actual Rows": 2,
+ "Actual Startup Time": 0.068,
+ "Actual Total Time": 0.070,
+ "Actual Rows": 1,
"Actual Loops": 1,
"Output": ["d.datname"],
- "Shared Hit Blocks": 5,
+ "Shared Hit Blocks": 3,
"Shared Read Blocks": 0,
"Shared Dirtied Blocks": 0,
"Shared Written Blocks": 0,
"Total Cost": 2.41,
"Plan Rows": 1,
"Plan Width": 4,
- "Actual Startup Time": 0.037,
- "Actual Total Time": 0.038,
- "Actual Rows": 2,
+ "Actual Startup Time": 0.057,
+ "Actual Total Time": 0.058,
+ "Actual Rows": 1,
"Actual Loops": 1,
"Output": ["s.datid"],
"Hash Cond": "(s.usesysid = u.oid)",
"Total Cost": 1.00,
"Plan Rows": 100,
"Plan Width": 8,
- "Actual Startup Time": 0.026,
- "Actual Total Time": 0.026,
- "Actual Rows": 2,
+ "Actual Startup Time": 0.040,
+ "Actual Total Time": 0.041,
+ "Actual Rows": 1,
"Actual Loops": 1,
- "Output": ["s.datid", "s.pid", "s.usesysid", "s.application_name", "s.state", "s.query", "s.waiting", "s.xact_start", "s.query_start", "s.backend_start", "s.state_change", "s.client_addr", "s.client_hostname", "s.client_port", "s.backend_xid", "s.backend_xmin"],
+ "Output": ["s.datid", "s.pid", "s.usesysid", "s.application_name", "s.state", "s.query", "s.waiting", "s.xact_start", "s.query_start", "s.backend_start", "s.state_change", "s.client_addr", "s.client_hostname", "s.client_port", "s.backend_xid", "s.backend_xmin", "s.ssl", "s.sslversion", "s.sslcipher", "s.sslbits", "s.sslcompression", "s.sslclientdn"],
"Function Call": "pg_stat_get_activity(NULL::integer)",
"Shared Hit Blocks": 0,
"Shared Read Blocks": 0,
"Total Cost": 1.01,
"Plan Rows": 1,
"Plan Width": 4,
- "Actual Startup Time": 0.004,
- "Actual Total Time": 0.004,
+ "Actual Startup Time": 0.007,
+ "Actual Total Time": 0.007,
"Actual Rows": 1,
"Actual Loops": 1,
"Output": ["u.oid"],
"Hash Buckets": 1024,
+ "Original Hash Buckets": 1024,
"Hash Batches": 1,
"Original Hash Batches": 1,
- "Peak Memory Usage": 1,
+ "Peak Memory Usage": 9,
"Shared Hit Blocks": 1,
"Shared Read Blocks": 0,
"Shared Dirtied Blocks": 0,
"Total Cost": 1.01,
"Plan Rows": 1,
"Plan Width": 4,
- "Actual Startup Time": 0.003,
- "Actual Total Time": 0.003,
+ "Actual Startup Time": 0.004,
+ "Actual Total Time": 0.005,
"Actual Rows": 1,
"Actual Loops": 1,
"Output": ["u.oid"],
"Total Cost": 0.27,
"Plan Rows": 1,
"Plan Width": 68,
- "Actual Startup Time": 0.004,
- "Actual Total Time": 0.005,
+ "Actual Startup Time": 0.007,
+ "Actual Total Time": 0.008,
"Actual Rows": 1,
- "Actual Loops": 2,
+ "Actual Loops": 1,
"Output": ["d.datname", "d.oid"],
"Index Cond": "(d.oid = s.datid)",
"Rows Removed by Index Recheck": 0,
- "Shared Hit Blocks": 4,
+ "Shared Hit Blocks": 2,
"Shared Read Blocks": 0,
"Shared Dirtied Blocks": 0,
"Shared Written Blocks": 0,
}
]
},
- "Planning Time": 0.356,
+ "Planning Time": 0.668,
"Triggers": [
],
- "Execution Time": 0.118
+ "Execution Time": 1.162
}'),
(10, '###### Plan 10: MergeAppend, Values',
E'{
"Total Cost": 985.44,
"Plan Rows": 10004,
"Plan Width": 4,
- "Actual Startup Time": 0.018,
- "Actual Total Time": 19.887,
+ "Actual Startup Time": 0.029,
+ "Actual Total Time": 30.688,
"Actual Rows": 10004,
"Actual Loops": 1,
"Sort Key": ["tt1.a"],
"Total Cost": 760.30,
"Plan Rows": 10001,
"Plan Width": 4,
- "Actual Startup Time": 0.010,
- "Actual Total Time": 17.933,
+ "Actual Startup Time": 0.017,
+ "Actual Total Time": 28.032,
"Actual Rows": 10001,
"Actual Loops": 1,
"Output": ["tt1.a"],
"Total Cost": 0.07,
"Plan Rows": 3,
"Plan Width": 4,
- "Actual Startup Time": 0.007,
- "Actual Total Time": 0.008,
+ "Actual Startup Time": 0.010,
+ "Actual Total Time": 0.010,
"Actual Rows": 3,
"Actual Loops": 1,
"Output": ["\\"*VALUES*\\".column1"],
"Total Cost": 0.04,
"Plan Rows": 3,
"Plan Width": 4,
- "Actual Startup Time": 0.001,
- "Actual Total Time": 0.002,
+ "Actual Startup Time": 0.002,
+ "Actual Total Time": 0.004,
"Actual Rows": 3,
"Actual Loops": 1,
"Output": ["\\"*VALUES*\\".column1"],
}
]
},
- "Planning Time": 0.087,
+ "Planning Time": 0.136,
"Triggers": [
],
- "Execution Time": 20.999
+ "Execution Time": 32.772
}'),
(11, '###### Plan 11: Append, HashAggregate',
'{
"Total Cost": 868.06,
"Plan Rows": 20002,
"Plan Width": 4,
- "Actual Startup Time": 14.097,
- "Actual Total Time": 18.092,
+ "Actual Startup Time": 21.602,
+ "Actual Total Time": 27.370,
"Actual Rows": 20002,
"Actual Loops": 1,
"Output": ["tt1.a"],
"Total Cost": 618.04,
"Plan Rows": 20002,
"Plan Width": 4,
- "Actual Startup Time": 0.093,
- "Actual Total Time": 7.382,
+ "Actual Startup Time": 0.167,
+ "Actual Total Time": 10.785,
"Actual Rows": 20002,
"Actual Loops": 1,
"Shared Hit Blocks": 218,
"Total Cost": 263.01,
"Plan Rows": 10001,
"Plan Width": 4,
- "Actual Startup Time": 0.092,
- "Actual Total Time": 2.370,
+ "Actual Startup Time": 0.167,
+ "Actual Total Time": 3.519,
"Actual Rows": 10001,
"Actual Loops": 1,
"Output": ["tt1.a"],
"Total Cost": 155.01,
"Plan Rows": 10001,
"Plan Width": 4,
- "Actual Startup Time": 0.006,
- "Actual Total Time": 2.367,
+ "Actual Startup Time": 0.010,
+ "Actual Total Time": 3.366,
"Actual Rows": 10001,
"Actual Loops": 1,
"Output": ["tt2.b"],
}
]
},
- "Planning Time": 0.055,
+ "Planning Time": 0.072,
"Triggers": [
],
- "Execution Time": 20.063
+ "Execution Time": 30.173
}'),
(12, '###### Plan 12: GroupAggregate',
'{
"Total Cost": 1242.49,
"Plan Rows": 10001,
"Plan Width": 8,
- "Actual Startup Time": 10.889,
- "Actual Total Time": 20.301,
+ "Actual Startup Time": 13.280,
+ "Actual Total Time": 25.173,
"Actual Rows": 10001,
"Actual Loops": 1,
"Output": ["sum(a)", "b"],
"Local Read Blocks": 0,
"Local Dirtied Blocks": 0,
"Local Written Blocks": 0,
- "Temp Read Blocks": 33,
- "Temp Written Blocks": 33,
+ "Temp Read Blocks": 22,
+ "Temp Written Blocks": 22,
"I/O Read Time": 0.000,
"I/O Write Time": 0.000,
"Plans": [
"Total Cost": 1092.47,
"Plan Rows": 10001,
"Plan Width": 8,
- "Actual Startup Time": 10.886,
- "Actual Total Time": 14.220,
+ "Actual Startup Time": 13.275,
+ "Actual Total Time": 17.306,
"Actual Rows": 10001,
"Actual Loops": 1,
"Output": ["b", "a"],
"Sort Key": ["tt1.b"],
"Sort Method": "external merge",
- "Sort Space Used": 168,
+ "Sort Space Used": 136,
"Sort Space Type": "Disk",
"Shared Hit Blocks": 163,
"Shared Read Blocks": 0,
"Local Read Blocks": 0,
"Local Dirtied Blocks": 0,
"Local Written Blocks": 0,
- "Temp Read Blocks": 33,
- "Temp Written Blocks": 33,
+ "Temp Read Blocks": 22,
+ "Temp Written Blocks": 22,
"I/O Read Time": 0.000,
"I/O Write Time": 0.000,
"Plans": [
"Total Cost": 263.01,
"Plan Rows": 10001,
"Plan Width": 8,
- "Actual Startup Time": 0.114,
- "Actual Total Time": 2.441,
+ "Actual Startup Time": 0.137,
+ "Actual Total Time": 3.119,
"Actual Rows": 10001,
"Actual Loops": 1,
"Output": ["b", "a"],
}
]
},
- "Planning Time": 0.041,
+ "Planning Time": 0.048,
"Triggers": [
],
- "Execution Time": 21.797
+ "Execution Time": 27.082
}'),
(13, '###### Plan 13: Group',
'{
"Total Cost": 1117.47,
"Plan Rows": 10001,
"Plan Width": 4,
- "Actual Startup Time": 10.358,
- "Actual Total Time": 17.790,
+ "Actual Startup Time": 12.006,
+ "Actual Total Time": 20.222,
"Actual Rows": 10001,
"Actual Loops": 1,
"Output": ["b"],
"Local Read Blocks": 0,
"Local Dirtied Blocks": 0,
"Local Written Blocks": 0,
- "Temp Read Blocks": 25,
- "Temp Written Blocks": 25,
+ "Temp Read Blocks": 22,
+ "Temp Written Blocks": 22,
"I/O Read Time": 0.000,
"I/O Write Time": 0.000,
"Plans": [
"Total Cost": 1092.47,
"Plan Rows": 10001,
"Plan Width": 4,
- "Actual Startup Time": 10.356,
- "Actual Total Time": 13.699,
+ "Actual Startup Time": 12.005,
+ "Actual Total Time": 15.570,
"Actual Rows": 10001,
"Actual Loops": 1,
"Output": ["b"],
"Sort Key": ["tt1.b"],
"Sort Method": "external merge",
- "Sort Space Used": 120,
+ "Sort Space Used": 136,
"Sort Space Type": "Disk",
"Shared Hit Blocks": 163,
"Shared Read Blocks": 0,
"Local Read Blocks": 0,
"Local Dirtied Blocks": 0,
"Local Written Blocks": 0,
- "Temp Read Blocks": 25,
- "Temp Written Blocks": 25,
+ "Temp Read Blocks": 22,
+ "Temp Written Blocks": 22,
"I/O Read Time": 0.000,
"I/O Write Time": 0.000,
"Plans": [
"Total Cost": 263.01,
"Plan Rows": 10001,
"Plan Width": 4,
- "Actual Startup Time": 0.092,
- "Actual Total Time": 2.298,
+ "Actual Startup Time": 0.134,
+ "Actual Total Time": 2.915,
"Actual Rows": 10001,
"Actual Loops": 1,
"Output": ["b"],
}
]
},
- "Planning Time": 0.032,
+ "Planning Time": 0.037,
"Triggers": [
],
- "Execution Time": 18.628
+ "Execution Time": 21.590
}'),
(14, '###### Plan 14: SetOp intersect, SbuqueryScan',
E'{
"Total Cost": 1357.51,
"Plan Rows": 10001,
"Plan Width": 4,
- "Actual Startup Time": 17.468,
- "Actual Total Time": 17.468,
+ "Actual Startup Time": 20.706,
+ "Actual Total Time": 20.706,
"Actual Rows": 0,
"Actual Loops": 1,
"Output": ["\\"*SELECT* 1\\".a", "(0)"],
"Total Cost": 668.04,
"Plan Rows": 10001,
"Plan Width": 4,
- "Actual Startup Time": 17.465,
- "Actual Total Time": 17.465,
+ "Actual Startup Time": 20.703,
+ "Actual Total Time": 20.703,
"Actual Rows": 0,
"Actual Loops": 1,
"Output": ["\\"*SELECT* 1\\".a", "(0)"],
"Total Cost": 618.04,
"Plan Rows": 20002,
"Plan Width": 4,
- "Actual Startup Time": 0.095,
- "Actual Total Time": 11.726,
+ "Actual Startup Time": 0.125,
+ "Actual Total Time": 13.961,
"Actual Rows": 20002,
"Actual Loops": 1,
"Shared Hit Blocks": 218,
"Total Cost": 363.02,
"Plan Rows": 10001,
"Plan Width": 4,
- "Actual Startup Time": 0.095,
- "Actual Total Time": 4.614,
+ "Actual Startup Time": 0.125,
+ "Actual Total Time": 5.660,
"Actual Rows": 10001,
"Actual Loops": 1,
"Output": ["\\"*SELECT* 1\\".a", "0"],
"Total Cost": 263.01,
"Plan Rows": 10001,
"Plan Width": 4,
- "Actual Startup Time": 0.094,
- "Actual Total Time": 2.368,
+ "Actual Startup Time": 0.120,
+ "Actual Total Time": 2.671,
"Actual Rows": 10001,
"Actual Loops": 1,
"Output": ["tt1.a"],
"Plan Rows": 10001,
"Plan Width": 4,
"Actual Startup Time": 0.007,
- "Actual Total Time": 4.576,
+ "Actual Total Time": 5.275,
"Actual Rows": 10001,
"Actual Loops": 1,
"Output": ["\\"*SELECT* 2\\".b", "1"],
"Total Cost": 155.01,
"Plan Rows": 10001,
"Plan Width": 4,
- "Actual Startup Time": 0.006,
- "Actual Total Time": 2.340,
+ "Actual Startup Time": 0.007,
+ "Actual Total Time": 2.600,
"Actual Rows": 10001,
"Actual Loops": 1,
"Output": ["tt2.b"],
}
]
},
- "Planning Time": 0.061,
+ "Planning Time": 0.067,
"Triggers": [
],
- "Execution Time": 17.700
+ "Execution Time": 21.351
}'),
(15, '###### Plan 15: Sorted SetOp, Sort on Disk',
E'{
"Total Cost": 2423.48,
"Plan Rows": 10001,
"Plan Width": 4,
- "Actual Startup Time": 44.652,
- "Actual Total Time": 44.652,
+ "Actual Startup Time": 44.251,
+ "Actual Total Time": 44.251,
"Actual Rows": 0,
"Actual Loops": 1,
"Output": ["\\"*SELECT* 1\\".a", "(0)"],
"Local Read Blocks": 0,
"Local Dirtied Blocks": 0,
"Local Written Blocks": 0,
- "Temp Read Blocks": 77,
- "Temp Written Blocks": 77,
+ "Temp Read Blocks": 70,
+ "Temp Written Blocks": 70,
"I/O Read Time": 0.000,
"I/O Write Time": 0.000,
"Plans": [
"Total Cost": 2373.47,
"Plan Rows": 20002,
"Plan Width": 4,
- "Actual Startup Time": 32.559,
- "Actual Total Time": 38.440,
+ "Actual Startup Time": 32.669,
+ "Actual Total Time": 38.315,
"Actual Rows": 20002,
"Actual Loops": 1,
"Output": ["\\"*SELECT* 1\\".a", "(0)"],
"Sort Key": ["\\"*SELECT* 1\\".a"],
"Sort Method": "external merge",
- "Sort Space Used": 352,
+ "Sort Space Used": 320,
"Sort Space Type": "Disk",
"Shared Hit Blocks": 218,
"Shared Read Blocks": 0,
"Local Read Blocks": 0,
"Local Dirtied Blocks": 0,
"Local Written Blocks": 0,
- "Temp Read Blocks": 77,
- "Temp Written Blocks": 77,
+ "Temp Read Blocks": 70,
+ "Temp Written Blocks": 70,
"I/O Read Time": 0.000,
"I/O Write Time": 0.000,
"Plans": [
"Total Cost": 618.04,
"Plan Rows": 20002,
"Plan Width": 4,
- "Actual Startup Time": 0.095,
- "Actual Total Time": 12.510,
+ "Actual Startup Time": 0.117,
+ "Actual Total Time": 12.979,
"Actual Rows": 20002,
"Actual Loops": 1,
"Shared Hit Blocks": 218,
"Total Cost": 363.02,
"Plan Rows": 10001,
"Plan Width": 4,
- "Actual Startup Time": 0.095,
- "Actual Total Time": 5.112,
+ "Actual Startup Time": 0.117,
+ "Actual Total Time": 5.283,
"Actual Rows": 10001,
"Actual Loops": 1,
"Output": ["\\"*SELECT* 1\\".a", "0"],
"Total Cost": 263.01,
"Plan Rows": 10001,
"Plan Width": 4,
- "Actual Startup Time": 0.095,
- "Actual Total Time": 2.550,
+ "Actual Startup Time": 0.116,
+ "Actual Total Time": 2.577,
"Actual Rows": 10001,
"Actual Loops": 1,
"Output": ["tt1.a"],
"Total Cost": 255.02,
"Plan Rows": 10001,
"Plan Width": 4,
- "Actual Startup Time": 0.006,
- "Actual Total Time": 4.729,
+ "Actual Startup Time": 0.007,
+ "Actual Total Time": 4.910,
"Actual Rows": 10001,
"Actual Loops": 1,
"Output": ["\\"*SELECT* 2\\".b", "1"],
"Plan Rows": 10001,
"Plan Width": 4,
"Actual Startup Time": 0.006,
- "Actual Total Time": 2.414,
+ "Actual Total Time": 2.426,
"Actual Rows": 10001,
"Actual Loops": 1,
"Output": ["tt2.b"],
}
]
},
- "Planning Time": 0.062,
+ "Planning Time": 0.063,
"Triggers": [
],
- "Execution Time": 44.785
+ "Execution Time": 44.861
}'),
(16, '###### Plan 16: HashSetOp intersect All, SubqueryScan',
E'{
"Total Cost": 1357.51,
"Plan Rows": 10001,
"Plan Width": 4,
- "Actual Startup Time": 18.390,
- "Actual Total Time": 18.390,
+ "Actual Startup Time": 16.635,
+ "Actual Total Time": 16.635,
"Actual Rows": 0,
"Actual Loops": 1,
"Output": ["\\"*SELECT* 1\\".a", "(0)"],
"Total Cost": 668.04,
"Plan Rows": 10001,
"Plan Width": 4,
- "Actual Startup Time": 18.387,
- "Actual Total Time": 18.387,
+ "Actual Startup Time": 16.632,
+ "Actual Total Time": 16.632,
"Actual Rows": 0,
"Actual Loops": 1,
"Output": ["\\"*SELECT* 1\\".a", "(0)"],
"Total Cost": 618.04,
"Plan Rows": 20002,
"Plan Width": 4,
- "Actual Startup Time": 0.096,
- "Actual Total Time": 12.322,
+ "Actual Startup Time": 0.100,
+ "Actual Total Time": 11.135,
"Actual Rows": 20002,
"Actual Loops": 1,
"Shared Hit Blocks": 218,
"Total Cost": 363.02,
"Plan Rows": 10001,
"Plan Width": 4,
- "Actual Startup Time": 0.095,
- "Actual Total Time": 4.829,
+ "Actual Startup Time": 0.100,
+ "Actual Total Time": 4.444,
"Actual Rows": 10001,
"Actual Loops": 1,
"Output": ["\\"*SELECT* 1\\".a", "0"],
"Total Cost": 263.01,
"Plan Rows": 10001,
"Plan Width": 4,
- "Actual Startup Time": 0.095,
- "Actual Total Time": 2.460,
+ "Actual Startup Time": 0.099,
+ "Actual Total Time": 2.122,
"Actual Rows": 10001,
"Actual Loops": 1,
"Output": ["tt1.a"],
"Total Cost": 255.02,
"Plan Rows": 10001,
"Plan Width": 4,
- "Actual Startup Time": 0.007,
- "Actual Total Time": 4.660,
+ "Actual Startup Time": 0.006,
+ "Actual Total Time": 4.310,
"Actual Rows": 10001,
"Actual Loops": 1,
"Output": ["\\"*SELECT* 2\\".b", "1"],
"Total Cost": 155.01,
"Plan Rows": 10001,
"Plan Width": 4,
- "Actual Startup Time": 0.007,
- "Actual Total Time": 2.402,
+ "Actual Startup Time": 0.006,
+ "Actual Total Time": 2.100,
"Actual Rows": 10001,
"Actual Loops": 1,
"Output": ["tt2.b"],
}
]
},
- "Planning Time": 0.061,
+ "Planning Time": 0.054,
"Triggers": [
],
- "Execution Time": 18.626
+ "Execution Time": 17.161
}'),
(17, '###### Plan 17: HashSetOp except, SubqueryScan',
E'{
"Total Cost": 1357.51,
"Plan Rows": 10001,
"Plan Width": 4,
- "Actual Startup Time": 24.448,
- "Actual Total Time": 25.233,
+ "Actual Startup Time": 21.220,
+ "Actual Total Time": 21.898,
"Actual Rows": 10001,
"Actual Loops": 1,
"Output": ["\\"*SELECT* 1\\".a", "(0)"],
"Sort Key": ["\\"*SELECT* 1\\".a"],
"Sort Method": "quicksort",
- "Sort Space Used": 855,
+ "Sort Space Used": 811,
"Sort Space Type": "Memory",
"Shared Hit Blocks": 218,
"Shared Read Blocks": 0,
"Total Cost": 668.04,
"Plan Rows": 10001,
"Plan Width": 4,
- "Actual Startup Time": 18.989,
- "Actual Total Time": 20.104,
+ "Actual Startup Time": 16.219,
+ "Actual Total Time": 17.188,
"Actual Rows": 10001,
"Actual Loops": 1,
"Output": ["\\"*SELECT* 1\\".a", "(0)"],
"Total Cost": 618.04,
"Plan Rows": 20002,
"Plan Width": 4,
- "Actual Startup Time": 0.095,
- "Actual Total Time": 12.996,
+ "Actual Startup Time": 0.105,
+ "Actual Total Time": 11.155,
"Actual Rows": 20002,
"Actual Loops": 1,
"Shared Hit Blocks": 218,
"Total Cost": 363.02,
"Plan Rows": 10001,
"Plan Width": 4,
- "Actual Startup Time": 0.094,
- "Actual Total Time": 5.579,
+ "Actual Startup Time": 0.105,
+ "Actual Total Time": 4.451,
"Actual Rows": 10001,
"Actual Loops": 1,
"Output": ["\\"*SELECT* 1\\".a", "0"],
"Total Cost": 263.01,
"Plan Rows": 10001,
"Plan Width": 4,
- "Actual Startup Time": 0.093,
- "Actual Total Time": 2.839,
+ "Actual Startup Time": 0.104,
+ "Actual Total Time": 2.108,
"Actual Rows": 10001,
"Actual Loops": 1,
"Output": ["tt1.a"],
"Total Cost": 255.02,
"Plan Rows": 10001,
"Plan Width": 4,
- "Actual Startup Time": 0.007,
- "Actual Total Time": 4.559,
+ "Actual Startup Time": 0.006,
+ "Actual Total Time": 4.298,
"Actual Rows": 10001,
"Actual Loops": 1,
"Output": ["\\"*SELECT* 2\\".b", "1"],
"Plan Rows": 10001,
"Plan Width": 4,
"Actual Startup Time": 0.006,
- "Actual Total Time": 2.353,
+ "Actual Total Time": 2.079,
"Actual Rows": 10001,
"Actual Loops": 1,
"Output": ["tt2.b"],
}
]
},
- "Planning Time": 0.060,
+ "Planning Time": 0.053,
"Triggers": [
],
- "Execution Time": 27.190
+ "Execution Time": 23.793
}'),
(18, '###### Plan 18: HashSetOp except all, SubqueryScan',
E'{
"Total Cost": 1357.51,
"Plan Rows": 10001,
"Plan Width": 4,
- "Actual Startup Time": 24.246,
- "Actual Total Time": 25.047,
+ "Actual Startup Time": 21.153,
+ "Actual Total Time": 21.804,
"Actual Rows": 10001,
"Actual Loops": 1,
"Output": ["\\"*SELECT* 1\\".a", "(0)"],
"Sort Key": ["\\"*SELECT* 1\\".a"],
"Sort Method": "quicksort",
- "Sort Space Used": 855,
+ "Sort Space Used": 811,
"Sort Space Type": "Memory",
"Shared Hit Blocks": 218,
"Shared Read Blocks": 0,
"Total Cost": 668.04,
"Plan Rows": 10001,
"Plan Width": 4,
- "Actual Startup Time": 18.981,
- "Actual Total Time": 20.120,
+ "Actual Startup Time": 16.271,
+ "Actual Total Time": 17.182,
"Actual Rows": 10001,
"Actual Loops": 1,
"Output": ["\\"*SELECT* 1\\".a", "(0)"],
"Total Cost": 618.04,
"Plan Rows": 20002,
"Plan Width": 4,
- "Actual Startup Time": 0.117,
- "Actual Total Time": 12.994,
+ "Actual Startup Time": 0.102,
+ "Actual Total Time": 11.170,
"Actual Rows": 20002,
"Actual Loops": 1,
"Shared Hit Blocks": 218,
"Total Cost": 363.02,
"Plan Rows": 10001,
"Plan Width": 4,
- "Actual Startup Time": 0.117,
- "Actual Total Time": 5.606,
+ "Actual Startup Time": 0.102,
+ "Actual Total Time": 4.446,
"Actual Rows": 10001,
"Actual Loops": 1,
"Output": ["\\"*SELECT* 1\\".a", "0"],
"Total Cost": 263.01,
"Plan Rows": 10001,
"Plan Width": 4,
- "Actual Startup Time": 0.116,
- "Actual Total Time": 2.894,
+ "Actual Startup Time": 0.100,
+ "Actual Total Time": 2.136,
"Actual Rows": 10001,
"Actual Loops": 1,
"Output": ["tt1.a"],
"Total Cost": 255.02,
"Plan Rows": 10001,
"Plan Width": 4,
- "Actual Startup Time": 0.007,
- "Actual Total Time": 4.520,
+ "Actual Startup Time": 0.006,
+ "Actual Total Time": 4.259,
"Actual Rows": 10001,
"Actual Loops": 1,
"Output": ["\\"*SELECT* 2\\".b", "1"],
"Plan Rows": 10001,
"Plan Width": 4,
"Actual Startup Time": 0.006,
- "Actual Total Time": 2.336,
+ "Actual Total Time": 2.117,
"Actual Rows": 10001,
"Actual Loops": 1,
"Output": ["tt2.b"],
}
]
},
- "Planning Time": 0.079,
+ "Planning Time": 0.054,
"Triggers": [
],
- "Execution Time": 26.975
+ "Execution Time": 23.716
}'),
(19, '###### Plan 19: merge LEFT join',
'{
"Node Type": "Merge Join",
"Join Type": "Left",
"Startup Cost": 0.71,
- "Total Cost": 4245.45,
- "Plan Rows": 33453,
+ "Total Cost": 4300.43,
+ "Plan Rows": 33599,
"Plan Width": 4,
- "Actual Startup Time": 0.034,
- "Actual Total Time": 56.948,
+ "Actual Startup Time": 0.029,
+ "Actual Total Time": 51.083,
"Actual Rows": 60003,
"Actual Loops": 1,
"Output": ["x.b"],
"Merge Cond": "(x.a = y.a)",
- "Shared Hit Blocks": 20930,
+ "Shared Hit Blocks": 20944,
"Shared Read Blocks": 0,
"Shared Dirtied Blocks": 0,
"Shared Written Blocks": 0,
"Total Cost": 760.30,
"Plan Rows": 10001,
"Plan Width": 8,
- "Actual Startup Time": 0.008,
- "Actual Total Time": 4.032,
+ "Actual Startup Time": 0.006,
+ "Actual Total Time": 3.337,
"Actual Rows": 10001,
"Actual Loops": 1,
"Output": ["x.a", "x.b", "x.c"],
"Schema": "public",
"Alias": "y",
"Startup Cost": 0.42,
- "Total Cost": 9034.11,
+ "Total Cost": 9040.38,
"Plan Rows": 180003,
"Plan Width": 4,
- "Actual Startup Time": 0.022,
- "Actual Total Time": 29.832,
+ "Actual Startup Time": 0.019,
+ "Actual Total Time": 26.518,
"Actual Rows": 60004,
"Actual Loops": 1,
"Output": ["y.a"],
"Heap Fetches": 60004,
- "Shared Hit Blocks": 20765,
+ "Shared Hit Blocks": 20779,
"Shared Read Blocks": 0,
"Shared Dirtied Blocks": 0,
"Shared Written Blocks": 0,
}
]
},
- "Planning Time": 0.390,
+ "Planning Time": 0.288,
"Triggers": [
],
- "Execution Time": 62.450
+ "Execution Time": 56.031
}'),
(20, '###### Plan 20: hash FULL join',
'{
"Node Type": "Hash Join",
"Join Type": "Full",
"Startup Cost": 280.02,
- "Total Cost": 793.06,
+ "Total Cost": 680.55,
"Plan Rows": 10001,
"Plan Width": 4,
- "Actual Startup Time": 11.957,
- "Actual Total Time": 21.814,
+ "Actual Startup Time": 4.774,
+ "Actual Total Time": 10.603,
"Actual Rows": 17001,
"Actual Loops": 1,
"Output": ["x.b"],
"Total Cost": 263.01,
"Plan Rows": 10001,
"Plan Width": 8,
- "Actual Startup Time": 0.205,
- "Actual Total Time": 2.212,
+ "Actual Startup Time": 0.115,
+ "Actual Total Time": 1.414,
"Actual Rows": 10001,
"Actual Loops": 1,
"Output": ["x.a", "x.b", "x.c"],
"Total Cost": 155.01,
"Plan Rows": 10001,
"Plan Width": 4,
- "Actual Startup Time": 11.741,
- "Actual Total Time": 11.741,
+ "Actual Startup Time": 4.644,
+ "Actual Total Time": 4.644,
"Actual Rows": 10001,
"Actual Loops": 1,
"Output": ["y.a"],
- "Hash Buckets": 1024,
+ "Hash Buckets": 16384,
+ "Original Hash Buckets": 16384,
"Hash Batches": 1,
"Original Hash Batches": 1,
- "Peak Memory Usage": 352,
+ "Peak Memory Usage": 480,
"Shared Hit Blocks": 55,
"Shared Read Blocks": 0,
"Shared Dirtied Blocks": 0,
"Total Cost": 155.01,
"Plan Rows": 10001,
"Plan Width": 4,
- "Actual Startup Time": 0.018,
- "Actual Total Time": 5.489,
+ "Actual Startup Time": 0.008,
+ "Actual Total Time": 2.078,
"Actual Rows": 10001,
"Actual Loops": 1,
"Output": ["y.a"],
}
]
},
- "Planning Time": 0.194,
+ "Planning Time": 0.095,
"Triggers": [
],
- "Execution Time": 23.606
+ "Execution Time": 12.117
}'),
(21, '###### Plan 21: hash SEMI join',
'{
"Node Type": "Hash Join",
"Join Type": "Semi",
"Startup Cost": 280.02,
- "Total Cost": 793.06,
+ "Total Cost": 680.55,
"Plan Rows": 10001,
"Plan Width": 12,
- "Actual Startup Time": 10.770,
- "Actual Total Time": 10.770,
+ "Actual Startup Time": 7.910,
+ "Actual Total Time": 7.910,
"Actual Rows": 0,
"Actual Loops": 1,
"Output": ["tt1.a", "tt1.b", "tt1.c"],
"Total Cost": 263.01,
"Plan Rows": 10001,
"Plan Width": 12,
- "Actual Startup Time": 0.091,
- "Actual Total Time": 1.495,
+ "Actual Startup Time": 0.093,
+ "Actual Total Time": 1.237,
"Actual Rows": 10001,
"Actual Loops": 1,
"Output": ["tt1.a", "tt1.b", "tt1.c"],
"Total Cost": 155.01,
"Plan Rows": 10001,
"Plan Width": 4,
- "Actual Startup Time": 5.798,
- "Actual Total Time": 5.798,
+ "Actual Startup Time": 4.703,
+ "Actual Total Time": 4.703,
"Actual Rows": 10001,
"Actual Loops": 1,
"Output": ["tt2.b"],
- "Hash Buckets": 1024,
+ "Hash Buckets": 16384,
+ "Original Hash Buckets": 16384,
"Hash Batches": 1,
"Original Hash Batches": 1,
- "Peak Memory Usage": 352,
+ "Peak Memory Usage": 480,
"Shared Hit Blocks": 55,
"Shared Read Blocks": 0,
"Shared Dirtied Blocks": 0,
"Total Cost": 155.01,
"Plan Rows": 10001,
"Plan Width": 4,
- "Actual Startup Time": 0.007,
- "Actual Total Time": 2.812,
+ "Actual Startup Time": 0.006,
+ "Actual Total Time": 2.134,
"Actual Rows": 10001,
"Actual Loops": 1,
"Output": ["tt2.b"],
}
]
},
- "Planning Time": 0.182,
+ "Planning Time": 0.157,
"Triggers": [
],
- "Execution Time": 10.988
+ "Execution Time": 8.236
}'),
(22, '###### Plan 22: Hash Anti Join',
'{
"Node Type": "Hash Join",
"Join Type": "Anti",
"Startup Cost": 280.02,
- "Total Cost": 693.05,
+ "Total Cost": 580.54,
"Plan Rows": 1,
"Plan Width": 12,
- "Actual Startup Time": 5.985,
- "Actual Total Time": 12.403,
+ "Actual Startup Time": 4.918,
+ "Actual Total Time": 9.632,
"Actual Rows": 10001,
"Actual Loops": 1,
"Output": ["tt1.a", "tt1.b", "tt1.c"],
"Total Cost": 263.01,
"Plan Rows": 10001,
"Plan Width": 12,
- "Actual Startup Time": 0.095,
- "Actual Total Time": 1.543,
+ "Actual Startup Time": 0.097,
+ "Actual Total Time": 1.312,
"Actual Rows": 10001,
"Actual Loops": 1,
"Output": ["tt1.a", "tt1.b", "tt1.c"],
"Total Cost": 155.01,
"Plan Rows": 10001,
"Plan Width": 4,
- "Actual Startup Time": 5.884,
- "Actual Total Time": 5.884,
+ "Actual Startup Time": 4.812,
+ "Actual Total Time": 4.812,
"Actual Rows": 10001,
"Actual Loops": 1,
"Output": ["tt2.b"],
- "Hash Buckets": 1024,
+ "Hash Buckets": 16384,
+ "Original Hash Buckets": 16384,
"Hash Batches": 1,
"Original Hash Batches": 1,
- "Peak Memory Usage": 352,
+ "Peak Memory Usage": 480,
"Shared Hit Blocks": 55,
"Shared Read Blocks": 0,
"Shared Dirtied Blocks": 0,
"Plan Rows": 10001,
"Plan Width": 4,
"Actual Startup Time": 0.007,
- "Actual Total Time": 2.808,
+ "Actual Total Time": 2.274,
"Actual Rows": 10001,
"Actual Loops": 1,
"Output": ["tt2.b"],
}
]
},
- "Planning Time": 0.133,
+ "Planning Time": 0.110,
"Triggers": [
],
- "Execution Time": 13.415
+ "Execution Time": 10.650
}'),
(23, '###### Plan 23: WindowAgg',
'{
"Total Cost": 1127.49,
"Plan Rows": 10001,
"Plan Width": 4,
- "Actual Startup Time": 5.593,
- "Actual Total Time": 16.541,
+ "Actual Startup Time": 5.164,
+ "Actual Total Time": 14.618,
"Actual Rows": 10001,
"Actual Loops": 1,
"Output": ["first_value(a) OVER (?)", "((a / 10))"],
"Total Cost": 952.47,
"Plan Rows": 10001,
"Plan Width": 4,
- "Actual Startup Time": 5.585,
- "Actual Total Time": 6.517,
+ "Actual Startup Time": 5.157,
+ "Actual Total Time": 6.014,
"Actual Rows": 10001,
"Actual Loops": 1,
"Output": ["((a / 10))", "a"],
"Sort Key": ["((tt1.a / 10))"],
"Sort Method": "quicksort",
- "Sort Space Used": 855,
+ "Sort Space Used": 811,
"Sort Space Type": "Memory",
"Shared Hit Blocks": 163,
"Shared Read Blocks": 0,
"Total Cost": 263.01,
"Plan Rows": 10001,
"Plan Width": 4,
- "Actual Startup Time": 0.096,
- "Actual Total Time": 2.997,
+ "Actual Startup Time": 0.099,
+ "Actual Total Time": 2.822,
"Actual Rows": 10001,
"Actual Loops": 1,
"Output": ["(a / 10)", "a"],
}
]
},
- "Planning Time": 0.051,
+ "Planning Time": 0.046,
"Triggers": [
],
- "Execution Time": 17.892
+ "Execution Time": 15.926
}'),
(24, '###### Plan 24: Unique',
'{
"Total Cost": 785.30,
"Plan Rows": 10001,
"Plan Width": 4,
- "Actual Startup Time": 0.010,
- "Actual Total Time": 7.878,
+ "Actual Startup Time": 0.009,
+ "Actual Total Time": 6.684,
"Actual Rows": 10001,
"Actual Loops": 1,
"Output": ["a"],
"Total Cost": 760.30,
"Plan Rows": 10001,
"Plan Width": 4,
- "Actual Startup Time": 0.010,
- "Actual Total Time": 4.020,
+ "Actual Startup Time": 0.008,
+ "Actual Total Time": 3.517,
"Actual Rows": 10001,
"Actual Loops": 1,
"Output": ["a"],
}
]
},
- "Planning Time": 0.044,
+ "Planning Time": 0.034,
"Triggers": [
],
- "Execution Time": 8.769
+ "Execution Time": 7.610
}'),
(25, '###### Plan 25: PlainAggregate',
'{
"Total Cost": 288.02,
"Plan Rows": 1,
"Plan Width": 4,
- "Actual Startup Time": 3.283,
- "Actual Total Time": 3.283,
+ "Actual Startup Time": 3.056,
+ "Actual Total Time": 3.056,
"Actual Rows": 1,
"Actual Loops": 1,
"Output": ["sum(a)"],
"Total Cost": 263.01,
"Plan Rows": 10001,
"Plan Width": 4,
- "Actual Startup Time": 0.095,
- "Actual Total Time": 1.442,
+ "Actual Startup Time": 0.097,
+ "Actual Total Time": 1.249,
"Actual Rows": 10001,
"Actual Loops": 1,
"Output": ["a", "b", "c"],
}
]
},
- "Planning Time": 0.031,
+ "Planning Time": 0.032,
"Triggers": [
],
- "Execution Time": 3.307
+ "Execution Time": 3.229
}'),
(26, '###### Plan 26: BitmapIndexScan/BitmapHeapScan, BitmapOr, lossy',
- '{
+ E'{
"Plan": {
"Node Type": "Bitmap Heap Scan",
"Relation Name": "tt3",
"Schema": "public",
"Alias": "tt3",
- "Startup Cost": 4243.43,
- "Total Cost": 7466.44,
+ "Startup Cost": 4271.43,
+ "Total Cost": 7494.44,
"Plan Rows": 180001,
"Plan Width": 12,
- "Actual Startup Time": 26.161,
- "Actual Total Time": 65.167,
+ "Actual Startup Time": 23.643,
+ "Actual Total Time": 56.113,
"Actual Rows": 180000,
"Actual Loops": 1,
"Output": ["a", "b", "c"],
- "Recheck Cond": "(tt3.b > (-99998))",
+ "Recheck Cond": "(tt3.b > \'-99998\'::integer)",
"Rows Removed by Index Recheck": 3,
"Exact Heap Blocks": 558,
"Lossy Heap Blocks": 415,
- "Shared Hit Blocks": 1683,
+ "Shared Hit Blocks": 1690,
"Shared Read Blocks": 0,
"Shared Dirtied Blocks": 0,
"Shared Written Blocks": 0,
"Parent Relationship": "Outer",
"Index Name": "i_tt3_b",
"Startup Cost": 0.00,
- "Total Cost": 4198.43,
+ "Total Cost": 4226.43,
"Plan Rows": 180001,
"Plan Width": 0,
- "Actual Startup Time": 26.049,
- "Actual Total Time": 26.049,
+ "Actual Startup Time": 23.536,
+ "Actual Total Time": 23.536,
"Actual Rows": 180000,
"Actual Loops": 1,
- "Index Cond": "(tt3.b > (-99998))",
- "Shared Hit Blocks": 710,
+ "Index Cond": "(tt3.b > \'-99998\'::integer)",
+ "Shared Hit Blocks": 717,
"Shared Read Blocks": 0,
"Shared Dirtied Blocks": 0,
"Shared Written Blocks": 0,
}
]
},
- "Planning Time": 0.102,
+ "Planning Time": 0.090,
"Triggers": [
],
- "Execution Time": 79.090
+ "Execution Time": 69.513
}'),
(27, '###### Plan 27: Join Filter',
'{
"Total Cost": 21.52,
"Plan Rows": 100,
"Plan Width": 12,
- "Actual Startup Time": 5.323,
- "Actual Total Time": 5.448,
+ "Actual Startup Time": 4.752,
+ "Actual Total Time": 4.861,
"Actual Rows": 100,
"Actual Loops": 1,
"Output": ["tt2.a", "tt2.b", "tt2.c"],
"Total Cost": 43048282.11,
"Plan Rows": 200023334,
"Plan Width": 12,
- "Actual Startup Time": 5.323,
- "Actual Total Time": 5.435,
+ "Actual Startup Time": 4.751,
+ "Actual Total Time": 4.848,
"Actual Rows": 100,
"Actual Loops": 1,
"Output": ["tt2.a", "tt2.b", "tt2.c"],
"Total Cost": 155.01,
"Plan Rows": 10001,
"Plan Width": 12,
- "Actual Startup Time": 0.009,
- "Actual Total Time": 0.009,
+ "Actual Startup Time": 0.013,
+ "Actual Total Time": 0.013,
"Actual Rows": 1,
"Actual Loops": 1,
"Output": ["tt2.a", "tt2.b", "tt2.c"],
"Total Cost": 4377.05,
"Plan Rows": 180003,
"Plan Width": 4,
- "Actual Startup Time": 0.009,
- "Actual Total Time": 4.223,
+ "Actual Startup Time": 0.008,
+ "Actual Total Time": 3.712,
"Actual Rows": 7101,
"Actual Loops": 1,
"Output": ["tt3.a"],
"Plan Rows": 180003,
"Plan Width": 4,
"Actual Startup Time": 0.007,
- "Actual Total Time": 1.608,
+ "Actual Total Time": 1.475,
"Actual Rows": 7101,
"Actual Loops": 1,
"Output": ["tt3.a"],
}
]
},
- "Planning Time": 0.165,
+ "Planning Time": 0.153,
"Triggers": [
],
- "Execution Time": 5.553
+ "Execution Time": 5.363
}'),
(28, '###### Plan 28: TidScan',
E'{
"I/O Read Time": 0.000,
"I/O Write Time": 0.000
},
- "Planning Time": 0.068,
+ "Planning Time": 0.058,
"Triggers": [
],
- "Execution Time": 0.017
+ "Execution Time": 0.113
}'),
(29, '###### Plan 29: LockRows',
'{
"Total Cost": 313.51,
"Plan Rows": 50,
"Plan Width": 10,
- "Actual Startup Time": 0.146,
- "Actual Total Time": 5.055,
+ "Actual Startup Time": 0.132,
+ "Actual Total Time": 4.061,
"Actual Rows": 1001,
"Actual Loops": 1,
"Output": ["a", "ctid"],
"Total Cost": 313.01,
"Plan Rows": 50,
"Plan Width": 10,
- "Actual Startup Time": 0.134,
- "Actual Total Time": 3.621,
+ "Actual Startup Time": 0.123,
+ "Actual Total Time": 3.139,
"Actual Rows": 1001,
"Actual Loops": 1,
"Output": ["a", "ctid"],
}
]
},
- "Planning Time": 0.041,
+ "Planning Time": 0.034,
"Triggers": [
],
- "Execution Time": 5.217
+ "Execution Time": 4.378
}'),
(30, '###### Plan 30: Materialize',
'{
"Total Cost": 1150490.52,
"Plan Rows": 5000,
"Plan Width": 12,
- "Actual Startup Time": 5.929,
- "Actual Total Time": 5.929,
+ "Actual Startup Time": 4.470,
+ "Actual Total Time": 4.470,
"Actual Rows": 0,
"Actual Loops": 1,
"Output": ["tt1.a", "tt1.b", "tt1.c"],
"Total Cost": 155.01,
"Plan Rows": 10001,
"Plan Width": 4,
- "Actual Startup Time": 0.008,
- "Actual Total Time": 0.008,
+ "Actual Startup Time": 0.007,
+ "Actual Total Time": 0.007,
"Actual Rows": 1,
"Actual Loops": 1,
"Output": ["tt2.b"],
}
]
},
- "Planning Time": 0.102,
+ "Planning Time": 0.047,
+ "Triggers": [
+ ],
+ "Execution Time": 4.715
+}'),
+(31, '###### Plan 31: Update on partitioned tables',
+ '{
+ "Plan": {
+ "Node Type": "ModifyTable",
+ "Operation": "Update",
+ "Relation Name": "p",
+ "Schema": "public",
+ "Alias": "p",
+ "Startup Cost": 0.00,
+ "Total Cost": 3691.07,
+ "Plan Rows": 200006,
+ "Plan Width": 18,
+ "Actual Startup Time": 2976.258,
+ "Actual Total Time": 2976.258,
+ "Actual Rows": 0,
+ "Actual Loops": 1,
+ "Target Tables": [
+ {
+ "Relation Name": "p",
+ "Schema": "public",
+ "Alias": "p"
+ },
+ {
+ "Relation Name": "tt1",
+ "Schema": "public",
+ "Alias": "tt1"
+ },
+ {
+ "Relation Name": "tt2",
+ "Schema": "public",
+ "Alias": "tt2"
+ },
+ {
+ "Relation Name": "tt3",
+ "Schema": "public",
+ "Alias": "tt3"
+ }
+ ],
+ "Shared Hit Blocks": 1566205,
+ "Shared Read Blocks": 2648,
+ "Shared Dirtied Blocks": 2648,
+ "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,
+ "I/O Read Time": 0.000,
+ "I/O Write Time": 0.000,
+ "Plans": [
+ {
+ "Node Type": "Seq Scan",
+ "Parent Relationship": "Member",
+ "Relation Name": "p",
+ "Schema": "public",
+ "Alias": "p",
+ "Startup Cost": 0.00,
+ "Total Cost": 0.00,
+ "Plan Rows": 1,
+ "Plan Width": 46,
+ "Actual Startup Time": 0.000,
+ "Actual Total Time": 0.000,
+ "Actual Rows": 0,
+ "Actual Loops": 1,
+ "Output": ["p.a", "(p.b + 1)", "p.c", "p.ctid"],
+ "Shared Hit Blocks": 0,
+ "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,
+ "I/O Read Time": 0.000,
+ "I/O Write Time": 0.000
+ },
+ {
+ "Node Type": "Seq Scan",
+ "Parent Relationship": "Member",
+ "Relation Name": "tt1",
+ "Schema": "public",
+ "Alias": "tt1",
+ "Startup Cost": 0.00,
+ "Total Cost": 288.01,
+ "Plan Rows": 10001,
+ "Plan Width": 18,
+ "Actual Startup Time": 0.098,
+ "Actual Total Time": 8.471,
+ "Actual Rows": 10001,
+ "Actual Loops": 1,
+ "Output": ["tt1.a", "(tt1.b + 1)", "tt1.c", "tt1.ctid"],
+ "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,
+ "I/O Read Time": 0.000,
+ "I/O Write Time": 0.000
+ },
+ {
+ "Node Type": "Seq Scan",
+ "Parent Relationship": "Member",
+ "Relation Name": "tt2",
+ "Schema": "public",
+ "Alias": "tt2",
+ "Startup Cost": 0.00,
+ "Total Cost": 180.01,
+ "Plan Rows": 10001,
+ "Plan Width": 18,
+ "Actual Startup Time": 0.010,
+ "Actual Total Time": 5.672,
+ "Actual Rows": 10001,
+ "Actual Loops": 1,
+ "Output": ["tt2.a", "(tt2.b + 1)", "tt2.c", "tt2.ctid"],
+ "Shared Hit Blocks": 55,
+ "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,
+ "I/O Read Time": 0.000,
+ "I/O Write Time": 0.000
+ },
+ {
+ "Node Type": "Seq Scan",
+ "Parent Relationship": "Member",
+ "Relation Name": "tt3",
+ "Schema": "public",
+ "Alias": "tt3",
+ "Startup Cost": 0.00,
+ "Total Cost": 3223.04,
+ "Plan Rows": 180003,
+ "Plan Width": 18,
+ "Actual Startup Time": 0.010,
+ "Actual Total Time": 109.066,
+ "Actual Rows": 180003,
+ "Actual Loops": 1,
+ "Output": ["tt3.a", "(tt3.b + 1)", "tt3.c", "tt3.ctid"],
+ "Shared Hit Blocks": 973,
+ "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,
+ "I/O Read Time": 0.000,
+ "I/O Write Time": 0.000
+ }
+ ]
+ },
+ "Planning Time": 0.153,
+ "Triggers": [
+ {
+ "Trigger Name": "tt1_trig_1",
+ "Relation": "tt1",
+ "Time": 70.532,
+ "Calls": 10001
+ },
+ {
+ "Trigger Name": "tt1_trig_2",
+ "Relation": "tt1",
+ "Time": 56.766,
+ "Calls": 10001
+ }
+ ],
+ "Execution Time": 2976.755
+}'),
+(32, '###### Plan 32: Delete on partitioned tables',
+ '{
+ "Plan": {
+ "Node Type": "ModifyTable",
+ "Operation": "Delete",
+ "Relation Name": "p",
+ "Schema": "public",
+ "Alias": "p",
+ "Startup Cost": 0.00,
+ "Total Cost": 32.81,
+ "Plan Rows": 6,
+ "Plan Width": 6,
+ "Actual Startup Time": 0.257,
+ "Actual Total Time": 0.257,
+ "Actual Rows": 0,
+ "Actual Loops": 1,
+ "Target Tables": [
+ {
+ "Relation Name": "p",
+ "Schema": "public",
+ "Alias": "p"
+ },
+ {
+ "Relation Name": "tt1",
+ "Schema": "public",
+ "Alias": "tt1"
+ },
+ {
+ "Relation Name": "tt2",
+ "Schema": "public",
+ "Alias": "tt2"
+ },
+ {
+ "Relation Name": "tt3",
+ "Schema": "public",
+ "Alias": "tt3"
+ }
+ ],
+ "Shared Hit Blocks": 18,
+ "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,
+ "I/O Read Time": 0.000,
+ "I/O Write Time": 0.000,
+ "Plans": [
+ {
+ "Node Type": "Seq Scan",
+ "Parent Relationship": "Member",
+ "Relation Name": "p",
+ "Schema": "public",
+ "Alias": "p",
+ "Startup Cost": 0.00,
+ "Total Cost": 0.00,
+ "Plan Rows": 1,
+ "Plan Width": 6,
+ "Actual Startup Time": 0.001,
+ "Actual Total Time": 0.001,
+ "Actual Rows": 0,
+ "Actual Loops": 1,
+ "Output": ["p.ctid"],
+ "Filter": "(p.a = 100)",
+ "Rows Removed by Filter": 0,
+ "Shared Hit Blocks": 0,
+ "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,
+ "I/O Read Time": 0.000,
+ "I/O Write Time": 0.000
+ },
+ {
+ "Node Type": "Index Scan",
+ "Parent Relationship": "Member",
+ "Scan Direction": "Forward",
+ "Index Name": "i_tt1",
+ "Relation Name": "tt1",
+ "Schema": "public",
+ "Alias": "tt1",
+ "Startup Cost": 0.29,
+ "Total Cost": 8.30,
+ "Plan Rows": 1,
+ "Plan Width": 6,
+ "Actual Startup Time": 0.070,
+ "Actual Total Time": 0.121,
+ "Actual Rows": 1,
+ "Actual Loops": 1,
+ "Output": ["tt1.ctid"],
+ "Index Cond": "(tt1.a = 100)",
+ "Rows Removed by Index Recheck": 0,
+ "Shared Hit Blocks": 5,
+ "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,
+ "I/O Read Time": 0.000,
+ "I/O Write Time": 0.000
+ },
+ {
+ "Node Type": "Index Scan",
+ "Parent Relationship": "Member",
+ "Scan Direction": "Forward",
+ "Index Name": "i_tt2",
+ "Relation Name": "tt2",
+ "Schema": "public",
+ "Alias": "tt2",
+ "Startup Cost": 0.29,
+ "Total Cost": 8.30,
+ "Plan Rows": 1,
+ "Plan Width": 6,
+ "Actual Startup Time": 0.007,
+ "Actual Total Time": 0.007,
+ "Actual Rows": 0,
+ "Actual Loops": 1,
+ "Output": ["tt2.ctid"],
+ "Index Cond": "(tt2.a = 100)",
+ "Rows Removed by Index Recheck": 0,
+ "Shared Hit Blocks": 2,
+ "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,
+ "I/O Read Time": 0.000,
+ "I/O Write Time": 0.000
+ },
+ {
+ "Node Type": "Index Scan",
+ "Parent Relationship": "Member",
+ "Scan Direction": "Forward",
+ "Index Name": "i_tt3_a",
+ "Relation Name": "tt3",
+ "Schema": "public",
+ "Alias": "tt3",
+ "Startup Cost": 0.42,
+ "Total Cost": 16.20,
+ "Plan Rows": 3,
+ "Plan Width": 6,
+ "Actual Startup Time": 0.013,
+ "Actual Total Time": 0.108,
+ "Actual Rows": 2,
+ "Actual Loops": 1,
+ "Output": ["tt3.ctid"],
+ "Index Cond": "(tt3.a = 100)",
+ "Rows Removed by Index Recheck": 0,
+ "Shared Hit Blocks": 8,
+ "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,
+ "I/O Read Time": 0.000,
+ "I/O Write Time": 0.000
+ }
+ ]
+ },
+ "Planning Time": 0.333,
+ "Triggers": [
+ ],
+ "Execution Time": 1.258
+}'),
+(33, '###### Plan 33: ON CONFLICT',
+ '{
+ "Plan": {
+ "Node Type": "ModifyTable",
+ "Operation": "Insert",
+ "Relation Name": "ct1",
+ "Schema": "public",
+ "Alias": "ct1",
+ "Startup Cost": 0.00,
+ "Total Cost": 0.01,
+ "Plan Rows": 1,
+ "Plan Width": 0,
+ "Actual Startup Time": 0.055,
+ "Actual Total Time": 0.055,
+ "Actual Rows": 0,
+ "Actual Loops": 1,
+ "Conflict Resolution": "UPDATE",
+ "Conflict Arbiter Indexes": ["ct1_a_key"],
+ "Tuples Inserted": 0,
+ "Conflicting Tuples": 1,
+ "Shared Hit Blocks": 4,
+ "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,
+ "I/O Read Time": 0.000,
+ "I/O Write Time": 0.000,
+ "Plans": [
+ {
+ "Node Type": "Result",
+ "Parent Relationship": "Member",
+ "Startup Cost": 0.00,
+ "Total Cost": 0.01,
+ "Plan Rows": 1,
+ "Plan Width": 0,
+ "Actual Startup Time": 0.001,
+ "Actual Total Time": 0.002,
+ "Actual Rows": 1,
+ "Actual Loops": 1,
+ "Output": ["1", "1"],
+ "Shared Hit Blocks": 0,
+ "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,
+ "I/O Read Time": 0.000,
+ "I/O Write Time": 0.000
+ }
+ ]
+ },
+ "Planning Time": 0.031,
+ "Triggers": [
+ ],
+ "Execution Time": 0.443
+}'),
+(34, '###### Plan 34: GROUP BY',
+ '{
+ "Plan": {
+ "Node Type": "Aggregate",
+ "Strategy": "Hashed",
+ "Startup Cost": 450.00,
+ "Total Cost": 583.13,
+ "Plan Rows": 13314,
+ "Plan Width": 12,
+ "Actual Startup Time": 17.687,
+ "Actual Total Time": 24.180,
+ "Actual Rows": 10000,
+ "Actual Loops": 1,
+ "Output": ["a", "b", "max(c)"],
+ "Group Key": ["tt1.a", "tt1.b"],
+ "Shared Hit Blocks": 217,
+ "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,
+ "I/O Read Time": 0.000,
+ "I/O Write Time": 0.000,
+ "Plans": [
+ {
+ "Node Type": "Seq Scan",
+ "Parent Relationship": "Outer",
+ "Relation Name": "tt1",
+ "Schema": "public",
+ "Alias": "tt1",
+ "Startup Cost": 0.00,
+ "Total Cost": 350.14,
+ "Plan Rows": 13314,
+ "Plan Width": 12,
+ "Actual Startup Time": 0.215,
+ "Actual Total Time": 5.890,
+ "Actual Rows": 10000,
+ "Actual Loops": 1,
+ "Output": ["a", "b", "c"],
+ "Shared Hit Blocks": 217,
+ "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,
+ "I/O Read Time": 0.000,
+ "I/O Write Time": 0.000
+ }
+ ]
+ },
+ "Planning Time": 0.111,
+ "Triggers": [
+ ],
+ "Execution Time": 26.038
+}'),
+(35, '###### Plan 35: GROUPING SETS',
+ '{
+ "Plan": {
+ "Node Type": "Aggregate",
+ "Strategy": "Sorted",
+ "Startup Cost": 0.29,
+ "Total Cost": 2475.05,
+ "Plan Rows": 26629,
+ "Plan Width": 12,
+ "Actual Startup Time": 0.026,
+ "Actual Total Time": 57.973,
+ "Actual Rows": 20001,
+ "Actual Loops": 1,
+ "Output": ["a", "b", "max(c)"],
+ "Grouping Sets": [
+ {
+ "Group Keys": [
+ ["tt1.a"],
+ []
+ ]
+ },
+ {
+ "Sort Key": ["tt1.b"],
+ "Group Keys": [
+ ["tt1.b"]
+ ]
+ }
+ ],
+ "Shared Hit Blocks": 20180,
+ "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,
+ "I/O Read Time": 0.000,
+ "I/O Write Time": 0.000,
+ "Plans": [
+ {
+ "Node Type": "Index Scan",
+ "Parent Relationship": "Outer",
+ "Scan Direction": "Forward",
+ "Index Name": "i_tt1",
+ "Relation Name": "tt1",
+ "Schema": "public",
+ "Alias": "tt1",
+ "Startup Cost": 0.29,
+ "Total Cost": 863.99,
+ "Plan Rows": 13314,
+ "Plan Width": 12,
+ "Actual Startup Time": 0.016,
+ "Actual Total Time": 21.131,
+ "Actual Rows": 10000,
+ "Actual Loops": 1,
+ "Output": ["a", "b", "c"],
+ "Shared Hit Blocks": 20180,
+ "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,
+ "I/O Read Time": 0.000,
+ "I/O Write Time": 0.000
+ }
+ ]
+ },
+ "Planning Time": 0.091,
+ "Triggers": [
+ ],
+ "Execution Time": 61.219
+}'),
+(36, '###### Plan 36: Table sample',
+ E'{
+ "Plan": {
+ "Node Type": "Sample Scan",
+ "Relation Name": "tt1",
+ "Schema": "public",
+ "Alias": "tt1",
+ "Startup Cost": 0.00,
+ "Total Cost": 9.33,
+ "Plan Rows": 133,
+ "Plan Width": 12,
+ "Actual Startup Time": 0.018,
+ "Actual Total Time": 0.061,
+ "Actual Rows": 185,
+ "Actual Loops": 1,
+ "Output": ["a", "b", "c"],
+ "Sampling Method": "system",
+ "Sampling Parameters": ["\'1\'::real"],
+ "Repeatable Seed": "\'1\'::double precision",
+ "Shared Hit Blocks": 1,
+ "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,
+ "I/O Read Time": 0.000,
+ "I/O Write Time": 0.000
+ },
+ "Planning Time": 0.062,
"Triggers": [
],
- "Execution Time": 5.957
+ "Execution Time": 0.271
}'));
\pset pager