OSDN Git Service

Add new explain properties.
authorKyotaro Horiguchi <horiguchi.kyotaro@lab.ntt.co.jp>
Mon, 9 Feb 2015 10:13:18 +0000 (19:13 +0900)
committerKyotaro Horiguchi <horiguchi.kyotaro@lab.ntt.co.jp>
Fri, 3 Apr 2015 06:14:48 +0000 (15:14 +0900)
Added new plan property node Planning Time, Execution Time, Exact Heap
Blocks, Lossy Heap Blocks and Rows Removed by Join Filter which were
ignored.

expected/all.out
json2sql.pl
makeplanfile.sql
pgsp_json.c
pgsp_json_int.h
pgsp_json_text.c
pgsp_json_text.h
sql/all.sql

index a7e4c87..3285977 100644 (file)
@@ -10,6 +10,13 @@ SET client_min_messages = 'notice';
 ###### insert original JSON plans
 ###### set shortened JSON
 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}
+(1 row)
+
 ###### JSON properties round-trip test
 SELECT id FROM plans
        where pg_store_plans_jsonplan(splan) <> lplan;
@@ -32,8 +39,8 @@ SELECT '### '||'yaml-short       '||title||E'\n'||
     Total Cost: 10.00
     Plan Rows: 1000
     Plan Width: 4
-    Actual Startup Time: 259.664
-    Actual Total Time: 259.664
+    Actual Startup Time: 278.971
+    Actual Total Time: 278.971
     Actual Rows: 0
     Actual Loops: 1
     Shared Hit Blocks: 29735
@@ -58,8 +65,8 @@ SELECT '### '||'yaml-short       '||title||E'\n'||
         Total Cost: 10.00
         Plan Rows: 1000
         Plan Width: 4
-        Actual Startup Time: 3.474
-        Actual Total Time: 9.787
+        Actual Startup Time: 3.482
+        Actual Total Time: 9.608
         Actual Rows: 10001
         Actual Loops: 1
         Output:
@@ -79,16 +86,17 @@ SELECT '### '||'yaml-short       '||title||E'\n'||
         Temp Written Blocks: 0
         I/O Read Time: 0.000
         I/O Write Time: 0.000
-  Planning Time: 0.071
+  Planning Time: 0.073
   Triggers:
     - Trigger Name: "tt1_trig_1"
       Relation: "tt1"
-      Time: 92.091
+      Time: 99.098
       Calls: 10001
     - Trigger Name: "tt1_trig_2"
       Relation: "tt1"
-      Time: 83.320
+      Time: 87.327
       Calls: 10001
+  Execution Time: 279.599
 
 =======
 ### yaml-short       ###### Plan 2: Update, Trigger
@@ -102,8 +110,8 @@ SELECT '### '||'yaml-short       '||title||E'\n'||
     Total Cost: 134.75
     Plan Rows: 6380
     Plan Width: 46
-    Actual Startup Time: 319.686
-    Actual Total Time: 319.686
+    Actual Startup Time: 341.462
+    Actual Total Time: 341.462
     Actual Rows: 0
     Actual Loops: 1
     Shared Hit Blocks: 50276
@@ -128,8 +136,8 @@ SELECT '### '||'yaml-short       '||title||E'\n'||
         Total Cost: 134.75
         Plan Rows: 6380
         Plan Width: 46
-        Actual Startup Time: 0.040
-        Actual Total Time: 10.294
+        Actual Startup Time: 0.039
+        Actual Total Time: 10.562
         Actual Rows: 10001
         Actual Loops: 1
         Output:
@@ -149,16 +157,17 @@ SELECT '### '||'yaml-short       '||title||E'\n'||
         Temp Written Blocks: 0
         I/O Read Time: 0.000
         I/O Write Time: 0.000
-  Planning Time: 0.189
+  Planning Time: 0.190
   Triggers:
     - Trigger Name: "tt1_trig_1"
       Relation: "tt1"
-      Time: 99.372
+      Time: 106.223
       Calls: 10001
     - Trigger Name: "tt1_trig_2"
       Relation: "tt1"
-      Time: 85.554
+      Time: 89.765
       Calls: 10001
+  Execution Time: 341.510
 
 =======
 ### yaml-short       ###### Plan 3: Delete
@@ -172,8 +181,8 @@ SELECT '### '||'yaml-short       '||title||E'\n'||
     Total Cost: 298.66
     Plan Rows: 63
     Plan Width: 6
-    Actual Startup Time: 13.935
-    Actual Total Time: 13.935
+    Actual Startup Time: 16.121
+    Actual Total Time: 16.121
     Actual Rows: 0
     Actual Loops: 1
     Shared Hit Blocks: 1109
@@ -198,8 +207,8 @@ SELECT '### '||'yaml-short       '||title||E'\n'||
         Total Cost: 298.66
         Plan Rows: 63
         Plan Width: 6
-        Actual Startup Time: 3.462
-        Actual Total Time: 11.007
+        Actual Startup Time: 3.838
+        Actual Total Time: 9.672
         Actual Rows: 1000
         Actual Loops: 1
         Output:
@@ -218,8 +227,9 @@ SELECT '### '||'yaml-short       '||title||E'\n'||
         Temp Written Blocks: 0
         I/O Read Time: 0.000
         I/O Write Time: 0.000
-  Planning Time: 0.149
+  Planning Time: 0.151
   Triggers:
+  Execution Time: 16.159
 ##################
 SELECT '### '||'xml-short        '||title||E'\n'||
   pg_store_plans_xmlplan(splan)
@@ -237,8 +247,8 @@ SELECT '### '||'xml-short        '||title||E'\n'||
       <Total-Cost>10.00</Total-Cost>
       <Plan-Rows>1000</Plan-Rows>
       <Plan-Width>4</Plan-Width>
-      <Actual-Startup-Time>259.664</Actual-Startup-Time>
-      <Actual-Total-Time>259.664</Actual-Total-Time>
+      <Actual-Startup-Time>278.971</Actual-Startup-Time>
+      <Actual-Total-Time>278.971</Actual-Total-Time>
       <Actual-Rows>0</Actual-Rows>
       <Actual-Loops>1</Actual-Loops>
       <Shared-Hit-Blocks>29735</Shared-Hit-Blocks>
@@ -264,8 +274,8 @@ SELECT '### '||'xml-short        '||title||E'\n'||
           <Total-Cost>10.00</Total-Cost>
           <Plan-Rows>1000</Plan-Rows>
           <Plan-Width>4</Plan-Width>
-          <Actual-Startup-Time>3.474</Actual-Startup-Time>
-          <Actual-Total-Time>9.787</Actual-Total-Time>
+          <Actual-Startup-Time>3.482</Actual-Startup-Time>
+          <Actual-Total-Time>9.608</Actual-Total-Time>
           <Actual-Rows>10001</Actual-Rows>
           <Actual-Loops>1</Actual-Loops>
           <Output>
@@ -289,21 +299,22 @@ SELECT '### '||'xml-short        '||title||E'\n'||
         </Plan>
       </Plans>
     </Plan>
-    <Planning-Time>0.071</Planning-Time>
+    <Planning-Time>0.073</Planning-Time>
     <Triggers>
       <Trigger>
         <Trigger-Name>tt1_trig_1</Trigger-Name>
         <Relation>tt1</Relation>
-        <Time>92.091</Time>
+        <Time>99.098</Time>
         <Calls>10001</Calls>
       </Trigger>
       <Trigger>
         <Trigger-Name>tt1_trig_2</Trigger-Name>
         <Relation>tt1</Relation>
-        <Time>83.320</Time>
+        <Time>87.327</Time>
         <Calls>10001</Calls>
       </Trigger>
     </Triggers>
+    <Execution-Time>279.599</Execution-Time>
   </Query>
 </explain>
 
@@ -318,8 +329,8 @@ SELECT '### '||'xml-short        '||title||E'\n'||
       <Total-Cost>418.02</Total-Cost>
       <Plan-Rows>20002</Plan-Rows>
       <Plan-Width>8</Plan-Width>
-      <Actual-Startup-Time>2.871</Actual-Startup-Time>
-      <Actual-Total-Time>16.467</Actual-Total-Time>
+      <Actual-Startup-Time>2.456</Actual-Startup-Time>
+      <Actual-Total-Time>18.463</Actual-Total-Time>
       <Actual-Rows>20002</Actual-Rows>
       <Actual-Loops>1</Actual-Loops>
       <Output>
@@ -347,8 +358,8 @@ SELECT '### '||'xml-short        '||title||E'\n'||
           <Total-Cost>418.02</Total-Cost>
           <Plan-Rows>20002</Plan-Rows>
           <Plan-Width>8</Plan-Width>
-          <Actual-Startup-Time>2.869</Actual-Startup-Time>
-          <Actual-Total-Time>11.693</Actual-Total-Time>
+          <Actual-Startup-Time>2.455</Actual-Startup-Time>
+          <Actual-Total-Time>13.035</Actual-Total-Time>
           <Actual-Rows>20002</Actual-Rows>
           <Actual-Loops>1</Actual-Loops>
           <Shared-Hit-Blocks>218</Shared-Hit-Blocks>
@@ -374,8 +385,8 @@ SELECT '### '||'xml-short        '||title||E'\n'||
               <Total-Cost>263.01</Total-Cost>
               <Plan-Rows>10001</Plan-Rows>
               <Plan-Width>8</Plan-Width>
-              <Actual-Startup-Time>2.868</Actual-Startup-Time>
-              <Actual-Total-Time>6.490</Actual-Total-Time>
+              <Actual-Startup-Time>2.454</Actual-Startup-Time>
+              <Actual-Total-Time>7.270</Actual-Total-Time>
               <Actual-Rows>10001</Actual-Rows>
               <Actual-Loops>1</Actual-Loops>
               <Output>
@@ -405,8 +416,8 @@ SELECT '### '||'xml-short        '||title||E'\n'||
               <Total-Cost>155.01</Total-Cost>
               <Plan-Rows>10001</Plan-Rows>
               <Plan-Width>8</Plan-Width>
-              <Actual-Startup-Time>0.007</Actual-Startup-Time>
-              <Actual-Total-Time>2.445</Actual-Total-Time>
+              <Actual-Startup-Time>0.006</Actual-Startup-Time>
+              <Actual-Total-Time>2.516</Actual-Total-Time>
               <Actual-Rows>10001</Actual-Rows>
               <Actual-Loops>1</Actual-Loops>
               <Output>
@@ -430,9 +441,10 @@ SELECT '### '||'xml-short        '||title||E'\n'||
         </Plan>
       </Plans>
     </Plan>
-    <Planning-Time>0.468</Planning-Time>
+    <Planning-Time>0.396</Planning-Time>
     <Triggers>
     </Triggers>
+    <Execution-Time>20.432</Execution-Time>
   </Query>
 </explain>
 
@@ -452,8 +464,8 @@ SELECT '### '||'xml-short        '||title||E'\n'||
       <Total-Cost>21.21</Total-Cost>
       <Plan-Rows>4</Plan-Rows>
       <Plan-Width>12</Plan-Width>
-      <Actual-Startup-Time>0.005</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>
@@ -476,9 +488,10 @@ SELECT '### '||'xml-short        '||title||E'\n'||
       <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.160</Planning-Time>
     <Triggers>
     </Triggers>
+    <Execution-Time>0.114</Execution-Time>
   </Query>
 </explain>
 
@@ -493,8 +506,8 @@ SELECT '### '||'xml-short        '||title||E'\n'||
       <Total-Cost>820.79</Total-Cost>
       <Plan-Rows>10</Plan-Rows>
       <Plan-Width>12</Plan-Width>
-      <Actual-Startup-Time>15.390</Actual-Startup-Time>
-      <Actual-Total-Time>15.390</Actual-Total-Time>
+      <Actual-Startup-Time>17.722</Actual-Startup-Time>
+      <Actual-Total-Time>17.722</Actual-Total-Time>
       <Actual-Rows>0</Actual-Rows>
       <Actual-Loops>1</Actual-Loops>
       <Output>
@@ -523,8 +536,8 @@ SELECT '### '||'xml-short        '||title||E'\n'||
           <Total-Cost>1854.80</Total-Cost>
           <Plan-Rows>10001</Plan-Rows>
           <Plan-Width>12</Plan-Width>
-          <Actual-Startup-Time>15.387</Actual-Startup-Time>
-          <Actual-Total-Time>15.387</Actual-Total-Time>
+          <Actual-Startup-Time>17.721</Actual-Startup-Time>
+          <Actual-Total-Time>17.721</Actual-Total-Time>
           <Actual-Rows>0</Actual-Rows>
           <Actual-Loops>1</Actual-Loops>
           <Output>
@@ -558,8 +571,8 @@ SELECT '### '||'xml-short        '||title||E'\n'||
               <Total-Cost>760.30</Total-Cost>
               <Plan-Rows>10001</Plan-Rows>
               <Plan-Width>12</Plan-Width>
-              <Actual-Startup-Time>0.029</Actual-Startup-Time>
-              <Actual-Total-Time>0.029</Actual-Total-Time>
+              <Actual-Startup-Time>0.030</Actual-Startup-Time>
+              <Actual-Total-Time>0.030</Actual-Total-Time>
               <Actual-Rows>1</Actual-Rows>
               <Actual-Loops>1</Actual-Loops>
               <Output>
@@ -587,8 +600,8 @@ SELECT '### '||'xml-short        '||title||E'\n'||
               <Total-Cost>844.47</Total-Cost>
               <Plan-Rows>10001</Plan-Rows>
               <Plan-Width>4</Plan-Width>
-              <Actual-Startup-Time>12.880</Actual-Startup-Time>
-              <Actual-Total-Time>13.558</Actual-Total-Time>
+              <Actual-Startup-Time>15.127</Actual-Startup-Time>
+              <Actual-Total-Time>15.873</Actual-Total-Time>
               <Actual-Rows>10001</Actual-Rows>
               <Actual-Loops>1</Actual-Loops>
               <Output>
@@ -624,8 +637,8 @@ SELECT '### '||'xml-short        '||title||E'\n'||
                   <Total-Cost>155.01</Total-Cost>
                   <Plan-Rows>10001</Plan-Rows>
                   <Plan-Width>4</Plan-Width>
-                  <Actual-Startup-Time>0.018</Actual-Startup-Time>
-                  <Actual-Total-Time>5.780</Actual-Total-Time>
+                  <Actual-Startup-Time>0.017</Actual-Startup-Time>
+                  <Actual-Total-Time>7.124</Actual-Total-Time>
                   <Actual-Rows>10001</Actual-Rows>
                   <Actual-Loops>1</Actual-Loops>
                   <Output>
@@ -651,9 +664,10 @@ SELECT '### '||'xml-short        '||title||E'\n'||
         </Plan>
       </Plans>
     </Plan>
-    <Planning-Time>0.409</Planning-Time>
+    <Planning-Time>0.422</Planning-Time>
     <Triggers>
     </Triggers>
+    <Execution-Time>17.968</Execution-Time>
   </Query>
 </explain>
 
@@ -661,444 +675,527 @@ SELECT '### '||'xml-short        '||title||E'\n'||
 SELECT '### '||'TEXT-short       '||title||E'\n'||
   pg_store_plans_textplan(splan)
   FROM plans ORDER BY id;
-### TEXT-short       ###### Plan 0: all properties
+### TEXT-short       ###### Plan -2: all properties plus unknown key
+
+Planning Time: 0 ms
+Execution Time: 0 ms
+
+=======
+### TEXT-short       ###### Plan -1: all properties
 
+Planning Time: 0 ms
+Execution Time: 0 ms
 
 =======
 ### TEXT-short       ###### Plan 1: Insert, Trigger
-Insert on public.tt1  (cost=0.00..10.00 rows=1000 width=4) (actual time=259.664..259.664 rows=0 loops=1)
+Insert on public.tt1  (cost=0.00..10.00 rows=1000 width=4) (actual time=278.971..278.971 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.474..9.787 rows=10001 loops=1)
+  ->  Function Scan on pg_catalog.generate_series a  (cost=0.00..10.00 rows=1000 width=4) (actual time=3.482..9.608 rows=10001 loops=1)
         Output: a.a, NULL::integer, NULL::text
         Function Call: generate_series(0, 10000)
-Trigger tt1_trig_1: time=92.091 calls=10001
-Trigger tt1_trig_2: time=83.320 calls=10001
+Planning Time: 0.073 ms
+Trigger tt1_trig_1: time=99.098 calls=10001
+Trigger tt1_trig_2: time=87.327 calls=10001
+Execution Time: 279.599 ms
 
 =======
 ### TEXT-short       ###### Plan 2: Update, Trigger
-Update on public.tt1  (cost=0.00..134.75 rows=6380 width=46) (actual time=319.686..319.686 rows=0 loops=1)
+Update on public.tt1  (cost=0.00..134.75 rows=6380 width=46) (actual time=341.462..341.462 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.040..10.294 rows=10001 loops=1)
+  ->  Seq Scan on public.tt1  (cost=0.00..134.75 rows=6380 width=46) (actual time=0.039..10.562 rows=10001 loops=1)
         Output: (a + 1), b, c, ctid
         Buffers: shared hit=55
-Trigger tt1_trig_1: time=99.372 calls=10001
-Trigger tt1_trig_2: time=85.554 calls=10001
+Planning Time: 0.190 ms
+Trigger tt1_trig_1: time=106.223 calls=10001
+Trigger tt1_trig_2: time=89.765 calls=10001
+Execution Time: 341.510 ms
 
 =======
 ### TEXT-short       ###### Plan 3: Delete
-Delete on public.tt1  (cost=0.00..298.66 rows=63 width=6) (actual time=13.935..13.935 rows=0 loops=1)
+Delete on public.tt1  (cost=0.00..298.66 rows=63 width=6) (actual time=16.121..16.121 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.462..11.007 rows=1000 loops=1)
+  ->  Seq Scan on public.tt1  (cost=0.00..298.66 rows=63 width=6) (actual time=3.838..9.672 rows=1000 loops=1)
         Output: ctid
         Filter: ((tt1.a % 10) = 0)
         Rows Removed by Filter: 9001
         Buffers: shared hit=109
+Planning Time: 0.151 ms
+Execution Time: 16.159 ms
 
 =======
 ### TEXT-short       ###### Plan 4: Result, Append Seq Scan
-Result  (cost=0.00..418.02 rows=20002 width=8) (actual time=2.871..16.467 rows=20002 loops=1)
+Result  (cost=0.00..418.02 rows=20002 width=8) (actual time=2.456..18.463 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.869..11.693 rows=20002 loops=1)
+  ->  Append  (cost=0.00..418.02 rows=20002 width=8) (actual time=2.455..13.035 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.868..6.490 rows=10001 loops=1)
+        ->  Seq Scan on public.tt1  (cost=0.00..263.01 rows=10001 width=8) (actual time=2.454..7.270 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.007..2.445 rows=10001 loops=1)
+        ->  Seq Scan on public.tt2  (cost=0.00..155.01 rows=10001 width=8) (actual time=0.006..2.516 rows=10001 loops=1)
               Output: tt2.a, 4
               Buffers: shared hit=55
+Planning Time: 0.396 ms
+Execution Time: 20.432 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.005..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.160 ms
+Execution Time: 0.114 ms
 
 =======
 ### TEXT-short       ###### Plan 6: Index scan (backward), MergeJoin, Sort, quichsort, alias
-Limit  (cost=819.75..820.79 rows=10 width=12) (actual time=15.390..15.390 rows=0 loops=1)
+Limit  (cost=819.75..820.79 rows=10 width=12) (actual time=17.722..17.722 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=15.387..15.387 rows=0 loops=1)
+  ->  Merge Join  (cost=819.75..1854.80 rows=10001 width=12) (actual time=17.721..17.721 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.029..0.029 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.030..0.030 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=12.880..13.558 rows=10001 loops=1)
+        ->  Sort  (cost=819.47..844.47 rows=10001 width=4) (actual time=15.127..15.873 rows=10001 loops=1)
               Output: y.b, (((- y.b) * 3))
               Sort Key: (((- y.b) * 3))
               Sort Method: quicksort  Memory: 855kB
               Buffers: shared hit=55
-              ->  Seq Scan on public.tt2 y  (cost=0.00..155.01 rows=10001 width=4) (actual time=0.018..5.780 rows=10001 loops=1)
+              ->  Seq Scan on public.tt2 y  (cost=0.00..155.01 rows=10001 width=4) (actual time=0.017..7.124 rows=10001 loops=1)
                     Output: y.b, ((- y.b) * 3)
                     Buffers: shared hit=55
+Planning Time: 0.422 ms
+Execution Time: 17.968 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.014..0.031 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.015..0.033 rows=10 loops=1)
   Output: a
   Index Cond: (tt1.a < 10)
   Heap Fetches: 29
   Buffers: shared hit=31
+Planning Time: 0.065 ms
+Execution Time: 0.049 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.038..0.038 rows=1 loops=1)
+Aggregate  (cost=3.65..3.66 rows=1 width=4) (actual time=0.034..0.034 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.001..0.001 rows=1 loops=1)
+    ->  Recursive Union  (cost=0.00..2.95 rows=31 width=4) (actual time=0.001..0.022 rows=10 loops=1)
+        ->  Result  (cost=0.00..0.01 rows=1 width=0) (actual time=0.000..0.000 rows=1 loops=1)
               Output: 1
         ->  WorkTable Scan  (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.003..0.031 rows=10 loops=1)
+  ->  CTE Scan on cte1  (cost=0.00..0.62 rows=31 width=4) (actual time=0.003..0.027 rows=10 loops=1)
         Output: cte1.a
+Planning Time: 0.075 ms
+Execution Time: 0.072 ms
 
 =======
 ### TEXT-short       ###### Plan 9: FunctionScan, Hash/HashJoin, Nested Loop
-Nested Loop  (cost=1.15..2.69 rows=1 width=64) (actual time=0.046..0.048 rows=1 loops=1)
+Nested Loop  (cost=1.15..2.69 rows=1 width=64) (actual time=0.052..0.054 rows=1 loops=1)
   Output: d.datname
   Buffers: shared hit=3
-  ->  Hash Join  (cost=1.02..2.41 rows=1 width=4) (actual time=0.038..0.039 rows=1 loops=1)
+  ->  Hash Join  (cost=1.02..2.41 rows=1 width=4) (actual time=0.043..0.044 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.025..0.025 rows=1 loops=1)
+        ->  Function Scan on pg_catalog.pg_stat_get_activity s  (cost=0.00..1.00 rows=100 width=8) (actual time=0.029..0.029 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
               Function Call: pg_stat_get_activity(NULL::integer)
         ->  Hash  (cost=1.01..1.01 rows=1 width=4) (actual time=0.005..0.005 rows=1 loops=1)
               Output: u.oid
               Buckets: 1024  Batches: 1  Memory Usage: 1kB
               Buffers: shared hit=1
-              ->  Seq Scan on pg_catalog.pg_authid u  (cost=0.00..1.01 rows=1 width=4) (actual time=0.002..0.002 rows=1 loops=1)
+              ->  Seq Scan on pg_catalog.pg_authid u  (cost=0.00..1.01 rows=1 width=4) (actual time=0.003..0.004 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=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.005..0.006 rows=1 loops=1)
         Output: d.datname, d.oid
         Index Cond: (d.oid = s.datid)
         Buffers: shared hit=2
+Planning Time: 0.463 ms
+Execution Time: 0.143 ms
 
 =======
 ### TEXT-short       ###### Plan 10: MergeAppend, Values
-Merge Append  (cost=0.36..985.44 rows=10004 width=4) (actual time=0.035..24.103 rows=10004 loops=1)
+Merge Append  (cost=0.36..985.44 rows=10004 width=4) (actual time=0.024..21.501 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.020..21.640 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.013..19.370 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.013..0.015 rows=3 loops=1)
+  ->  Sort  (cost=0.06..0.07 rows=3 width=4) (actual time=0.009..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.002..0.005 rows=3 loops=1)
+        ->  Values Scan on "*VALUES*"  (cost=0.00..0.04 rows=3 width=4) (actual time=0.001..0.002 rows=3 loops=1)
               Output: "*VALUES*".column1
+Planning Time: 0.113 ms
+Execution Time: 22.775 ms
 
 =======
 ### TEXT-short       ###### Plan 11: Append, HashAggregate
-HashAggregate  (cost=668.04..868.06 rows=20002 width=4) (actual time=14.110..17.847 rows=20002 loops=1)
+HashAggregate  (cost=668.04..868.06 rows=20002 width=4) (actual time=14.818..18.534 rows=20002 loops=1)
   Output: tt1.a
   Buffers: shared hit=218
-  ->  Append  (cost=0.00..618.04 rows=20002 width=4) (actual time=0.093..7.210 rows=20002 loops=1)
+  ->  Append  (cost=0.00..618.04 rows=20002 width=4) (actual time=0.093..7.837 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.093..2.267 rows=10001 loops=1)
+        ->  Seq Scan on public.tt1  (cost=0.00..263.01 rows=10001 width=4) (actual time=0.092..2.656 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.007..2.349 rows=10001 loops=1)
+        ->  Seq Scan on public.tt2  (cost=0.00..155.01 rows=10001 width=4) (actual time=0.007..2.497 rows=10001 loops=1)
               Output: tt2.b
               Buffers: shared hit=55
+Planning Time: 0.055 ms
+Execution Time: 20.497 ms
 
 =======
 ### TEXT-short       ###### Plan 12: GroupAggregate
-GroupAggregate  (cost=1067.47..1242.49 rows=10001 width=8) (actual time=11.262..20.921 rows=10001 loops=1)
+GroupAggregate  (cost=1067.47..1242.49 rows=10001 width=8) (actual time=11.010..20.888 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=11.258..14.792 rows=10001 loops=1)
+  ->  Sort  (cost=1067.47..1092.47 rows=10001 width=8) (actual time=11.006..14.448 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.107..2.551 rows=10001 loops=1)
+        ->  Seq Scan on public.tt1  (cost=0.00..263.01 rows=10001 width=8) (actual time=0.101..2.406 rows=10001 loops=1)
               Output: b, a
               Buffers: shared hit=163
+Planning Time: 0.043 ms
+Execution Time: 22.187 ms
 
 =======
 ### TEXT-short       ###### Plan 13: Group
-Group  (cost=1067.47..1117.47 rows=10001 width=4) (actual time=10.339..17.991 rows=10001 loops=1)
+Group  (cost=1067.47..1117.47 rows=10001 width=4) (actual time=10.899..18.359 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.338..13.621 rows=10001 loops=1)
+  ->  Sort  (cost=1067.47..1092.47 rows=10001 width=4) (actual time=10.898..14.260 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.094..2.299 rows=10001 loops=1)
+        ->  Seq Scan on public.tt1  (cost=0.00..263.01 rows=10001 width=4) (actual time=0.092..2.408 rows=10001 loops=1)
               Output: b
               Buffers: shared hit=163
+Planning Time: 0.032 ms
+Execution Time: 19.300 ms
 
 =======
 ### TEXT-short       ###### Plan 14: SetOp intersect, SbuqueryScan
-Sort  (cost=1332.50..1357.51 rows=10001 width=4) (actual time=17.539..17.539 rows=0 loops=1)
+Sort  (cost=1332.50..1357.51 rows=10001 width=4) (actual time=18.443..18.443 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.535..17.535 rows=0 loops=1)
+  ->  HashSetOp Intersect  (cost=0.00..668.04 rows=10001 width=4) (actual time=18.440..18.440 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.099..11.794 rows=20002 loops=1)
+        ->  Append  (cost=0.00..618.04 rows=20002 width=4) (actual time=0.096..12.268 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.098..4.665 rows=10001 loops=1)
+              ->  Subquery Scan on "*SELECT* 1"  (cost=0.00..363.02 rows=10001 width=4) (actual time=0.096..4.961 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.098..2.472 rows=10001 loops=1)
+                    ->  Seq Scan on public.tt1  (cost=0.00..263.01 rows=10001 width=4) (actual time=0.095..2.556 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.507 rows=10001 loops=1)
+              ->  Subquery Scan on "*SELECT* 2"  (cost=0.00..255.02 rows=10001 width=4) (actual time=0.007..4.645 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.314 rows=10001 loops=1)
+                    ->  Seq Scan on public.tt2  (cost=0.00..155.01 rows=10001 width=4) (actual time=0.007..2.398 rows=10001 loops=1)
                           Output: tt2.b
                           Buffers: shared hit=55
+Planning Time: 0.066 ms
+Execution Time: 18.676 ms
 
 =======
 ### TEXT-short       ###### Plan 15: Sorted SetOp, Sort on Disk
-SetOp Intersect  (cost=2323.47..2423.48 rows=10001 width=4) (actual time=45.010..45.010 rows=0 loops=1)
+SetOp Intersect  (cost=2323.47..2423.48 rows=10001 width=4) (actual time=46.670..46.670 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.929..38.799 rows=20002 loops=1)
+  ->  Sort  (cost=2323.47..2373.47 rows=20002 width=4) (actual time=34.600..40.460 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.118..12.833 rows=20002 loops=1)
+        ->  Append  (cost=0.00..618.04 rows=20002 width=4) (actual time=0.103..13.633 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.118..5.492 rows=10001 loops=1)
+              ->  Subquery Scan on "*SELECT* 1"  (cost=0.00..363.02 rows=10001 width=4) (actual time=0.103..5.850 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.117..2.860 rows=10001 loops=1)
+                    ->  Seq Scan on public.tt1  (cost=0.00..263.01 rows=10001 width=4) (actual time=0.102..3.004 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.665 rows=10001 loops=1)
+              ->  Subquery Scan on "*SELECT* 2"  (cost=0.00..255.02 rows=10001 width=4) (actual time=0.007..4.912 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.378 rows=10001 loops=1)
+                    ->  Seq Scan on public.tt2  (cost=0.00..155.01 rows=10001 width=4) (actual time=0.007..2.538 rows=10001 loops=1)
                           Output: tt2.b
                           Buffers: shared hit=55
+Planning Time: 0.073 ms
+Execution Time: 46.811 ms
 
 =======
 ### TEXT-short       ###### Plan 16: HashSetOp intersect All, SubqueryScan
-Sort  (cost=1332.50..1357.51 rows=10001 width=4) (actual time=19.483..19.483 rows=0 loops=1)
+Sort  (cost=1332.50..1357.51 rows=10001 width=4) (actual time=18.707..18.707 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=19.480..19.480 rows=0 loops=1)
+  ->  HashSetOp Intersect All  (cost=0.00..668.04 rows=10001 width=4) (actual time=18.704..18.704 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.106..13.075 rows=20002 loops=1)
+        ->  Append  (cost=0.00..618.04 rows=20002 width=4) (actual time=0.106..12.494 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.106..5.676 rows=10001 loops=1)
+              ->  Subquery Scan on "*SELECT* 1"  (cost=0.00..363.02 rows=10001 width=4) (actual time=0.106..5.120 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.099..2.977 rows=10001 loops=1)
+                    ->  Seq Scan on public.tt1  (cost=0.00..263.01 rows=10001 width=4) (actual time=0.105..2.438 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.541 rows=10001 loops=1)
+              ->  Subquery Scan on "*SELECT* 2"  (cost=0.00..255.02 rows=10001 width=4) (actual time=0.008..4.613 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.350 rows=10001 loops=1)
+                    ->  Seq Scan on public.tt2  (cost=0.00..155.01 rows=10001 width=4) (actual time=0.007..2.387 rows=10001 loops=1)
                           Output: tt2.b
                           Buffers: shared hit=55
+Planning Time: 0.077 ms
+Execution Time: 18.940 ms
 
 =======
 ### TEXT-short       ###### Plan 17: HashSetOp except, SubqueryScan
-Sort  (cost=1332.50..1357.51 rows=10001 width=4) (actual time=23.783..24.519 rows=10001 loops=1)
+Sort  (cost=1332.50..1357.51 rows=10001 width=4) (actual time=24.004..24.864 rows=10001 loops=1)
   Output: "*SELECT* 1".a, (0)
   Sort Key: "*SELECT* 1".a
   Sort Method: quicksort  Memory: 855kB
   Buffers: shared hit=218
-  ->  HashSetOp Except  (cost=0.00..668.04 rows=10001 width=4) (actual time=18.364..19.479 rows=10001 loops=1)
+  ->  HashSetOp Except  (cost=0.00..668.04 rows=10001 width=4) (actual time=18.469..19.564 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.099..12.502 rows=20002 loops=1)
+        ->  Append  (cost=0.00..618.04 rows=20002 width=4) (actual time=0.108..12.635 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.099..5.266 rows=10001 loops=1)
+              ->  Subquery Scan on "*SELECT* 1"  (cost=0.00..363.02 rows=10001 width=4) (actual time=0.108..5.319 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.098..2.804 rows=10001 loops=1)
+                    ->  Seq Scan on public.tt1  (cost=0.00..263.01 rows=10001 width=4) (actual time=0.107..2.706 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.526 rows=10001 loops=1)
+              ->  Subquery Scan on "*SELECT* 2"  (cost=0.00..255.02 rows=10001 width=4) (actual time=0.006..4.610 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.338 rows=10001 loops=1)
+                    ->  Seq Scan on public.tt2  (cost=0.00..155.01 rows=10001 width=4) (actual time=0.006..2.359 rows=10001 loops=1)
                           Output: tt2.b
                           Buffers: shared hit=55
+Planning Time: 0.067 ms
+Execution Time: 26.764 ms
 
 =======
 ### TEXT-short       ###### Plan 18: HashSetOp except all, SubqueryScan
-Sort  (cost=1332.50..1357.51 rows=10001 width=4) (actual time=23.416..24.178 rows=10001 loops=1)
+Sort  (cost=1332.50..1357.51 rows=10001 width=4) (actual time=23.660..24.524 rows=10001 loops=1)
   Output: "*SELECT* 1".a, (0)
   Sort Key: "*SELECT* 1".a
   Sort Method: quicksort  Memory: 855kB
   Buffers: shared hit=218
-  ->  HashSetOp Except All  (cost=0.00..668.04 rows=10001 width=4) (actual time=18.185..19.248 rows=10001 loops=1)
+  ->  HashSetOp Except All  (cost=0.00..668.04 rows=10001 width=4) (actual time=18.396..19.526 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.126..12.408 rows=20002 loops=1)
+        ->  Append  (cost=0.00..618.04 rows=20002 width=4) (actual time=0.149..12.539 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.126..5.197 rows=10001 loops=1)
+              ->  Subquery Scan on "*SELECT* 1"  (cost=0.00..363.02 rows=10001 width=4) (actual time=0.148..5.230 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.124..2.657 rows=10001 loops=1)
+                    ->  Seq Scan on public.tt1  (cost=0.00..263.01 rows=10001 width=4) (actual time=0.148..2.618 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.507 rows=10001 loops=1)
+              ->  Subquery Scan on "*SELECT* 2"  (cost=0.00..255.02 rows=10001 width=4) (actual time=0.007..4.628 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.347 rows=10001 loops=1)
+                    ->  Seq Scan on public.tt2  (cost=0.00..155.01 rows=10001 width=4) (actual time=0.007..2.358 rows=10001 loops=1)
                           Output: tt2.b
                           Buffers: shared hit=55
+Planning Time: 0.066 ms
+Execution Time: 26.439 ms
 
 =======
 ### TEXT-short       ###### Plan 19: merge LEFT join
-Merge Left Join  (cost=0.58..2409.14 rows=15147 width=4) (actual time=0.031..38.276 rows=30003 loops=1)
+Merge Left Join  (cost=0.71..4271.17 rows=33467 width=4) (actual time=0.033..57.646 rows=60003 loops=1)
   Output: x.b
   Merge Cond: (x.a = y.a)
-  Buffers: shared hit=20420
-  ->  Index Scan using i_tt1 on public.tt1 x  (cost=0.29..760.30 rows=10001 width=8) (actual time=0.007..3.807 rows=10001 loops=1)
+  Buffers: shared hit=20942
+  ->  Index Scan using i_tt1 on public.tt1 x  (cost=0.29..760.30 rows=10001 width=8) (actual time=0.007..4.046 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.29..5731.87 rows=120003 width=4) (actual time=0.020..18.353 rows=30004 loops=1)
+  ->  Index Only Scan using i_tt3_a on public.tt3 y  (cost=0.42..9037.06 rows=180003 width=4) (actual time=0.021..30.164 rows=60004 loops=1)
         Output: y.a
-        Heap Fetches: 30004
-        Buffers: shared hit=20255
+        Heap Fetches: 60004
+        Buffers: shared hit=20777
+Planning Time: 0.392 ms
+Execution Time: 62.836 ms
 
 =======
 ### TEXT-short       ###### Plan 20: hash FULL join
-Hash Full Join  (cost=280.02..793.06 rows=10001 width=4) (actual time=9.198..16.568 rows=17001 loops=1)
+Hash Full Join  (cost=280.02..793.06 rows=10001 width=4) (actual time=12.175..21.075 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.106..1.576 rows=10001 loops=1)
+  ->  Seq Scan on public.tt1 x  (cost=0.00..263.01 rows=10001 width=8) (actual time=0.205..2.002 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=9.087..9.087 rows=10001 loops=1)
+  ->  Hash  (cost=155.01..155.01 rows=10001 width=4) (actual time=11.960..11.960 rows=10001 loops=1)
         Output: y.a
         Buckets: 1024  Batches: 1  Memory Usage: 352kB
         Buffers: shared hit=55
-        ->  Seq Scan on public.tt2 y  (cost=0.00..155.01 rows=10001 width=4) (actual time=0.009..4.253 rows=10001 loops=1)
+        ->  Seq Scan on public.tt2 y  (cost=0.00..155.01 rows=10001 width=4) (actual time=0.019..5.607 rows=10001 loops=1)
               Output: y.a
               Buffers: shared hit=55
+Planning Time: 0.189 ms
+Execution Time: 22.756 ms
 
 =======
 ### TEXT-short       ###### Plan 21: hash SEMI join
-Hash Semi Join  (cost=280.02..793.06 rows=10001 width=12) (actual time=10.003..10.003 rows=0 loops=1)
+Hash Semi Join  (cost=280.02..793.06 rows=10001 width=12) (actual time=10.101..10.101 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.092..1.398 rows=10001 loops=1)
+  ->  Seq Scan on public.tt1  (cost=0.00..263.01 rows=10001 width=12) (actual time=0.090..1.342 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.360..5.360 rows=10001 loops=1)
+  ->  Hash  (cost=155.01..155.01 rows=10001 width=4) (actual time=5.481..5.481 rows=10001 loops=1)
         Output: tt2.b
         Buckets: 1024  Batches: 1  Memory Usage: 352kB
         Buffers: shared hit=55
-        ->  Seq Scan on public.tt2  (cost=0.00..155.01 rows=10001 width=4) (actual time=0.007..2.538 rows=10001 loops=1)
+        ->  Seq Scan on public.tt2  (cost=0.00..155.01 rows=10001 width=4) (actual time=0.007..2.619 rows=10001 loops=1)
               Output: tt2.b
               Buffers: shared hit=55
+Planning Time: 0.184 ms
+Execution Time: 10.305 ms
 
 =======
 ### TEXT-short       ###### Plan 22: Hash Anti Join
-Hash Anti Join  (cost=280.02..693.05 rows=1 width=12) (actual time=5.458..11.753 rows=10001 loops=1)
+Hash Anti Join  (cost=280.02..693.05 rows=1 width=12) (actual time=5.601..11.876 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.094..1.498 rows=10001 loops=1)
+  ->  Seq Scan on public.tt1  (cost=0.00..263.01 rows=10001 width=12) (actual time=0.091..1.500 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.359..5.359 rows=10001 loops=1)
+  ->  Hash  (cost=155.01..155.01 rows=10001 width=4) (actual time=5.505..5.505 rows=10001 loops=1)
         Output: tt2.b
         Buckets: 1024  Batches: 1  Memory Usage: 352kB
         Buffers: shared hit=55
-        ->  Seq Scan on public.tt2  (cost=0.00..155.01 rows=10001 width=4) (actual time=0.007..2.482 rows=10001 loops=1)
+        ->  Seq Scan on public.tt2  (cost=0.00..155.01 rows=10001 width=4) (actual time=0.006..2.610 rows=10001 loops=1)
               Output: tt2.b
               Buffers: shared hit=55
+Planning Time: 0.138 ms
+Execution Time: 12.814 ms
 
 =======
 ### TEXT-short       ###### Plan 23: WindowAgg
-WindowAgg  (cost=927.47..1127.49 rows=10001 width=4) (actual time=5.547..16.947 rows=10001 loops=1)
+WindowAgg  (cost=927.47..1127.49 rows=10001 width=4) (actual time=5.695..16.316 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.541..6.433 rows=10001 loops=1)
+  ->  Sort  (cost=927.47..952.47 rows=10001 width=4) (actual time=5.688..6.679 rows=10001 loops=1)
         Output: ((a / 10)), a
         Sort Key: ((tt1.a / 10))
         Sort Method: quicksort  Memory: 855kB
         Buffers: shared hit=163
-        ->  Seq Scan on public.tt1  (cost=0.00..263.01 rows=10001 width=4) (actual time=0.097..2.922 rows=10001 loops=1)
+        ->  Seq Scan on public.tt1  (cost=0.00..263.01 rows=10001 width=4) (actual time=0.094..3.070 rows=10001 loops=1)
               Output: (a / 10), a
               Buffers: shared hit=163
+Planning Time: 0.052 ms
+Execution Time: 17.627 ms
 
 =======
 ### TEXT-short       ###### Plan 24: Unique
-Unique  (cost=0.29..785.30 rows=10001 width=4) (actual time=0.010..7.528 rows=10001 loops=1)
+Unique  (cost=0.29..785.30 rows=10001 width=4) (actual time=0.010..7.693 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.009..4.071 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.009..4.050 rows=10001 loops=1)
         Output: a
         Heap Fetches: 10001
         Buffers: shared hit=165
+Planning Time: 0.057 ms
+Execution Time: 8.567 ms
 
 =======
 ### TEXT-short       ###### Plan 25: PlainAggregate
-Aggregate  (cost=288.01..288.02 rows=1 width=4) (actual time=3.238..3.239 rows=1 loops=1)
+Aggregate  (cost=288.01..288.02 rows=1 width=4) (actual time=3.302..3.302 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.427 rows=10001 loops=1)
+  ->  Seq Scan on public.tt1  (cost=0.00..263.01 rows=10001 width=4) (actual time=0.094..1.500 rows=10001 loops=1)
         Output: a, b, c
         Buffers: shared hit=163
+Planning Time: 0.033 ms
+Execution Time: 3.325 ms
 
 =======
-### TEXT-short       ###### Plan 26: BitmapIndexScan/BitmapHeapScan, BitmapOr
-Bitmap Heap Scan on public.tt3  (cost=202.83..998.31 rows=9765 width=12) (actual time=1.498..3.575 rows=10003 loops=1)
+### TEXT-short       ###### Plan 26: BitmapIndexScan/BitmapHeapScan, BitmapOr, lossy
+Bitmap Heap Scan on public.tt3  (cost=4255.43..7478.44 rows=180001 width=12) (actual time=27.298..65.241 rows=180000 loops=1)
   Output: a, b, c
-  Recheck Cond: ((tt3.a = 5000) OR (tt3.b = 50))
-  Buffers: shared hit=96
-  ->  BitmapOr  (cost=202.83..202.83 rows=9765 width=0) (actual time=1.486..1.486 rows=0 loops=1)
-        Buffers: shared hit=39
-        ->  Bitmap Index Scan using i_tt3_a  (cost=0.00..193.52 rows=9764 width=0) (actual time=1.480..1.480 rows=10003 loops=1)
-              Index Cond: (tt3.a = 5000)
-              Buffers: shared hit=36
-        ->  Bitmap Index Scan using i_tt3_b  (cost=0.00..4.43 rows=1 width=0) (actual time=0.006..0.006 rows=1 loops=1)
-              Index Cond: (tt3.b = 50)
-              Buffers: shared hit=3
+  Recheck Cond: (tt3.b > (-99998))
+  Rows Removed by Index Recheck: 3
+  Heap Blocks: exact=558 lossy=415
+  Buffers: shared hit=1686
+  ->  Bitmap Index Scan using i_tt3_b  (cost=0.00..4210.43 rows=180001 width=0) (actual time=27.185..27.185 rows=180000 loops=1)
+        Index Cond: (tt3.b > (-99998))
+        Buffers: shared hit=713
+Planning Time: 0.101 ms
+Execution Time: 78.996 ms
+
+=======
+### TEXT-short       ###### Plan 27: Join Filter
+Limit  (cost=0.00..21.52 rows=100 width=12) (actual time=5.307..5.431 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.306..5.414 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)
+              Output: tt2.a, tt2.b, tt2.c
+              Buffers: shared hit=1
+        ->  Materialize  (cost=0.00..4377.05 rows=180003 width=4) (actual time=0.010..4.185 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.008..1.689 rows=7101 loops=1)
+                    Output: tt3.a
+                    Buffers: shared hit=39
+Planning Time: 0.171 ms
+Execution Time: 5.538 ms
 
 =======
-### TEXT-short       ###### Plan 27: TidScan
-Tid Scan on public.tt3  (cost=0.00..4.01 rows=1 width=12) (actual time=0.003..0.003 rows=1 loops=1)
+### TEXT-short       ###### Plan 28: TidScan
+Tid Scan on public.tt3  (cost=0.00..4.01 rows=1 width=12) (actual time=0.004..0.004 rows=1 loops=1)
   Output: a, b, c
   Tid Cond: (tt3.ctid = '(0,28)'::tid)
   Buffers: shared hit=1
+Planning Time: 0.070 ms
+Execution Time: 0.017 ms
 
 =======
-### TEXT-short       ###### Plan 28: LockRows
-LockRows  (cost=0.00..313.51 rows=50 width=10) (actual time=0.106..6.666 rows=1001 loops=1)
+### TEXT-short       ###### Plan 29: LockRows
+LockRows  (cost=0.00..313.51 rows=50 width=10) (actual time=0.153..5.178 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.096..3.082 rows=1001 loops=1)
+  ->  Seq Scan on public.tt1  (cost=0.00..313.01 rows=50 width=10) (actual time=0.141..3.714 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.344 ms
 
 =======
-### TEXT-short       ###### Plan 29: Materialize
-Seq Scan on public.tt1  (cost=0.00..1150490.52 rows=5000 width=12) (actual time=4.884..4.884 rows=0 loops=1)
+### TEXT-short       ###### Plan 30: Materialize
+Seq Scan on public.tt1  (cost=0.00..1150490.52 rows=5000 width=12) (actual time=5.697..5.697 rows=0 loops=1)
   Output: tt1.a, tt1.b, tt1.c
   Filter: (SubPlan 1)
   Rows Removed by Filter: 10001
@@ -1107,9 +1204,11 @@ Seq Scan on public.tt1  (cost=0.00..1150490.52 rows=5000 width=12) (actual time=
     ->  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.007..0.007 rows=1 loops=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)
               Output: tt2.b
               Buffers: shared hit=1
+Planning Time: 0.060 ms
+Execution Time: 5.723 ms
 ###### long-json-as-a-source test
 SELECT '### '||'yaml-long JSON   '||title||E'\n'||
   pg_store_plans_yamlplan(lplan)
@@ -1125,8 +1224,8 @@ SELECT '### '||'yaml-long JSON   '||title||E'\n'||
     Total Cost: 10.00
     Plan Rows: 1000
     Plan Width: 4
-    Actual Startup Time: 259.664
-    Actual Total Time: 259.664
+    Actual Startup Time: 278.971
+    Actual Total Time: 278.971
     Actual Rows: 0
     Actual Loops: 1
     Shared Hit Blocks: 29735
@@ -1151,8 +1250,8 @@ SELECT '### '||'yaml-long JSON   '||title||E'\n'||
         Total Cost: 10.00
         Plan Rows: 1000
         Plan Width: 4
-        Actual Startup Time: 3.474
-        Actual Total Time: 9.787
+        Actual Startup Time: 3.482
+        Actual Total Time: 9.608
         Actual Rows: 10001
         Actual Loops: 1
         Output:
@@ -1172,16 +1271,17 @@ SELECT '### '||'yaml-long JSON   '||title||E'\n'||
         Temp Written Blocks: 0
         I/O Read Time: 0.000
         I/O Write Time: 0.000
-  Planning Time: 0.071
+  Planning Time: 0.073
   Triggers:
     - Trigger Name: "tt1_trig_1"
       Relation: "tt1"
-      Time: 92.091
+      Time: 99.098
       Calls: 10001
     - Trigger Name: "tt1_trig_2"
       Relation: "tt1"
-      Time: 83.320
+      Time: 87.327
       Calls: 10001
+  Execution Time: 279.599
 ##################
 SELECT '### '||'xml-long JSON    '||title||E'\n'||
   pg_store_plans_xmlplan(lplan)
@@ -1199,8 +1299,8 @@ SELECT '### '||'xml-long JSON    '||title||E'\n'||
       <Total-Cost>10.00</Total-Cost>
       <Plan-Rows>1000</Plan-Rows>
       <Plan-Width>4</Plan-Width>
-      <Actual-Startup-Time>259.664</Actual-Startup-Time>
-      <Actual-Total-Time>259.664</Actual-Total-Time>
+      <Actual-Startup-Time>278.971</Actual-Startup-Time>
+      <Actual-Total-Time>278.971</Actual-Total-Time>
       <Actual-Rows>0</Actual-Rows>
       <Actual-Loops>1</Actual-Loops>
       <Shared-Hit-Blocks>29735</Shared-Hit-Blocks>
@@ -1226,8 +1326,8 @@ SELECT '### '||'xml-long JSON    '||title||E'\n'||
           <Total-Cost>10.00</Total-Cost>
           <Plan-Rows>1000</Plan-Rows>
           <Plan-Width>4</Plan-Width>
-          <Actual-Startup-Time>3.474</Actual-Startup-Time>
-          <Actual-Total-Time>9.787</Actual-Total-Time>
+          <Actual-Startup-Time>3.482</Actual-Startup-Time>
+          <Actual-Total-Time>9.608</Actual-Total-Time>
           <Actual-Rows>10001</Actual-Rows>
           <Actual-Loops>1</Actual-Loops>
           <Output>
@@ -1251,21 +1351,22 @@ SELECT '### '||'xml-long JSON    '||title||E'\n'||
         </Item>
       </Plans>
     </Plan>
-    <Planning-Time>0.071</Planning-Time>
+    <Planning-Time>0.073</Planning-Time>
     <Triggers>
       <Item>
         <Trigger-Name>tt1_trig_1</Trigger-Name>
         <Relation>tt1</Relation>
-        <Time>92.091</Time>
+        <Time>99.098</Time>
         <Calls>10001</Calls>
       </Item>
       <Item>
         <Trigger-Name>tt1_trig_2</Trigger-Name>
         <Relation>tt1</Relation>
-        <Time>83.320</Time>
+        <Time>87.327</Time>
         <Calls>10001</Calls>
       </Item>
     </Triggers>
+    <Execution-Time>279.599</Execution-Time>
   </Query>
 </explain>
 
@@ -1286,8 +1387,8 @@ SELECT '### '||'text-long JSON   '||title||E'\n'||
       <Total-Cost>10.00</Total-Cost>
       <Plan-Rows>1000</Plan-Rows>
       <Plan-Width>4</Plan-Width>
-      <Actual-Startup-Time>259.664</Actual-Startup-Time>
-      <Actual-Total-Time>259.664</Actual-Total-Time>
+      <Actual-Startup-Time>278.971</Actual-Startup-Time>
+      <Actual-Total-Time>278.971</Actual-Total-Time>
       <Actual-Rows>0</Actual-Rows>
       <Actual-Loops>1</Actual-Loops>
       <Shared-Hit-Blocks>29735</Shared-Hit-Blocks>
@@ -1313,8 +1414,8 @@ SELECT '### '||'text-long JSON   '||title||E'\n'||
           <Total-Cost>10.00</Total-Cost>
           <Plan-Rows>1000</Plan-Rows>
           <Plan-Width>4</Plan-Width>
-          <Actual-Startup-Time>3.474</Actual-Startup-Time>
-          <Actual-Total-Time>9.787</Actual-Total-Time>
+          <Actual-Startup-Time>3.482</Actual-Startup-Time>
+          <Actual-Total-Time>9.608</Actual-Total-Time>
           <Actual-Rows>10001</Actual-Rows>
           <Actual-Loops>1</Actual-Loops>
           <Output>
@@ -1338,21 +1439,22 @@ SELECT '### '||'text-long JSON   '||title||E'\n'||
         </Item>
       </Plans>
     </Plan>
-    <Planning-Time>0.071</Planning-Time>
+    <Planning-Time>0.073</Planning-Time>
     <Triggers>
       <Item>
         <Trigger-Name>tt1_trig_1</Trigger-Name>
         <Relation>tt1</Relation>
-        <Time>92.091</Time>
+        <Time>99.098</Time>
         <Calls>10001</Calls>
       </Item>
       <Item>
         <Trigger-Name>tt1_trig_2</Trigger-Name>
         <Relation>tt1</Relation>
-        <Time>83.320</Time>
+        <Time>87.327</Time>
         <Calls>10001</Calls>
       </Item>
     </Triggers>
+    <Execution-Time>279.599</Execution-Time>
   </Query>
 </explain>
 
@@ -1368,8 +1470,8 @@ SELECT '### '||'inflate-chopped  '||title||E'\n'||
     "Total Cost": 1357.51,
     "Plan Rows": 10001,
     "Plan Width": 4,
-    "Actual Startup Time": 19.483,
-    "Actual Total Time": 19.483,
+    "Actual Startup Time": 18.707,
+    "Actual Total Time": 18.707,
     "Actual Rows": 0,
     "Actual Loops": 1,
     "Output": ["\"*SELECT* 1\".a", "(0)"],
@@ -1399,8 +1501,8 @@ SELECT '### '||'inflate-chopped  '||title||E'\n'||
         "Total Cost": 668.04,
         "Plan Rows": 10001,
         "Plan Width": 4,
-        "Actual Startup Time": 19.480,
-        "Actual Total Time": 19.480,
+        "Actual Startup Time": 18.704,
+        "Actual Total Time": 18.704,
         "Actual Rows": 0,
         "Actual Loops": 1,
         "Output": ["\"*SELECT* 1\".a", "(0)"],
@@ -1434,8 +1536,8 @@ SELECT '### '||'inflate-chopped  '||title||E'\n'||
     "Total Cost": 1357.51,
     "Plan Rows": 10001,
     "Plan Width": 4,
-    "Actual Startup Time": 23.783,
-    "Actual Total Time": 24.519,
+    "Actual Startup Time": 24.004,
+    "Actual Total Time": 24.864,
     "Actual Rows": 10001,
     "Actual Loops": 1,
     "Output": ["\"*SELECT* 1\".a", "(0)"],
@@ -1465,8 +1567,8 @@ SELECT '### '||'inflate-chopped  '||title||E'\n'||
         "Total Cost": 668.04,
         "Plan Rows": 10001,
         "Plan Width": 4,
-        "Actual Startup Time": 18.364,
-        "Actual Total Time": 19.479,
+        "Actual Startup Time": 18.469,
+        "Actual Total Time": 19.564,
         "Actual Rows": 10001,
         "Actual Loops": 1,
         "Output": ["\"*SELECT* 1\".a", "(0)"],
@@ -1500,8 +1602,8 @@ SELECT '### '||'inflate-chopped  '||title||E'\n'||
     "Total Cost": 1357.51,
     "Plan Rows": 10001,
     "Plan Width": 4,
-    "Actual Startup Time": 23.416,
-    "Actual Total Time": 24.178,
+    "Actual Startup Time": 23.660,
+    "Actual Total Time": 24.524,
     "Actual Rows": 10001,
     "Actual Loops": 1,
     "Output": ["\"*SELECT* 1\".a", "(0)"],
@@ -1531,8 +1633,8 @@ SELECT '### '||'inflate-chopped  '||title||E'\n'||
         "Total Cost": 668.04,
         "Plan Rows": 10001,
         "Plan Width": 4,
-        "Actual Startup Time": 18.185,
-        "Actual Total Time": 19.248,
+        "Actual Startup Time": 18.396,
+        "Actual Total Time": 19.526,
         "Actual Rows": 10001,
         "Actual Loops": 1,
         "Output": ["\"*SELECT* 1\".a", "(0)"],
@@ -1564,18 +1666,18 @@ SELECT '### '||'yaml-chopped     '||title||E'\n'||
 - Plan:
     Node Type: "Merge Join"
     Join Type: "Left"
-    Startup Cost: 0.58
-    Total Cost: 2409.14
-    Plan Rows: 15147
+    Startup Cost: 0.71
+    Total Cost: 4271.17
+    Plan Rows: 33467
     Plan Width: 4
-    Actual Startup Time: 0.031
-    Actual Total Time: 38.276
-    Actual Rows: 30003
+    Actual Startup Time: 0.033
+    Actual Total Time: 57.646
+    Actual Rows: 60003
     Actual Loops: 1
     Output:
       - "x.b"
     Merge Cond: "(x.a = y.a)"
-    Shared Hit Blocks: 20420
+    Shared Hit Blocks: 20942
     Shared Read Blocks: 0
     Shared Dirtied Blocks: 0
     Shared Written Blocks: 0
@@ -1602,8 +1704,8 @@ SELECT '### '||'yaml-chopped     '||title||E'\n'||
     Total Cost: 793.06
     Plan Rows: 10001
     Plan Width: 4
-    Actual Startup Time: 9.198
-    Actual Total Time: 16.568
+    Actual Startup Time: 12.175
+    Actual Total Time: 21.075
     Actual Rows: 17001
     Actual Loops: 1
     Output:
@@ -1631,7 +1733,6 @@ SELECT '### '||'yaml-chopped     '||title||E'\n'||
         Total Cost: 263.01
         Plan Rows: 10001
         Plan Width: 8
-        
 <truncated>
 
 =======
@@ -1643,8 +1744,8 @@ SELECT '### '||'yaml-chopped     '||title||E'\n'||
     Total Cost: 793.06
     Plan Rows: 10001
     Plan Width: 12
-    Actual Startup Time: 10.003
-    Actual Total Time: 10.003
+    Actual Startup Time: 10.101
+    Actual Total Time: 10.101
     Actual Rows: 0
     Actual Loops: 1
     Output:
@@ -1688,8 +1789,8 @@ SELECT '### '||'xml-chopped      '||title||E'\n'||
       <Total-Cost>693.05</Total-Cost>
       <Plan-Rows>1</Plan-Rows>
       <Plan-Width>12</Plan-Width>
-      <Actual-Startup-Time>5.458</Actual-Startup-Time>
-      <Actual-Total-Time>11.753</Actual-Total-Time>
+      <Actual-Startup-Time>5.601</Actual-Startup-Time>
+      <Actual-Total-Time>11.876</Actual-Total-Time>
       <Actual-Rows>10001</Actual-Rows>
       <Actual-Loops>1</Actual-Loops>
       <Output>
@@ -1732,8 +1833,8 @@ SELECT '### '||'xml-chopped      '||title||E'\n'||
       <Total-Cost>1127.49</Total-Cost>
       <Plan-Rows>10001</Plan-Rows>
       <Plan-Width>4</Plan-Width>
-      <Actual-Startup-Time>5.547</Actual-Startup-Time>
-      <Actual-Total-Time>16.947</Actual-Total-Time>
+      <Actual-Startup-Time>5.695</Actual-Startup-Time>
+      <Actual-Total-Time>16.316</Actual-Total-Time>
       <Actual-Rows>10001</Actual-Rows>
       <Actual-Loops>1</Actual-Loops>
       <Output>
@@ -1756,7 +1857,6 @@ SELECT '### '||'xml-chopped      '||title||E'\n'||
         <Plan>
           <Node-Type>Sort</Node-Type>
           <Parent-Relationship>Outer</Parent-Relationship>
-          <Startup-Cost>
 <truncated>
 
 =======
@@ -1770,7 +1870,7 @@ SELECT '### '||'xml-chopped      '||title||E'\n'||
       <Plan-Rows>10001</Plan-Rows>
       <Plan-Width>4</Plan-Width>
       <Actual-Startup-Time>0.010</Actual-Startup-Time>
-      <Actual-Total-Time>7.528</Actual-Total-Time>
+      <Actual-Total-Time>7.693</Actual-Total-Time>
       <Actual-Rows>10001</Actual-Rows>
       <Actual-Loops>1</Actual-Loops>
       <Output>
@@ -1791,29 +1891,30 @@ SELECT '### '||'text-chopped     '||title||E'\n'||
   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.238..3.239 rows=1 loops=1)
+Aggregate  (cost=288.01..288.02 rows=1 width=4) (actual time=3.302..3.302 rows=1 loops=1)
   Output: sum(a)
   Buffers: shared hit=163
 <truncated>
 
 =======
-### text-chopped     ###### Plan 26: BitmapIndexScan/BitmapHeapScan, BitmapOr
-Bitmap Heap Scan on public.tt3  (cost=202.83..998.31 rows=9765 width=12) (actual time=1.498..3.575 rows=10003 loops=1)
+### text-chopped     ###### Plan 26: BitmapIndexScan/BitmapHeapScan, BitmapOr, lossy
+Bitmap Heap Scan on public.tt3  (cost=4255.43..7478.44 rows=180001 width=12) (actual time=27.298..65.241 rows=180000 loops=1)
   Output: a, b, c
-  Recheck Cond: ((tt3.a = 5000) OR (tt3.b = 50))
-  Buffers: shared hit=96
+  Recheck Cond: (tt3.b > (-99998))
 <truncated>
 
 =======
-### text-chopped     ###### Plan 27: TidScan
-Tid Scan on public.tt3  (cost=0.00..4.01 rows=1 width=12)
+### text-chopped     ###### Plan 27: Join Filter
+Limit  (cost=0.00..21.52 rows=100 width=12) (actual time=5.307..5.431 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.306..5.414 rows=100 loops=1)
+        Output: tt2.a, tt2.b, tt2.c
 <truncated>
 ###### shorten test
 SELECT '### '||'shorten          '||title||E'\n'||
   pg_store_plans_shorten(lplan)
   FROM plans WHERE id = 0 ORDER BY id;
-### shorten          ###### Plan 0: 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,"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,"Unknown Key":"Unknown Value"}
 ###### normalize test
 SELECT '### '||'normalize        '||title||E'\n'||
   pg_store_plans_normalize(lplan)
index 257ba81..0086d6f 100755 (executable)
@@ -14,13 +14,19 @@ SET client_min_messages = 'notice';
 INSERT INTO plans (VALUES
 EOS
 
-$plan_no = 0;
+$plan_no = -1;
 $title = "###### Plan $plan_no: all properties";
-setplan0();
+setplan0(0);  # Without "Unknown Key"
 print "($plan_no, \'$title\',\n";
 print " $escape'$plan')";
+$plan_no--;
 
-$plan_no++;
+$title = "###### Plan $plan_no: all properties plus unknown key";
+setplan0(1);  # With "Unknown Key"
+print ",($plan_no, \'$title\',\n";
+print " $escape'$plan')";
+
+$plan_no = 1;
 $state = 0;
 while(<>) {
        chomp;
@@ -73,6 +79,9 @@ print <<'EOS';
 \echo ###### set shortened JSON
 UPDATE plans SET splan = pg_store_plans_shorten(lplan);
 
+\echo ###### tag abbreviation test
+SELECT splan FROM plans WHERE id = -1;
+
 \echo ###### JSON properties round-trip test
 SELECT id FROM plans
        where pg_store_plans_jsonplan(splan) <> lplan;
@@ -127,15 +136,16 @@ SELECT '### '||'text-chopped     '||title||E'\n'||
 \echo ###### shorten test
 SELECT '### '||'shorten          '||title||E'\n'||
   pg_store_plans_shorten(lplan)
-  FROM plans WHERE id = 0 ORDER BY id;
+  FROM plans WHERE id = -2 ORDER BY id;
 \echo ###### normalize test
 SELECT '### '||'normalize        '||title||E'\n'||
   pg_store_plans_normalize(lplan)
-  FROM plans WHERE id BETWEEN 1 AND 3 ORDER BY id;
+  FROM plans WHERE id BETWEEN 1 AND 7 ORDER BY id;
 
 EOS
 
 sub setplan0 {
+       my($addunknown) = @_;
        $plan = << 'EOS';
 {
   "Plan": 0,
@@ -256,9 +266,17 @@ sub setplan0 {
   "Rows Removed by Index Recheck": 0,
   "Time": 0,
   "Calls": 0,
-  "Unknown Key": "Unknown Value"
-}
+  "Planning Time": 0,
+  "Execution Time": 0,
+  "Exact Heap Blocks": 0,
+  "Lossy Heap Blocks": 0,
+  "Rows Removed by Join Filter": 0
 EOS
-       chop $plan;
+chop $plan;
+if ($addunknown) {
+       $plan .= ",\n  \"Unknown Key\": \"Unknown Value\"";
+}
+$plan .= "\n}";
+
 }
 
index 1bb14d6..f56c88f 100644 (file)
@@ -30,8 +30,8 @@ create trigger tt1_trig_2 before insert or update on tt1
   for each row execute procedure t_tt1_2();
 insert into tt2 (select a, -a, 'tt2' from generate_series(7000, 17000) a);
 insert into tt3 (select a, -a, 'tt3' from generate_series(0, 100000) a);
-insert into tt3 (select 5000,  a, 'tt3' from generate_series(0, 10000) a);
-insert into tt3 (select a,  555, 'tt3' from generate_series(0, 10000) a);
+insert into tt3 (select 5000,  a, 'tt3' from generate_series(0, 40000) a);
+insert into tt3 (select a,  555, 'tt3' from generate_series(0, 40000) a);
 
 \echo ###### Insert, Trigger
 explain (analyze on, buffers on, verbose on, format :format)
@@ -130,9 +130,23 @@ explain (analyze on, buffers on, verbose on, format :format)
 \echo ###### PlainAggregate
 explain (analyze on, buffers on, verbose on, format :format)
    select sum(a) from tt1;
-\echo ###### BitmapIndexScan/BitmapHeapScan, BitmapOr
-explain (analyze on, buffers on, verbose on, format :format)
-   select * from tt3 where a = 5000 or b = 50;
+\echo ###### BitmapIndexScan/BitmapHeapScan, BitmapOr, lossy
+set enable_seqscan to false;
+set work_mem to '64kB';
+explain (analyze on, buffers on, verbose on, format :format)
+   select * from tt3 where b > -99998;
+\echo ###### Join Filter
+set enable_seqscan to true;
+set enable_indexscan to false;
+set enable_bitmapscan to false;
+explain (analyze on, buffers on, verbose on, format :format)
+   SELECT tt2.* from tt2
+   LEFT OUTER JOIN tt3 ON (tt2.a < tt3.a) where tt3.a + tt2.a < 100000
+   LIMIT 100;
+reset enable_seqscan;
+reset enable_indexscan;
+reset enable_bitmapscan;
+reset work_mem;
 \echo ###### TidScan
 explain (analyze on, buffers on, verbose on, format :format)
    select * from tt3 where ctid = '(0,28)';
@@ -145,6 +159,4 @@ rollback;
 explain (analyze on, buffers on, verbose on, format :format)
    select * from tt1 where a = all(select b from tt2);
 
--- BitmapAnd
--- Inner/Right/Semi/Anti
--- ForegnScan, Material
+-- BitmapAnd/Inner/Right/ForegnScan
index 708d9b4..1d520fe 100644 (file)
@@ -83,7 +83,7 @@ word_table propfields[] =
        {P_Plans,                       "l" ,"Plans",                           NULL, true,  NULL,                              NULL},
        {P_Plan,                        "p" ,"Plan",                            NULL, true,  NULL,                              NULL},
                                                                                                                  
-                                                                                                                 
+       /* Values of these properties are masked on normalization */
        {P_FunctionCall,        "y" ,"Function Call",           NULL, false, NULL,                              SETTER(func_call)},
        {P_StartupCost,         "1" ,"Startup Cost",            NULL, false, NULL,                              SETTER(startup_cost)},
        {P_TotalCost,           "2" ,"Total Cost",                      NULL, false, NULL,                              SETTER(total_cost)},
@@ -116,6 +116,11 @@ word_table propfields[] =
        {P_RowsIdxRchkRmvd, "Y" ,"Rows Removed by Index Recheck",NULL,false, NULL,              SETTER(idxrchk_removed)},
        {P_TrgTime,                     "Z" ,"Time",                            NULL, false,  NULL,                             SETTER(trig_time)},
        {P_TrgCalls,            "z" ,"Calls",                           NULL, false,  NULL,                             SETTER(trig_calls)},
+       {P_PlanTime,            "#" ,"Planning Time",           NULL, false,  NULL,                             SETTER(plan_time)},
+       {P_ExecTime,            "$" ,"Execution Time",          NULL, false,  NULL,                             SETTER(exec_time)},
+       {P_ExactHeapBlks,       "&" ,"Exact Heap Blocks",       NULL, false,  NULL,                             SETTER(exact_heap_blks)},
+       {P_LossyHeapBlks,       "(" ,"Lossy Heap Blocks",       NULL, false,  NULL,                             SETTER(lossy_heap_blks)},
+       {P_RowsJoinFltRemvd,")" ,"Rows Removed by Join Filter", NULL, false,  NULL,             SETTER(joinfilt_removed)},
        {P_Invalid, NULL, NULL, NULL, false, NULL, NULL}
 };
 
index c5453d9..24b94ec 100644 (file)
@@ -19,62 +19,6 @@ typedef enum
 typedef const char *(converter_t)(const char *src, pgsp_parser_mode mode);
 typedef void (setter_t)(node_vals *vals, const char *val);
 
-typedef struct
-{
-       int   tag;
-       char *shortname;
-       char *longname;
-       char *textname;
-       bool  normalize_use;
-       converter_t *converter;
-       setter_t  *setter;
-} word_table;
-
-typedef struct
-{
-       StringInfo      dest;
-       pgsp_parser_mode mode;
-       node_vals *nodevals;
-       char       *org_string;
-
-       /* Working variables used internally in parser */
-       int                     level;
-       Bitmapset  *first;
-       Bitmapset  *not_item;
-       bool            remove;
-       bool            last_elem_is_object;
-       bool            processing;
-       char       *fname;
-       char       *wbuf;
-       int                     wbuflen;
-       converter_t *valconverter;
-       setter_t    *setter;
-} pgspParserContext;
-
-
-extern word_table nodetypes[];
-extern word_table strategies[];
-extern word_table propfields[];
-
-extern void init_word_index(void);
-extern word_table *search_word_table(word_table *tbl,
-                                                                                 const char *word, int mode);
-extern const char *conv_nodetype(const char *src, pgsp_parser_mode mode);
-extern const char *conv_operation(const char *src, pgsp_parser_mode mode);
-extern const char *conv_scandir(const char *src, pgsp_parser_mode mode);
-extern const char *conv_expression(const char *src, pgsp_parser_mode mode);
-extern const char *conv_relasionship(const char *src, pgsp_parser_mode mode);
-extern const char *conv_jointype(const char *src, pgsp_parser_mode mode);
-extern const char *conv_strategy(const char *src, pgsp_parser_mode mode);
-extern const char *conv_setsetopcommand(const char *src, pgsp_parser_mode mode);
-extern const char *conv_sortmethod(const char *src, pgsp_parser_mode mode);
-extern const char *conv_sortspacetype(const char *src, pgsp_parser_mode mode);
-
-extern bool run_pg_parse_json(JsonLexContext *lex, JsonSemAction *sem);
-extern void init_parser_context(pgspParserContext *ctx, int mode,
-                                                                  char *orgstr, char *buf,int buflen);
-extern void init_json_lex_context(JsonLexContext *lex, char *json);
-
 typedef enum
 {
        P_Invalid,
@@ -141,5 +85,74 @@ typedef enum
        P_RowsFilterRmvd,
        P_RowsIdxRchkRmvd,
        P_TrgTime,
-       P_TrgCalls
+       P_TrgCalls,
+       P_PlanTime,
+       P_ExecTime,
+       P_ExactHeapBlks,
+       P_LossyHeapBlks,
+       P_RowsJoinFltRemvd
 } pgsp_prop_tags;
+
+typedef struct
+{
+       pgsp_prop_tags tag;             /* Tag to identify words */
+       char *shortname;                /* Property name for short-style JSON */
+       char *longname;                 /* Property name for long(normal)-style JSON */
+       char *textname;                 /* Property name for Text representation */
+       bool  normalize_use;    /* True means this word to be used for
+                                                          normalization, which makes difference of
+                                                          plan-id */
+       converter_t *converter; /* Converter function for the property name */
+       setter_t  *setter;              /* Converter function for the property value */
+} word_table;
+
+typedef struct
+{
+       StringInfo      dest;                   /* Storage for parse result */
+       pgsp_parser_mode mode;          /* Tells what to do to the parser */
+       node_vals *nodevals;            /* Node value holder */
+       char       *org_string;         /* What to parse */
+
+       /* Working variables used internally in parser */
+       int                     level;                  /* Next (indent) level */
+       Bitmapset  *first;                      /* Bitmap set holds whether the first element
+                                                                * has been processed for each level */
+       Bitmapset  *not_item;           /* Bitmap set holds whether the node name at
+                                                                  the level was literally "Item" or not. */
+       bool            remove;                 /* True if the current node is not shown in
+                                                                * the result */
+       bool            last_elem_is_object; /* True if the last processed element
+                                                                * was not an object */
+       pgsp_prop_tags  processing;     /* Tag of the word under processing */
+       char       *fname;                      /* Field name*/
+       char       *wbuf;                       /* Working buffer */
+       int                     wbuflen;                /* Length of the working buffer */
+       converter_t *valconverter;      /* field name converter for the current
+                                                                * element */
+       setter_t    *setter;            /* value converter for the current element */
+} pgspParserContext;
+
+
+extern word_table nodetypes[];
+extern word_table strategies[];
+extern word_table propfields[];
+
+extern void init_word_index(void);
+extern word_table *search_word_table(word_table *tbl,
+                                                                                 const char *word, int mode);
+extern const char *conv_nodetype(const char *src, pgsp_parser_mode mode);
+extern const char *conv_operation(const char *src, pgsp_parser_mode mode);
+extern const char *conv_scandir(const char *src, pgsp_parser_mode mode);
+extern const char *conv_expression(const char *src, pgsp_parser_mode mode);
+extern const char *conv_relasionship(const char *src, pgsp_parser_mode mode);
+extern const char *conv_jointype(const char *src, pgsp_parser_mode mode);
+extern const char *conv_strategy(const char *src, pgsp_parser_mode mode);
+extern const char *conv_setsetopcommand(const char *src, pgsp_parser_mode mode);
+extern const char *conv_sortmethod(const char *src, pgsp_parser_mode mode);
+extern const char *conv_sortspacetype(const char *src, pgsp_parser_mode mode);
+
+extern bool run_pg_parse_json(JsonLexContext *lex, JsonSemAction *sem);
+extern void init_parser_context(pgspParserContext *ctx, int mode,
+                                                                  char *orgstr, char *buf,int buflen);
+extern void init_json_lex_context(JsonLexContext *lex, char *json);
+
index 2e779c3..d9edc7f 100644 (file)
@@ -21,6 +21,7 @@ static void print_prop_if_nz(StringInfo s, char *prepstr,
 static void json_text_objstart(void *state);
 static void json_text_objend(void *state);
 static void json_text_ofstart(void *state, char *fname, bool isnull);
+static void json_text_ofend(void *state, char *fname, bool isnull);
 static void json_text_scalar(void *state, char *token, JsonTokenType tokentype);
 
 /* Parser callbacks for plan textization */
@@ -133,6 +134,11 @@ SQLQUOTE_SETTER(trig_name);
 SQLQUOTE_SETTER(trig_relation);
 DEFAULT_SETTER(trig_time);
 DEFAULT_SETTER(trig_calls);
+DEFAULT_SETTER(plan_time);
+DEFAULT_SETTER(exec_time);
+DEFAULT_SETTER(exact_heap_blks);
+DEFAULT_SETTER(lossy_heap_blks);
+DEFAULT_SETTER(joinfilt_removed);
 
 #define ISZERO(s) (!s || strcmp(s, "0") == 0 || strcmp(s, "0.000") == 0 )
 #define HASSTRING(s) (s && strlen(s) > 0)
@@ -297,33 +303,27 @@ print_current_node(pgspParserContext *ctx)
                appendStringInfoString(s, ")");
        }
 
-       if (HASSTRING(v->actual_rows) ||
-               HASSTRING(v->actual_loops) ||
-               HASSTRING(v->actual_startup_time) ||
-               HASSTRING(v->actual_total_time))
+       if (HASSTRING(v->actual_loops) && ISZERO(v->actual_loops))
+               appendStringInfoString(s, " (never executed)");
+       else if (HASSTRING(v->actual_rows) &&
+                        HASSTRING(v->actual_loops) &&
+                        HASSTRING(v->actual_startup_time) &&
+                        HASSTRING(v->actual_total_time))
        {
-               if (ISZERO(v->actual_loops))
-               {
-                       appendStringInfoString(s, " (never executed)");
-               }
-               else
-               {
-                       appendStringInfoString(s, " (actual ");
-                       if (HASSTRING(v->actual_startup_time) ||
-                               HASSTRING(v->actual_total_time)) {
-                               appendStringInfoString(s, "time=");
-                               appendStringInfoString(s, v->actual_startup_time);
-                               appendStringInfoString(s, "..");
-                               appendStringInfoString(s, v->actual_total_time);
-                               appendStringInfoString(s, " ");
-                       }
+               appendStringInfoString(s, " (actual ");
+               appendStringInfoString(s, "time=");
+               appendStringInfoString(s, v->actual_startup_time);
+               appendStringInfoString(s, "..");
+               appendStringInfoString(s, v->actual_total_time);
+               appendStringInfoString(s, " ");
 
-                       appendStringInfoString(s, "rows=");
-                       appendStringInfoString(s, v->actual_rows);
-                       appendStringInfoString(s, " loops=");
-                       appendStringInfoString(s, v->actual_loops);
-                       appendStringInfoString(s, ")");
-               }
+               appendStringInfoString(s, "rows=");
+               appendStringInfoString(s, v->actual_rows);
+
+               appendStringInfoString(s, " loops=");
+               appendStringInfoString(s, v->actual_loops);
+
+               appendStringInfoString(s, ")");
        }
 
        if (v->output)
@@ -365,7 +365,19 @@ print_current_node(pgspParserContext *ctx)
                                                 v->filter_removed, level, exind);
        print_prop_if_nz(s, "Rows Removed by Index Recheck: ",
                                                 v->idxrchk_removed, level, exind);
-       
+       print_prop_if_nz(s, "Rows Removed by Join Filter: ",
+                                                v->joinfilt_removed, level, exind);
+
+       if (HASSTRING(v->exact_heap_blks) ||
+               HASSTRING(v->lossy_heap_blks))
+       {
+               appendStringInfoString(s, "\n");
+               appendStringInfoSpaces(s, TEXT_INDENT_DETAILS(level, exind));
+               appendStringInfoString(s, "Heap Blocks:");
+               print_prop_if_nz(s, " exact=", v->exact_heap_blks, 0, exind);
+               print_prop_if_nz(s, " lossy=", v->lossy_heap_blks, 0, exind);
+       }
+
        if (!ISZERO(v->hash_buckets))
        {
                appendStringInfoString(s, "\n");
@@ -531,10 +543,17 @@ static void
 json_text_objend(void *state)
 {
        pgspParserContext *ctx = (pgspParserContext *)state;
-       if (ctx->processing == P_Plan)
+       switch (ctx->processing)
+       {
+       case P_Plan:
                print_current_node(ctx);
-       else
+               break;
+       case P_Triggers:
                print_current_trig_node(ctx);
+               break;
+       default:
+               break;
+       }
 
        clear_nodeval(ctx->nodevals);
        ctx->last_elem_is_object = true;
@@ -555,17 +574,47 @@ json_text_ofstart(void *state, char *fname, bool isnull)
                ereport(DEBUG1,
                                (errmsg("Short JSON parser encoutered unknown field name: \"%s\", skipped.", fname),
                                 errdetail_log("INPUT: \"%s\"", ctx->org_string)));
-       }               
-       if (p && (p->tag == P_Plan || p->tag == P_Plans))
+       }
+       else
        {
-               print_current_node(ctx);
-               clear_nodeval(ctx->nodevals);
+               /* Print node immediately if next level of Plan/Plans comes */
+               if (p->tag == P_Plan || p->tag == P_Plans)
+               {
+                       print_current_node(ctx);
+                       clear_nodeval(ctx->nodevals);
+               }
+
+               
+               if (p->tag == P_Plan || p->tag == P_Triggers)
+                       ctx->processing = p->tag;
+               ctx->setter = p->setter;
        }
+}
 
-       if (p && (p->tag == P_Plan || p->tag == P_Triggers))
-               ctx->processing = p->tag;
+static void
+json_text_ofend(void *state, char *fname, bool isnull)
+{
+       pgspParserContext *ctx = (pgspParserContext *)state;
+       node_vals *v = ctx->nodevals;
 
-       ctx->setter = (p ? p->setter : NULL);
+       /* Planning/Execution time to be appeared at the end of plan */
+       if (HASSTRING(v->plan_time) ||
+               HASSTRING(v->exec_time))
+       {
+               if (HASSTRING(v->plan_time))
+               {
+                       appendStringInfoString(ctx->dest, "\nPlanning Time: ");
+                       appendStringInfoString(ctx->dest, v->plan_time);
+                       appendStringInfoString(ctx->dest, " ms");
+               }
+               else
+               {
+                       appendStringInfoString(ctx->dest, "\nExecution Time: ");
+                       appendStringInfoString(ctx->dest, v->exec_time);
+                       appendStringInfoString(ctx->dest, " ms");
+               }
+               clear_nodeval(v);
+       }
 }
 
 static void
@@ -595,7 +644,7 @@ pgsp_json_textize(char *json)
        sem.array_start        = NULL;
        sem.array_end          = NULL;
        sem.object_field_start = json_text_ofstart;
-       sem.object_field_end   = NULL;
+       sem.object_field_end   = json_text_ofend;
        sem.array_element_start= NULL;
        sem.array_element_end  = NULL;
        sem.scalar             = json_text_scalar;
index 688fd03..5c7fe39 100644 (file)
@@ -54,11 +54,15 @@ typedef struct
        const char *io_write_time;
        const char *filter_removed;
        const char *idxrchk_removed;
-
        const char *trig_name;
        const char *trig_relation;
        const char *trig_time;
-       const char * trig_calls;
+       const char *trig_calls;
+       const char *plan_time;
+       const char *exec_time;
+       const char *exact_heap_blks;
+       const char *lossy_heap_blks;
+       const char *joinfilt_removed;
 } node_vals;
 
 #define SETTER(name) pgsp_node_set_##name
@@ -110,7 +114,6 @@ SETTERDECL(org_hash_batches);
 SETTERDECL(peak_memory_usage);
 SETTERDECL(filter_removed);
 SETTERDECL(idxrchk_removed);
-
 SETTERDECL(actual_startup_time);
 SETTERDECL(actual_total_time);
 SETTERDECL(actual_rows);
@@ -132,3 +135,8 @@ SETTERDECL(trig_name);
 SETTERDECL(trig_relation);
 SETTERDECL(trig_time);
 SETTERDECL(trig_calls);
+SETTERDECL(plan_time);
+SETTERDECL(exec_time);
+SETTERDECL(exact_heap_blks);
+SETTERDECL(lossy_heap_blks);
+SETTERDECL(joinfilt_removed);
index b012267..60bc60c 100644 (file)
@@ -9,7 +9,7 @@ SET client_min_messages = 'notice';
 
 \echo ###### insert original JSON plans
 INSERT INTO plans (VALUES
-(0, '###### Plan 0: all properties',
+(-1, '###### Plan -1: all properties',
  '{
   "Plan": 0,
   "Plans": 0,
@@ -129,6 +129,136 @@ INSERT INTO plans (VALUES
   "Rows Removed by Index Recheck": 0,
   "Time": 0,
   "Calls": 0,
+  "Planning Time": 0,
+  "Execution Time": 0,
+  "Exact Heap Blocks": 0,
+  "Lossy Heap Blocks": 0,
+  "Rows Removed by Join Filter": 0
+}'),(-2, '###### Plan -2: all properties plus unknown key',
+ '{
+  "Plan": 0,
+  "Plans": 0,
+  "Node Type": "Result",
+  "Node Type": "ModifyTable",
+  "Node Type": "Append",
+  "Node Type": "Merge Append",
+  "Node Type": "Recursive Union",
+  "Node Type": "BitmapAnd",
+  "Node Type": "BitmapOr",
+  "Node Type": "Seq Scan",
+  "Node Type": "Index Scan",
+  "Node Type": "Index Only Scan",
+  "Node Type": "Bitmap Index Scan",
+  "Node Type": "Bitmap Heap Scan",
+  "Node Type": "Tid Scan",
+  "Node Type": "Subquery Scan",
+  "Node Type": "Function Scan",
+  "Node Type": "Values Scan",
+  "Node Type": "CTE Scan",
+  "Node Type": "Workable Scan",
+  "Node Type": "Foreign Scan",
+  "Node Type": "Nested Loop",
+  "Node Type": "Merge Join",
+  "Node Type": "Hash Join",
+  "Node Type": "Materialize",
+  "Node Type": "Sort",
+  "Node Type": "Group",
+  "Node Type": "Aggregate",
+  "Node Type": "WindowAgg",
+  "Node Type": "Unique",
+  "Node Type": "Hash",
+  "Node Type": "SetOp",
+  "Node Type": "LockRows",
+  "Node Type": "Limit",
+  "Parent Relationship": "Outer",
+  "Parent Relationship": "Inner",
+  "Parent Relationship": "Subquery",
+  "Parent Relationship": "Member",
+  "Parent Relationship": "InitPlan",
+  "Parent Relationship": "SubPlan",
+  "Scan Direction": "Backward",
+  "Scan Direction": "NoMovement",
+  "Scan Direction": "Forward",
+  "Index Name": 0,
+  "Relation Name": 0,
+  "Function Name": 0,
+  "CTE Name": 0,
+  "Schema": 0,
+  "Alias": 0,
+  "Output": "[]",
+  "Merge Cond": "a",
+  "Strategy": "Plain",
+  "Strategy": "Sorted",
+  "Strategy": "Hashed",
+  "Join Type": "Inner",
+  "Join Type": "Left",
+  "Join Type": "Full",
+  "Join Type": "Right",
+  "Join Type": "Semi",
+  "Join Type": "Anti",
+  "Command": "Intersect",
+  "Command": "Intersect All",
+  "Command": "Except",
+  "Command": "Except All",
+  "Sort Method": "top-N heapsort",
+  "Sort Method": "quicksort",
+  "Sort Method": "external sort",
+  "Sort Method": "external merge",
+  "Sort Method": "still in progress",
+  "Sort Key": "a",
+  "Filter": "a",
+  "Join Filter": "a",
+  "Hash Cond": "a",
+  "Index Cond": "a",
+  "TID Cond": "a",
+  "Recheck Cond": "a",
+  "Operation": "Insert",
+  "Operation": "Delete",
+  "Operation": "Update",
+  "Subplan Name": "a",
+  "Triggers": 0,
+  "Trigger": 0,
+  "Trigger Name": 0,
+  "Relation": 0,
+  "Constraint Name": 0,
+  "Function Call": 0,
+  "Startup Cost": 0,
+  "Total Cost": 0,
+  "Plan Rows": 0,
+  "Plan Width": 0,
+  "Actual Startup Time": 0,
+  "Actual Total Time": 0,
+  "Actual Rows": 0,
+  "Actual Loops": 0,
+  "Heap Fetches": 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,
+  "I/O Write Time": 0,
+  "Sort Space Used": 0,
+  "Sort Space Type": "Disk",
+  "Sort Space Type": "Memory",
+  "Peak Memory Usage": 0,
+  "Original Hash Batches": 0,
+  "Hash Batches": 0,
+  "Hash Buckets": 0,
+  "Rows Removed by Filter": 0,
+  "Rows Removed by Index Recheck": 0,
+  "Time": 0,
+  "Calls": 0,
+  "Planning Time": 0,
+  "Execution Time": 0,
+  "Exact Heap Blocks": 0,
+  "Lossy Heap Blocks": 0,
+  "Rows Removed by Join Filter": 0,
   "Unknown Key": "Unknown Value"
 }'),
 (1, '###### Plan 1: Insert, Trigger',
@@ -143,8 +273,8 @@ INSERT INTO plans (VALUES
     "Total Cost": 10.00,
     "Plan Rows": 1000,
     "Plan Width": 4,
-    "Actual Startup Time": 259.664,
-    "Actual Total Time": 259.664,
+    "Actual Startup Time": 278.971,
+    "Actual Total Time": 278.971,
     "Actual Rows": 0,
     "Actual Loops": 1,
     "Shared Hit Blocks": 29735,
@@ -170,8 +300,8 @@ INSERT INTO plans (VALUES
         "Total Cost": 10.00,
         "Plan Rows": 1000,
         "Plan Width": 4,
-        "Actual Startup Time": 3.474,
-        "Actual Total Time": 9.787,
+        "Actual Startup Time": 3.482,
+        "Actual Total Time": 9.608,
         "Actual Rows": 10001,
         "Actual Loops": 1,
         "Output": ["a.a", "NULL::integer", "NULL::text"],
@@ -191,21 +321,22 @@ INSERT INTO plans (VALUES
       }
     ]
   },
-  "Planning Time": 0.071,
+  "Planning Time": 0.073,
   "Triggers": [
     {
       "Trigger Name": "tt1_trig_1",
       "Relation": "tt1",
-      "Time": 92.091,
+      "Time": 99.098,
       "Calls": 10001
     },
     {
       "Trigger Name": "tt1_trig_2",
       "Relation": "tt1",
-      "Time": 83.320,
+      "Time": 87.327,
       "Calls": 10001
     }
-  ]
+  ],
+  "Execution Time": 279.599
 }'),
 (2, '###### Plan 2: Update, Trigger',
  '{
@@ -219,8 +350,8 @@ INSERT INTO plans (VALUES
     "Total Cost": 134.75,
     "Plan Rows": 6380,
     "Plan Width": 46,
-    "Actual Startup Time": 319.686,
-    "Actual Total Time": 319.686,
+    "Actual Startup Time": 341.462,
+    "Actual Total Time": 341.462,
     "Actual Rows": 0,
     "Actual Loops": 1,
     "Shared Hit Blocks": 50276,
@@ -246,8 +377,8 @@ INSERT INTO plans (VALUES
         "Total Cost": 134.75,
         "Plan Rows": 6380,
         "Plan Width": 46,
-        "Actual Startup Time": 0.040,
-        "Actual Total Time": 10.294,
+        "Actual Startup Time": 0.039,
+        "Actual Total Time": 10.562,
         "Actual Rows": 10001,
         "Actual Loops": 1,
         "Output": ["(a + 1)", "b", "c", "ctid"],
@@ -266,21 +397,22 @@ INSERT INTO plans (VALUES
       }
     ]
   },
-  "Planning Time": 0.189,
+  "Planning Time": 0.190,
   "Triggers": [
     {
       "Trigger Name": "tt1_trig_1",
       "Relation": "tt1",
-      "Time": 99.372,
+      "Time": 106.223,
       "Calls": 10001
     },
     {
       "Trigger Name": "tt1_trig_2",
       "Relation": "tt1",
-      "Time": 85.554,
+      "Time": 89.765,
       "Calls": 10001
     }
-  ]
+  ],
+  "Execution Time": 341.510
 }'),
 (3, '###### Plan 3: Delete',
  '{
@@ -294,8 +426,8 @@ INSERT INTO plans (VALUES
     "Total Cost": 298.66,
     "Plan Rows": 63,
     "Plan Width": 6,
-    "Actual Startup Time": 13.935,
-    "Actual Total Time": 13.935,
+    "Actual Startup Time": 16.121,
+    "Actual Total Time": 16.121,
     "Actual Rows": 0,
     "Actual Loops": 1,
     "Shared Hit Blocks": 1109,
@@ -321,8 +453,8 @@ INSERT INTO plans (VALUES
         "Total Cost": 298.66,
         "Plan Rows": 63,
         "Plan Width": 6,
-        "Actual Startup Time": 3.462,
-        "Actual Total Time": 11.007,
+        "Actual Startup Time": 3.838,
+        "Actual Total Time": 9.672,
         "Actual Rows": 1000,
         "Actual Loops": 1,
         "Output": ["ctid"],
@@ -343,9 +475,10 @@ INSERT INTO plans (VALUES
       }
     ]
   },
-  "Planning Time": 0.149,
+  "Planning Time": 0.151,
   "Triggers": [
-  ]
+  ],
+  "Execution Time": 16.159
 }'),
 (4, '###### Plan 4: Result, Append Seq Scan',
  '{
@@ -355,8 +488,8 @@ INSERT INTO plans (VALUES
     "Total Cost": 418.02,
     "Plan Rows": 20002,
     "Plan Width": 8,
-    "Actual Startup Time": 2.871,
-    "Actual Total Time": 16.467,
+    "Actual Startup Time": 2.456,
+    "Actual Total Time": 18.463,
     "Actual Rows": 20002,
     "Actual Loops": 1,
     "Output": ["((tt1.a + 1))", "(3)", "1"],
@@ -380,8 +513,8 @@ INSERT INTO plans (VALUES
         "Total Cost": 418.02,
         "Plan Rows": 20002,
         "Plan Width": 8,
-        "Actual Startup Time": 2.869,
-        "Actual Total Time": 11.693,
+        "Actual Startup Time": 2.455,
+        "Actual Total Time": 13.035,
         "Actual Rows": 20002,
         "Actual Loops": 1,
         "Shared Hit Blocks": 218,
@@ -407,8 +540,8 @@ INSERT INTO plans (VALUES
             "Total Cost": 263.01,
             "Plan Rows": 10001,
             "Plan Width": 8,
-            "Actual Startup Time": 2.868,
-            "Actual Total Time": 6.490,
+            "Actual Startup Time": 2.454,
+            "Actual Total Time": 7.270,
             "Actual Rows": 10001,
             "Actual Loops": 1,
             "Output": ["(tt1.a + 1)", "3"],
@@ -435,8 +568,8 @@ INSERT INTO plans (VALUES
             "Total Cost": 155.01,
             "Plan Rows": 10001,
             "Plan Width": 8,
-            "Actual Startup Time": 0.007,
-            "Actual Total Time": 2.445,
+            "Actual Startup Time": 0.006,
+            "Actual Total Time": 2.516,
             "Actual Rows": 10001,
             "Actual Loops": 1,
             "Output": ["tt2.a", "4"],
@@ -457,9 +590,10 @@ INSERT INTO plans (VALUES
       }
     ]
   },
-  "Planning Time": 0.468,
+  "Planning Time": 0.396,
   "Triggers": [
-  ]
+  ],
+  "Execution Time": 20.432
 }'),
 (5, '###### Plan 5: Index scan (forward) ANY, array in expr, escape',
  E'{
@@ -474,8 +608,8 @@ INSERT INTO plans (VALUES
     "Total Cost": 21.21,
     "Plan Rows": 4,
     "Plan Width": 12,
-    "Actual Startup Time": 0.005,
-    "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"],
@@ -494,9 +628,10 @@ INSERT INTO plans (VALUES
     "I/O Read Time": 0.000,
     "I/O Write Time": 0.000
   },
-  "Planning Time": 0.088,
+  "Planning Time": 0.160,
   "Triggers": [
-  ]
+  ],
+  "Execution Time": 0.114
 }'),
 (6, '###### Plan 6: Index scan (backward), MergeJoin, Sort, quichsort, alias',
  '{
@@ -506,8 +641,8 @@ INSERT INTO plans (VALUES
     "Total Cost": 820.79,
     "Plan Rows": 10,
     "Plan Width": 12,
-    "Actual Startup Time": 15.390,
-    "Actual Total Time": 15.390,
+    "Actual Startup Time": 17.722,
+    "Actual Total Time": 17.722,
     "Actual Rows": 0,
     "Actual Loops": 1,
     "Output": ["x.b", "x.c", "x.a"],
@@ -532,8 +667,8 @@ INSERT INTO plans (VALUES
         "Total Cost": 1854.80,
         "Plan Rows": 10001,
         "Plan Width": 12,
-        "Actual Startup Time": 15.387,
-        "Actual Total Time": 15.387,
+        "Actual Startup Time": 17.721,
+        "Actual Total Time": 17.721,
         "Actual Rows": 0,
         "Actual Loops": 1,
         "Output": ["x.b", "x.c", "x.a"],
@@ -563,8 +698,8 @@ INSERT INTO plans (VALUES
             "Total Cost": 760.30,
             "Plan Rows": 10001,
             "Plan Width": 12,
-            "Actual Startup Time": 0.029,
-            "Actual Total Time": 0.029,
+            "Actual Startup Time": 0.030,
+            "Actual Total Time": 0.030,
             "Actual Rows": 1,
             "Actual Loops": 1,
             "Output": ["x.a", "x.b", "x.c"],
@@ -588,8 +723,8 @@ INSERT INTO plans (VALUES
             "Total Cost": 844.47,
             "Plan Rows": 10001,
             "Plan Width": 4,
-            "Actual Startup Time": 12.880,
-            "Actual Total Time": 13.558,
+            "Actual Startup Time": 15.127,
+            "Actual Total Time": 15.873,
             "Actual Rows": 10001,
             "Actual Loops": 1,
             "Output": ["y.b", "(((- y.b) * 3))"],
@@ -620,8 +755,8 @@ INSERT INTO plans (VALUES
                 "Total Cost": 155.01,
                 "Plan Rows": 10001,
                 "Plan Width": 4,
-                "Actual Startup Time": 0.018,
-                "Actual Total Time": 5.780,
+                "Actual Startup Time": 0.017,
+                "Actual Total Time": 7.124,
                 "Actual Rows": 10001,
                 "Actual Loops": 1,
                 "Output": ["y.b", "((- y.b) * 3)"],
@@ -644,9 +779,10 @@ INSERT INTO plans (VALUES
       }
     ]
   },
-  "Planning Time": 0.409,
+  "Planning Time": 0.422,
   "Triggers": [
-  ]
+  ],
+  "Execution Time": 17.968
 }'),
 (7, '###### Plan 7: IndexOnlyScan',
  '{
@@ -661,8 +797,8 @@ INSERT INTO plans (VALUES
     "Total Cost": 8.46,
     "Plan Rows": 10,
     "Plan Width": 4,
-    "Actual Startup Time": 0.014,
-    "Actual Total Time": 0.031,
+    "Actual Startup Time": 0.015,
+    "Actual Total Time": 0.033,
     "Actual Rows": 10,
     "Actual Loops": 1,
     "Output": ["a"],
@@ -682,9 +818,10 @@ INSERT INTO plans (VALUES
     "I/O Read Time": 0.000,
     "I/O Write Time": 0.000
   },
-  "Planning Time": 0.066,
+  "Planning Time": 0.065,
   "Triggers": [
-  ]
+  ],
+  "Execution Time": 0.049
 }'),
 (8, '###### Plan 8: Plain Aggregate, CTE, Recursive Union, WorkTable Scan, CTE Scan',
  '{
@@ -695,8 +832,8 @@ INSERT INTO plans (VALUES
     "Total Cost": 3.66,
     "Plan Rows": 1,
     "Plan Width": 4,
-    "Actual Startup Time": 0.038,
-    "Actual Total Time": 0.038,
+    "Actual Startup Time": 0.034,
+    "Actual Total Time": 0.034,
     "Actual Rows": 1,
     "Actual Loops": 1,
     "Output": ["sum(cte1.a)"],
@@ -721,8 +858,8 @@ INSERT INTO plans (VALUES
         "Total Cost": 2.95,
         "Plan Rows": 31,
         "Plan Width": 4,
-        "Actual Startup Time": 0.002,
-        "Actual Total Time": 0.023,
+        "Actual Startup Time": 0.001,
+        "Actual Total Time": 0.022,
         "Actual Rows": 10,
         "Actual Loops": 1,
         "Shared Hit Blocks": 0,
@@ -745,8 +882,8 @@ INSERT INTO plans (VALUES
             "Total Cost": 0.01,
             "Plan Rows": 1,
             "Plan Width": 0,
-            "Actual Startup Time": 0.001,
-            "Actual Total Time": 0.001,
+            "Actual Startup Time": 0.000,
+            "Actual Total Time": 0.000,
             "Actual Rows": 1,
             "Actual Loops": 1,
             "Output": ["1"],
@@ -804,7 +941,7 @@ INSERT INTO plans (VALUES
         "Plan Rows": 31,
         "Plan Width": 4,
         "Actual Startup Time": 0.003,
-        "Actual Total Time": 0.031,
+        "Actual Total Time": 0.027,
         "Actual Rows": 10,
         "Actual Loops": 1,
         "Output": ["cte1.a"],
@@ -823,9 +960,10 @@ INSERT INTO plans (VALUES
       }
     ]
   },
-  "Planning Time": 0.082,
+  "Planning Time": 0.075,
   "Triggers": [
-  ]
+  ],
+  "Execution Time": 0.072
 }'),
 (9, '###### Plan 9: FunctionScan, Hash/HashJoin, Nested Loop',
  '{
@@ -836,8 +974,8 @@ INSERT INTO plans (VALUES
     "Total Cost": 2.69,
     "Plan Rows": 1,
     "Plan Width": 64,
-    "Actual Startup Time": 0.046,
-    "Actual Total Time": 0.048,
+    "Actual Startup Time": 0.052,
+    "Actual Total Time": 0.054,
     "Actual Rows": 1,
     "Actual Loops": 1,
     "Output": ["d.datname"],
@@ -862,8 +1000,8 @@ INSERT INTO plans (VALUES
         "Total Cost": 2.41,
         "Plan Rows": 1,
         "Plan Width": 4,
-        "Actual Startup Time": 0.038,
-        "Actual Total Time": 0.039,
+        "Actual Startup Time": 0.043,
+        "Actual Total Time": 0.044,
         "Actual Rows": 1,
         "Actual Loops": 1,
         "Output": ["s.datid"],
@@ -891,8 +1029,8 @@ INSERT INTO plans (VALUES
             "Total Cost": 1.00,
             "Plan Rows": 100,
             "Plan Width": 8,
-            "Actual Startup Time": 0.025,
-            "Actual Total Time": 0.025,
+            "Actual Startup Time": 0.029,
+            "Actual Total Time": 0.029,
             "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"],
@@ -949,8 +1087,8 @@ INSERT INTO plans (VALUES
                 "Total Cost": 1.01,
                 "Plan Rows": 1,
                 "Plan Width": 4,
-                "Actual Startup Time": 0.002,
-                "Actual Total Time": 0.002,
+                "Actual Startup Time": 0.003,
+                "Actual Total Time": 0.004,
                 "Actual Rows": 1,
                 "Actual Loops": 1,
                 "Output": ["u.oid"],
@@ -983,8 +1121,8 @@ INSERT INTO plans (VALUES
         "Total Cost": 0.27,
         "Plan Rows": 1,
         "Plan Width": 68,
-        "Actual Startup Time": 0.004,
-        "Actual Total Time": 0.005,
+        "Actual Startup Time": 0.005,
+        "Actual Total Time": 0.006,
         "Actual Rows": 1,
         "Actual Loops": 1,
         "Output": ["d.datname", "d.oid"],
@@ -1005,9 +1143,10 @@ INSERT INTO plans (VALUES
       }
     ]
   },
-  "Planning Time": 0.403,
+  "Planning Time": 0.463,
   "Triggers": [
-  ]
+  ],
+  "Execution Time": 0.143
 }'),
 (10, '###### Plan 10: MergeAppend, Values',
  E'{
@@ -1017,8 +1156,8 @@ INSERT INTO plans (VALUES
     "Total Cost": 985.44,
     "Plan Rows": 10004,
     "Plan Width": 4,
-    "Actual Startup Time": 0.035,
-    "Actual Total Time": 24.103,
+    "Actual Startup Time": 0.024,
+    "Actual Total Time": 21.501,
     "Actual Rows": 10004,
     "Actual Loops": 1,
     "Sort Key": ["tt1.a"],
@@ -1047,8 +1186,8 @@ INSERT INTO plans (VALUES
         "Total Cost": 760.30,
         "Plan Rows": 10001,
         "Plan Width": 4,
-        "Actual Startup Time": 0.020,
-        "Actual Total Time": 21.640,
+        "Actual Startup Time": 0.013,
+        "Actual Total Time": 19.370,
         "Actual Rows": 10001,
         "Actual Loops": 1,
         "Output": ["tt1.a"],
@@ -1073,8 +1212,8 @@ INSERT INTO plans (VALUES
         "Total Cost": 0.07,
         "Plan Rows": 3,
         "Plan Width": 4,
-        "Actual Startup Time": 0.013,
-        "Actual Total Time": 0.015,
+        "Actual Startup Time": 0.009,
+        "Actual Total Time": 0.010,
         "Actual Rows": 3,
         "Actual Loops": 1,
         "Output": ["\\"*VALUES*\\".column1"],
@@ -1103,8 +1242,8 @@ INSERT INTO plans (VALUES
             "Total Cost": 0.04,
             "Plan Rows": 3,
             "Plan Width": 4,
-            "Actual Startup Time": 0.002,
-            "Actual Total Time": 0.005,
+            "Actual Startup Time": 0.001,
+            "Actual Total Time": 0.002,
             "Actual Rows": 3,
             "Actual Loops": 1,
             "Output": ["\\"*VALUES*\\".column1"],
@@ -1125,9 +1264,10 @@ INSERT INTO plans (VALUES
       }
     ]
   },
-  "Planning Time": 0.177,
+  "Planning Time": 0.113,
   "Triggers": [
-  ]
+  ],
+  "Execution Time": 22.775
 }'),
 (11, '###### Plan 11: Append, HashAggregate',
  '{
@@ -1138,8 +1278,8 @@ INSERT INTO plans (VALUES
     "Total Cost": 868.06,
     "Plan Rows": 20002,
     "Plan Width": 4,
-    "Actual Startup Time": 14.110,
-    "Actual Total Time": 17.847,
+    "Actual Startup Time": 14.818,
+    "Actual Total Time": 18.534,
     "Actual Rows": 20002,
     "Actual Loops": 1,
     "Output": ["tt1.a"],
@@ -1165,7 +1305,7 @@ INSERT INTO plans (VALUES
         "Plan Rows": 20002,
         "Plan Width": 4,
         "Actual Startup Time": 0.093,
-        "Actual Total Time": 7.210,
+        "Actual Total Time": 7.837,
         "Actual Rows": 20002,
         "Actual Loops": 1,
         "Shared Hit Blocks": 218,
@@ -1191,8 +1331,8 @@ INSERT INTO plans (VALUES
             "Total Cost": 263.01,
             "Plan Rows": 10001,
             "Plan Width": 4,
-            "Actual Startup Time": 0.093,
-            "Actual Total Time": 2.267,
+            "Actual Startup Time": 0.092,
+            "Actual Total Time": 2.656,
             "Actual Rows": 10001,
             "Actual Loops": 1,
             "Output": ["tt1.a"],
@@ -1220,7 +1360,7 @@ INSERT INTO plans (VALUES
             "Plan Rows": 10001,
             "Plan Width": 4,
             "Actual Startup Time": 0.007,
-            "Actual Total Time": 2.349,
+            "Actual Total Time": 2.497,
             "Actual Rows": 10001,
             "Actual Loops": 1,
             "Output": ["tt2.b"],
@@ -1241,9 +1381,10 @@ INSERT INTO plans (VALUES
       }
     ]
   },
-  "Planning Time": 0.056,
+  "Planning Time": 0.055,
   "Triggers": [
-  ]
+  ],
+  "Execution Time": 20.497
 }'),
 (12, '###### Plan 12: GroupAggregate',
  '{
@@ -1254,8 +1395,8 @@ INSERT INTO plans (VALUES
     "Total Cost": 1242.49,
     "Plan Rows": 10001,
     "Plan Width": 8,
-    "Actual Startup Time": 11.262,
-    "Actual Total Time": 20.921,
+    "Actual Startup Time": 11.010,
+    "Actual Total Time": 20.888,
     "Actual Rows": 10001,
     "Actual Loops": 1,
     "Output": ["sum(a)", "b"],
@@ -1280,8 +1421,8 @@ INSERT INTO plans (VALUES
         "Total Cost": 1092.47,
         "Plan Rows": 10001,
         "Plan Width": 8,
-        "Actual Startup Time": 11.258,
-        "Actual Total Time": 14.792,
+        "Actual Startup Time": 11.006,
+        "Actual Total Time": 14.448,
         "Actual Rows": 10001,
         "Actual Loops": 1,
         "Output": ["b", "a"],
@@ -1312,8 +1453,8 @@ INSERT INTO plans (VALUES
             "Total Cost": 263.01,
             "Plan Rows": 10001,
             "Plan Width": 8,
-            "Actual Startup Time": 0.107,
-            "Actual Total Time": 2.551,
+            "Actual Startup Time": 0.101,
+            "Actual Total Time": 2.406,
             "Actual Rows": 10001,
             "Actual Loops": 1,
             "Output": ["b", "a"],
@@ -1334,9 +1475,10 @@ INSERT INTO plans (VALUES
       }
     ]
   },
-  "Planning Time": 0.044,
+  "Planning Time": 0.043,
   "Triggers": [
-  ]
+  ],
+  "Execution Time": 22.187
 }'),
 (13, '###### Plan 13: Group',
  '{
@@ -1346,8 +1488,8 @@ INSERT INTO plans (VALUES
     "Total Cost": 1117.47,
     "Plan Rows": 10001,
     "Plan Width": 4,
-    "Actual Startup Time": 10.339,
-    "Actual Total Time": 17.991,
+    "Actual Startup Time": 10.899,
+    "Actual Total Time": 18.359,
     "Actual Rows": 10001,
     "Actual Loops": 1,
     "Output": ["b"],
@@ -1372,8 +1514,8 @@ INSERT INTO plans (VALUES
         "Total Cost": 1092.47,
         "Plan Rows": 10001,
         "Plan Width": 4,
-        "Actual Startup Time": 10.338,
-        "Actual Total Time": 13.621,
+        "Actual Startup Time": 10.898,
+        "Actual Total Time": 14.260,
         "Actual Rows": 10001,
         "Actual Loops": 1,
         "Output": ["b"],
@@ -1404,8 +1546,8 @@ INSERT INTO plans (VALUES
             "Total Cost": 263.01,
             "Plan Rows": 10001,
             "Plan Width": 4,
-            "Actual Startup Time": 0.094,
-            "Actual Total Time": 2.299,
+            "Actual Startup Time": 0.092,
+            "Actual Total Time": 2.408,
             "Actual Rows": 10001,
             "Actual Loops": 1,
             "Output": ["b"],
@@ -1428,7 +1570,8 @@ INSERT INTO plans (VALUES
   },
   "Planning Time": 0.032,
   "Triggers": [
-  ]
+  ],
+  "Execution Time": 19.300
 }'),
 (14, '###### Plan 14: SetOp intersect, SbuqueryScan',
  E'{
@@ -1438,8 +1581,8 @@ INSERT INTO plans (VALUES
     "Total Cost": 1357.51,
     "Plan Rows": 10001,
     "Plan Width": 4,
-    "Actual Startup Time": 17.539,
-    "Actual Total Time": 17.539,
+    "Actual Startup Time": 18.443,
+    "Actual Total Time": 18.443,
     "Actual Rows": 0,
     "Actual Loops": 1,
     "Output": ["\\"*SELECT* 1\\".a", "(0)"],
@@ -1469,8 +1612,8 @@ INSERT INTO plans (VALUES
         "Total Cost": 668.04,
         "Plan Rows": 10001,
         "Plan Width": 4,
-        "Actual Startup Time": 17.535,
-        "Actual Total Time": 17.535,
+        "Actual Startup Time": 18.440,
+        "Actual Total Time": 18.440,
         "Actual Rows": 0,
         "Actual Loops": 1,
         "Output": ["\\"*SELECT* 1\\".a", "(0)"],
@@ -1494,8 +1637,8 @@ INSERT INTO plans (VALUES
             "Total Cost": 618.04,
             "Plan Rows": 20002,
             "Plan Width": 4,
-            "Actual Startup Time": 0.099,
-            "Actual Total Time": 11.794,
+            "Actual Startup Time": 0.096,
+            "Actual Total Time": 12.268,
             "Actual Rows": 20002,
             "Actual Loops": 1,
             "Shared Hit Blocks": 218,
@@ -1519,8 +1662,8 @@ INSERT INTO plans (VALUES
                 "Total Cost": 363.02,
                 "Plan Rows": 10001,
                 "Plan Width": 4,
-                "Actual Startup Time": 0.098,
-                "Actual Total Time": 4.665,
+                "Actual Startup Time": 0.096,
+                "Actual Total Time": 4.961,
                 "Actual Rows": 10001,
                 "Actual Loops": 1,
                 "Output": ["\\"*SELECT* 1\\".a", "0"],
@@ -1547,8 +1690,8 @@ INSERT INTO plans (VALUES
                     "Total Cost": 263.01,
                     "Plan Rows": 10001,
                     "Plan Width": 4,
-                    "Actual Startup Time": 0.098,
-                    "Actual Total Time": 2.472,
+                    "Actual Startup Time": 0.095,
+                    "Actual Total Time": 2.556,
                     "Actual Rows": 10001,
                     "Actual Loops": 1,
                     "Output": ["tt1.a"],
@@ -1576,7 +1719,7 @@ INSERT INTO plans (VALUES
                 "Plan Rows": 10001,
                 "Plan Width": 4,
                 "Actual Startup Time": 0.007,
-                "Actual Total Time": 4.507,
+                "Actual Total Time": 4.645,
                 "Actual Rows": 10001,
                 "Actual Loops": 1,
                 "Output": ["\\"*SELECT* 2\\".b", "1"],
@@ -1604,7 +1747,7 @@ INSERT INTO plans (VALUES
                     "Plan Rows": 10001,
                     "Plan Width": 4,
                     "Actual Startup Time": 0.007,
-                    "Actual Total Time": 2.314,
+                    "Actual Total Time": 2.398,
                     "Actual Rows": 10001,
                     "Actual Loops": 1,
                     "Output": ["tt2.b"],
@@ -1629,9 +1772,10 @@ INSERT INTO plans (VALUES
       }
     ]
   },
-  "Planning Time": 0.068,
+  "Planning Time": 0.066,
   "Triggers": [
-  ]
+  ],
+  "Execution Time": 18.676
 }'),
 (15, '###### Plan 15: Sorted SetOp, Sort on Disk',
  E'{
@@ -1643,8 +1787,8 @@ INSERT INTO plans (VALUES
     "Total Cost": 2423.48,
     "Plan Rows": 10001,
     "Plan Width": 4,
-    "Actual Startup Time": 45.010,
-    "Actual Total Time": 45.010,
+    "Actual Startup Time": 46.670,
+    "Actual Total Time": 46.670,
     "Actual Rows": 0,
     "Actual Loops": 1,
     "Output": ["\\"*SELECT* 1\\".a", "(0)"],
@@ -1668,8 +1812,8 @@ INSERT INTO plans (VALUES
         "Total Cost": 2373.47,
         "Plan Rows": 20002,
         "Plan Width": 4,
-        "Actual Startup Time": 32.929,
-        "Actual Total Time": 38.799,
+        "Actual Startup Time": 34.600,
+        "Actual Total Time": 40.460,
         "Actual Rows": 20002,
         "Actual Loops": 1,
         "Output": ["\\"*SELECT* 1\\".a", "(0)"],
@@ -1697,8 +1841,8 @@ INSERT INTO plans (VALUES
             "Total Cost": 618.04,
             "Plan Rows": 20002,
             "Plan Width": 4,
-            "Actual Startup Time": 0.118,
-            "Actual Total Time": 12.833,
+            "Actual Startup Time": 0.103,
+            "Actual Total Time": 13.633,
             "Actual Rows": 20002,
             "Actual Loops": 1,
             "Shared Hit Blocks": 218,
@@ -1722,8 +1866,8 @@ INSERT INTO plans (VALUES
                 "Total Cost": 363.02,
                 "Plan Rows": 10001,
                 "Plan Width": 4,
-                "Actual Startup Time": 0.118,
-                "Actual Total Time": 5.492,
+                "Actual Startup Time": 0.103,
+                "Actual Total Time": 5.850,
                 "Actual Rows": 10001,
                 "Actual Loops": 1,
                 "Output": ["\\"*SELECT* 1\\".a", "0"],
@@ -1750,8 +1894,8 @@ INSERT INTO plans (VALUES
                     "Total Cost": 263.01,
                     "Plan Rows": 10001,
                     "Plan Width": 4,
-                    "Actual Startup Time": 0.117,
-                    "Actual Total Time": 2.860,
+                    "Actual Startup Time": 0.102,
+                    "Actual Total Time": 3.004,
                     "Actual Rows": 10001,
                     "Actual Loops": 1,
                     "Output": ["tt1.a"],
@@ -1779,7 +1923,7 @@ INSERT INTO plans (VALUES
                 "Plan Rows": 10001,
                 "Plan Width": 4,
                 "Actual Startup Time": 0.007,
-                "Actual Total Time": 4.665,
+                "Actual Total Time": 4.912,
                 "Actual Rows": 10001,
                 "Actual Loops": 1,
                 "Output": ["\\"*SELECT* 2\\".b", "1"],
@@ -1807,7 +1951,7 @@ INSERT INTO plans (VALUES
                     "Plan Rows": 10001,
                     "Plan Width": 4,
                     "Actual Startup Time": 0.007,
-                    "Actual Total Time": 2.378,
+                    "Actual Total Time": 2.538,
                     "Actual Rows": 10001,
                     "Actual Loops": 1,
                     "Output": ["tt2.b"],
@@ -1832,9 +1976,10 @@ INSERT INTO plans (VALUES
       }
     ]
   },
-  "Planning Time": 0.072,
+  "Planning Time": 0.073,
   "Triggers": [
-  ]
+  ],
+  "Execution Time": 46.811
 }'),
 (16, '###### Plan 16: HashSetOp intersect All, SubqueryScan',
  E'{
@@ -1844,8 +1989,8 @@ INSERT INTO plans (VALUES
     "Total Cost": 1357.51,
     "Plan Rows": 10001,
     "Plan Width": 4,
-    "Actual Startup Time": 19.483,
-    "Actual Total Time": 19.483,
+    "Actual Startup Time": 18.707,
+    "Actual Total Time": 18.707,
     "Actual Rows": 0,
     "Actual Loops": 1,
     "Output": ["\\"*SELECT* 1\\".a", "(0)"],
@@ -1875,8 +2020,8 @@ INSERT INTO plans (VALUES
         "Total Cost": 668.04,
         "Plan Rows": 10001,
         "Plan Width": 4,
-        "Actual Startup Time": 19.480,
-        "Actual Total Time": 19.480,
+        "Actual Startup Time": 18.704,
+        "Actual Total Time": 18.704,
         "Actual Rows": 0,
         "Actual Loops": 1,
         "Output": ["\\"*SELECT* 1\\".a", "(0)"],
@@ -1901,7 +2046,7 @@ INSERT INTO plans (VALUES
             "Plan Rows": 20002,
             "Plan Width": 4,
             "Actual Startup Time": 0.106,
-            "Actual Total Time": 13.075,
+            "Actual Total Time": 12.494,
             "Actual Rows": 20002,
             "Actual Loops": 1,
             "Shared Hit Blocks": 218,
@@ -1926,7 +2071,7 @@ INSERT INTO plans (VALUES
                 "Plan Rows": 10001,
                 "Plan Width": 4,
                 "Actual Startup Time": 0.106,
-                "Actual Total Time": 5.676,
+                "Actual Total Time": 5.120,
                 "Actual Rows": 10001,
                 "Actual Loops": 1,
                 "Output": ["\\"*SELECT* 1\\".a", "0"],
@@ -1953,8 +2098,8 @@ INSERT INTO plans (VALUES
                     "Total Cost": 263.01,
                     "Plan Rows": 10001,
                     "Plan Width": 4,
-                    "Actual Startup Time": 0.099,
-                    "Actual Total Time": 2.977,
+                    "Actual Startup Time": 0.105,
+                    "Actual Total Time": 2.438,
                     "Actual Rows": 10001,
                     "Actual Loops": 1,
                     "Output": ["tt1.a"],
@@ -1981,8 +2126,8 @@ INSERT INTO plans (VALUES
                 "Total Cost": 255.02,
                 "Plan Rows": 10001,
                 "Plan Width": 4,
-                "Actual Startup Time": 0.007,
-                "Actual Total Time": 4.541,
+                "Actual Startup Time": 0.008,
+                "Actual Total Time": 4.613,
                 "Actual Rows": 10001,
                 "Actual Loops": 1,
                 "Output": ["\\"*SELECT* 2\\".b", "1"],
@@ -2009,8 +2154,8 @@ INSERT INTO plans (VALUES
                     "Total Cost": 155.01,
                     "Plan Rows": 10001,
                     "Plan Width": 4,
-                    "Actual Startup Time": 0.006,
-                    "Actual Total Time": 2.350,
+                    "Actual Startup Time": 0.007,
+                    "Actual Total Time": 2.387,
                     "Actual Rows": 10001,
                     "Actual Loops": 1,
                     "Output": ["tt2.b"],
@@ -2035,9 +2180,10 @@ INSERT INTO plans (VALUES
       }
     ]
   },
-  "Planning Time": 0.062,
+  "Planning Time": 0.077,
   "Triggers": [
-  ]
+  ],
+  "Execution Time": 18.940
 }'),
 (17, '###### Plan 17: HashSetOp except, SubqueryScan',
  E'{
@@ -2047,8 +2193,8 @@ INSERT INTO plans (VALUES
     "Total Cost": 1357.51,
     "Plan Rows": 10001,
     "Plan Width": 4,
-    "Actual Startup Time": 23.783,
-    "Actual Total Time": 24.519,
+    "Actual Startup Time": 24.004,
+    "Actual Total Time": 24.864,
     "Actual Rows": 10001,
     "Actual Loops": 1,
     "Output": ["\\"*SELECT* 1\\".a", "(0)"],
@@ -2078,8 +2224,8 @@ INSERT INTO plans (VALUES
         "Total Cost": 668.04,
         "Plan Rows": 10001,
         "Plan Width": 4,
-        "Actual Startup Time": 18.364,
-        "Actual Total Time": 19.479,
+        "Actual Startup Time": 18.469,
+        "Actual Total Time": 19.564,
         "Actual Rows": 10001,
         "Actual Loops": 1,
         "Output": ["\\"*SELECT* 1\\".a", "(0)"],
@@ -2103,8 +2249,8 @@ INSERT INTO plans (VALUES
             "Total Cost": 618.04,
             "Plan Rows": 20002,
             "Plan Width": 4,
-            "Actual Startup Time": 0.099,
-            "Actual Total Time": 12.502,
+            "Actual Startup Time": 0.108,
+            "Actual Total Time": 12.635,
             "Actual Rows": 20002,
             "Actual Loops": 1,
             "Shared Hit Blocks": 218,
@@ -2128,8 +2274,8 @@ INSERT INTO plans (VALUES
                 "Total Cost": 363.02,
                 "Plan Rows": 10001,
                 "Plan Width": 4,
-                "Actual Startup Time": 0.099,
-                "Actual Total Time": 5.266,
+                "Actual Startup Time": 0.108,
+                "Actual Total Time": 5.319,
                 "Actual Rows": 10001,
                 "Actual Loops": 1,
                 "Output": ["\\"*SELECT* 1\\".a", "0"],
@@ -2156,8 +2302,8 @@ INSERT INTO plans (VALUES
                     "Total Cost": 263.01,
                     "Plan Rows": 10001,
                     "Plan Width": 4,
-                    "Actual Startup Time": 0.098,
-                    "Actual Total Time": 2.804,
+                    "Actual Startup Time": 0.107,
+                    "Actual Total Time": 2.706,
                     "Actual Rows": 10001,
                     "Actual Loops": 1,
                     "Output": ["tt1.a"],
@@ -2185,7 +2331,7 @@ INSERT INTO plans (VALUES
                 "Plan Rows": 10001,
                 "Plan Width": 4,
                 "Actual Startup Time": 0.006,
-                "Actual Total Time": 4.526,
+                "Actual Total Time": 4.610,
                 "Actual Rows": 10001,
                 "Actual Loops": 1,
                 "Output": ["\\"*SELECT* 2\\".b", "1"],
@@ -2213,7 +2359,7 @@ INSERT INTO plans (VALUES
                     "Plan Rows": 10001,
                     "Plan Width": 4,
                     "Actual Startup Time": 0.006,
-                    "Actual Total Time": 2.338,
+                    "Actual Total Time": 2.359,
                     "Actual Rows": 10001,
                     "Actual Loops": 1,
                     "Output": ["tt2.b"],
@@ -2238,9 +2384,10 @@ INSERT INTO plans (VALUES
       }
     ]
   },
-  "Planning Time": 0.061,
+  "Planning Time": 0.067,
   "Triggers": [
-  ]
+  ],
+  "Execution Time": 26.764
 }'),
 (18, '###### Plan 18: HashSetOp except all, SubqueryScan',
  E'{
@@ -2250,8 +2397,8 @@ INSERT INTO plans (VALUES
     "Total Cost": 1357.51,
     "Plan Rows": 10001,
     "Plan Width": 4,
-    "Actual Startup Time": 23.416,
-    "Actual Total Time": 24.178,
+    "Actual Startup Time": 23.660,
+    "Actual Total Time": 24.524,
     "Actual Rows": 10001,
     "Actual Loops": 1,
     "Output": ["\\"*SELECT* 1\\".a", "(0)"],
@@ -2281,8 +2428,8 @@ INSERT INTO plans (VALUES
         "Total Cost": 668.04,
         "Plan Rows": 10001,
         "Plan Width": 4,
-        "Actual Startup Time": 18.185,
-        "Actual Total Time": 19.248,
+        "Actual Startup Time": 18.396,
+        "Actual Total Time": 19.526,
         "Actual Rows": 10001,
         "Actual Loops": 1,
         "Output": ["\\"*SELECT* 1\\".a", "(0)"],
@@ -2306,8 +2453,8 @@ INSERT INTO plans (VALUES
             "Total Cost": 618.04,
             "Plan Rows": 20002,
             "Plan Width": 4,
-            "Actual Startup Time": 0.126,
-            "Actual Total Time": 12.408,
+            "Actual Startup Time": 0.149,
+            "Actual Total Time": 12.539,
             "Actual Rows": 20002,
             "Actual Loops": 1,
             "Shared Hit Blocks": 218,
@@ -2331,8 +2478,8 @@ INSERT INTO plans (VALUES
                 "Total Cost": 363.02,
                 "Plan Rows": 10001,
                 "Plan Width": 4,
-                "Actual Startup Time": 0.126,
-                "Actual Total Time": 5.197,
+                "Actual Startup Time": 0.148,
+                "Actual Total Time": 5.230,
                 "Actual Rows": 10001,
                 "Actual Loops": 1,
                 "Output": ["\\"*SELECT* 1\\".a", "0"],
@@ -2359,8 +2506,8 @@ INSERT INTO plans (VALUES
                     "Total Cost": 263.01,
                     "Plan Rows": 10001,
                     "Plan Width": 4,
-                    "Actual Startup Time": 0.124,
-                    "Actual Total Time": 2.657,
+                    "Actual Startup Time": 0.148,
+                    "Actual Total Time": 2.618,
                     "Actual Rows": 10001,
                     "Actual Loops": 1,
                     "Output": ["tt1.a"],
@@ -2388,7 +2535,7 @@ INSERT INTO plans (VALUES
                 "Plan Rows": 10001,
                 "Plan Width": 4,
                 "Actual Startup Time": 0.007,
-                "Actual Total Time": 4.507,
+                "Actual Total Time": 4.628,
                 "Actual Rows": 10001,
                 "Actual Loops": 1,
                 "Output": ["\\"*SELECT* 2\\".b", "1"],
@@ -2416,7 +2563,7 @@ INSERT INTO plans (VALUES
                     "Plan Rows": 10001,
                     "Plan Width": 4,
                     "Actual Startup Time": 0.007,
-                    "Actual Total Time": 2.347,
+                    "Actual Total Time": 2.358,
                     "Actual Rows": 10001,
                     "Actual Loops": 1,
                     "Output": ["tt2.b"],
@@ -2441,26 +2588,27 @@ INSERT INTO plans (VALUES
       }
     ]
   },
-  "Planning Time": 0.064,
+  "Planning Time": 0.066,
   "Triggers": [
-  ]
+  ],
+  "Execution Time": 26.439
 }'),
 (19, '###### Plan 19: merge LEFT join',
  '{
   "Plan": {
     "Node Type": "Merge Join",
     "Join Type": "Left",
-    "Startup Cost": 0.58,
-    "Total Cost": 2409.14,
-    "Plan Rows": 15147,
+    "Startup Cost": 0.71,
+    "Total Cost": 4271.17,
+    "Plan Rows": 33467,
     "Plan Width": 4,
-    "Actual Startup Time": 0.031,
-    "Actual Total Time": 38.276,
-    "Actual Rows": 30003,
+    "Actual Startup Time": 0.033,
+    "Actual Total Time": 57.646,
+    "Actual Rows": 60003,
     "Actual Loops": 1,
     "Output": ["x.b"],
     "Merge Cond": "(x.a = y.a)",
-    "Shared Hit Blocks": 20420,
+    "Shared Hit Blocks": 20942,
     "Shared Read Blocks": 0,
     "Shared Dirtied Blocks": 0,
     "Shared Written Blocks": 0,
@@ -2486,7 +2634,7 @@ INSERT INTO plans (VALUES
         "Plan Rows": 10001,
         "Plan Width": 8,
         "Actual Startup Time": 0.007,
-        "Actual Total Time": 3.807,
+        "Actual Total Time": 4.046,
         "Actual Rows": 10001,
         "Actual Loops": 1,
         "Output": ["x.a", "x.b", "x.c"],
@@ -2511,17 +2659,17 @@ INSERT INTO plans (VALUES
         "Relation Name": "tt3",
         "Schema": "public",
         "Alias": "y",
-        "Startup Cost": 0.29,
-        "Total Cost": 5731.87,
-        "Plan Rows": 120003,
+        "Startup Cost": 0.42,
+        "Total Cost": 9037.06,
+        "Plan Rows": 180003,
         "Plan Width": 4,
-        "Actual Startup Time": 0.020,
-        "Actual Total Time": 18.353,
-        "Actual Rows": 30004,
+        "Actual Startup Time": 0.021,
+        "Actual Total Time": 30.164,
+        "Actual Rows": 60004,
         "Actual Loops": 1,
         "Output": ["y.a"],
-        "Heap Fetches": 30004,
-        "Shared Hit Blocks": 20255,
+        "Heap Fetches": 60004,
+        "Shared Hit Blocks": 20777,
         "Shared Read Blocks": 0,
         "Shared Dirtied Blocks": 0,
         "Shared Written Blocks": 0,
@@ -2536,9 +2684,10 @@ INSERT INTO plans (VALUES
       }
     ]
   },
-  "Planning Time": 0.360,
+  "Planning Time": 0.392,
   "Triggers": [
-  ]
+  ],
+  "Execution Time": 62.836
 }'),
 (20, '###### Plan 20: hash FULL join',
  '{
@@ -2549,8 +2698,8 @@ INSERT INTO plans (VALUES
     "Total Cost": 793.06,
     "Plan Rows": 10001,
     "Plan Width": 4,
-    "Actual Startup Time": 9.198,
-    "Actual Total Time": 16.568,
+    "Actual Startup Time": 12.175,
+    "Actual Total Time": 21.075,
     "Actual Rows": 17001,
     "Actual Loops": 1,
     "Output": ["x.b"],
@@ -2578,8 +2727,8 @@ INSERT INTO plans (VALUES
         "Total Cost": 263.01,
         "Plan Rows": 10001,
         "Plan Width": 8,
-        "Actual Startup Time": 0.106,
-        "Actual Total Time": 1.576,
+        "Actual Startup Time": 0.205,
+        "Actual Total Time": 2.002,
         "Actual Rows": 10001,
         "Actual Loops": 1,
         "Output": ["x.a", "x.b", "x.c"],
@@ -2603,8 +2752,8 @@ INSERT INTO plans (VALUES
         "Total Cost": 155.01,
         "Plan Rows": 10001,
         "Plan Width": 4,
-        "Actual Startup Time": 9.087,
-        "Actual Total Time": 9.087,
+        "Actual Startup Time": 11.960,
+        "Actual Total Time": 11.960,
         "Actual Rows": 10001,
         "Actual Loops": 1,
         "Output": ["y.a"],
@@ -2635,8 +2784,8 @@ INSERT INTO plans (VALUES
             "Total Cost": 155.01,
             "Plan Rows": 10001,
             "Plan Width": 4,
-            "Actual Startup Time": 0.009,
-            "Actual Total Time": 4.253,
+            "Actual Startup Time": 0.019,
+            "Actual Total Time": 5.607,
             "Actual Rows": 10001,
             "Actual Loops": 1,
             "Output": ["y.a"],
@@ -2657,9 +2806,10 @@ INSERT INTO plans (VALUES
       }
     ]
   },
-  "Planning Time": 0.098,
+  "Planning Time": 0.189,
   "Triggers": [
-  ]
+  ],
+  "Execution Time": 22.756
 }'),
 (21, '###### Plan 21: hash SEMI join',
  '{
@@ -2670,8 +2820,8 @@ INSERT INTO plans (VALUES
     "Total Cost": 793.06,
     "Plan Rows": 10001,
     "Plan Width": 12,
-    "Actual Startup Time": 10.003,
-    "Actual Total Time": 10.003,
+    "Actual Startup Time": 10.101,
+    "Actual Total Time": 10.101,
     "Actual Rows": 0,
     "Actual Loops": 1,
     "Output": ["tt1.a", "tt1.b", "tt1.c"],
@@ -2699,8 +2849,8 @@ INSERT INTO plans (VALUES
         "Total Cost": 263.01,
         "Plan Rows": 10001,
         "Plan Width": 12,
-        "Actual Startup Time": 0.092,
-        "Actual Total Time": 1.398,
+        "Actual Startup Time": 0.090,
+        "Actual Total Time": 1.342,
         "Actual Rows": 10001,
         "Actual Loops": 1,
         "Output": ["tt1.a", "tt1.b", "tt1.c"],
@@ -2724,8 +2874,8 @@ INSERT INTO plans (VALUES
         "Total Cost": 155.01,
         "Plan Rows": 10001,
         "Plan Width": 4,
-        "Actual Startup Time": 5.360,
-        "Actual Total Time": 5.360,
+        "Actual Startup Time": 5.481,
+        "Actual Total Time": 5.481,
         "Actual Rows": 10001,
         "Actual Loops": 1,
         "Output": ["tt2.b"],
@@ -2757,7 +2907,7 @@ INSERT INTO plans (VALUES
             "Plan Rows": 10001,
             "Plan Width": 4,
             "Actual Startup Time": 0.007,
-            "Actual Total Time": 2.538,
+            "Actual Total Time": 2.619,
             "Actual Rows": 10001,
             "Actual Loops": 1,
             "Output": ["tt2.b"],
@@ -2778,9 +2928,10 @@ INSERT INTO plans (VALUES
       }
     ]
   },
-  "Planning Time": 0.177,
+  "Planning Time": 0.184,
   "Triggers": [
-  ]
+  ],
+  "Execution Time": 10.305
 }'),
 (22, '###### Plan 22: Hash Anti Join',
  '{
@@ -2791,8 +2942,8 @@ INSERT INTO plans (VALUES
     "Total Cost": 693.05,
     "Plan Rows": 1,
     "Plan Width": 12,
-    "Actual Startup Time": 5.458,
-    "Actual Total Time": 11.753,
+    "Actual Startup Time": 5.601,
+    "Actual Total Time": 11.876,
     "Actual Rows": 10001,
     "Actual Loops": 1,
     "Output": ["tt1.a", "tt1.b", "tt1.c"],
@@ -2820,8 +2971,8 @@ INSERT INTO plans (VALUES
         "Total Cost": 263.01,
         "Plan Rows": 10001,
         "Plan Width": 12,
-        "Actual Startup Time": 0.094,
-        "Actual Total Time": 1.498,
+        "Actual Startup Time": 0.091,
+        "Actual Total Time": 1.500,
         "Actual Rows": 10001,
         "Actual Loops": 1,
         "Output": ["tt1.a", "tt1.b", "tt1.c"],
@@ -2845,8 +2996,8 @@ INSERT INTO plans (VALUES
         "Total Cost": 155.01,
         "Plan Rows": 10001,
         "Plan Width": 4,
-        "Actual Startup Time": 5.359,
-        "Actual Total Time": 5.359,
+        "Actual Startup Time": 5.505,
+        "Actual Total Time": 5.505,
         "Actual Rows": 10001,
         "Actual Loops": 1,
         "Output": ["tt2.b"],
@@ -2877,8 +3028,8 @@ INSERT INTO plans (VALUES
             "Total Cost": 155.01,
             "Plan Rows": 10001,
             "Plan Width": 4,
-            "Actual Startup Time": 0.007,
-            "Actual Total Time": 2.482,
+            "Actual Startup Time": 0.006,
+            "Actual Total Time": 2.610,
             "Actual Rows": 10001,
             "Actual Loops": 1,
             "Output": ["tt2.b"],
@@ -2899,9 +3050,10 @@ INSERT INTO plans (VALUES
       }
     ]
   },
-  "Planning Time": 0.127,
+  "Planning Time": 0.138,
   "Triggers": [
-  ]
+  ],
+  "Execution Time": 12.814
 }'),
 (23, '###### Plan 23: WindowAgg',
  '{
@@ -2911,8 +3063,8 @@ INSERT INTO plans (VALUES
     "Total Cost": 1127.49,
     "Plan Rows": 10001,
     "Plan Width": 4,
-    "Actual Startup Time": 5.547,
-    "Actual Total Time": 16.947,
+    "Actual Startup Time": 5.695,
+    "Actual Total Time": 16.316,
     "Actual Rows": 10001,
     "Actual Loops": 1,
     "Output": ["first_value(a) OVER (?)", "((a / 10))"],
@@ -2936,8 +3088,8 @@ INSERT INTO plans (VALUES
         "Total Cost": 952.47,
         "Plan Rows": 10001,
         "Plan Width": 4,
-        "Actual Startup Time": 5.541,
-        "Actual Total Time": 6.433,
+        "Actual Startup Time": 5.688,
+        "Actual Total Time": 6.679,
         "Actual Rows": 10001,
         "Actual Loops": 1,
         "Output": ["((a / 10))", "a"],
@@ -2968,8 +3120,8 @@ INSERT INTO plans (VALUES
             "Total Cost": 263.01,
             "Plan Rows": 10001,
             "Plan Width": 4,
-            "Actual Startup Time": 0.097,
-            "Actual Total Time": 2.922,
+            "Actual Startup Time": 0.094,
+            "Actual Total Time": 3.070,
             "Actual Rows": 10001,
             "Actual Loops": 1,
             "Output": ["(a / 10)", "a"],
@@ -2990,9 +3142,10 @@ INSERT INTO plans (VALUES
       }
     ]
   },
-  "Planning Time": 0.051,
+  "Planning Time": 0.052,
   "Triggers": [
-  ]
+  ],
+  "Execution Time": 17.627
 }'),
 (24, '###### Plan 24: Unique',
  '{
@@ -3003,7 +3156,7 @@ INSERT INTO plans (VALUES
     "Plan Rows": 10001,
     "Plan Width": 4,
     "Actual Startup Time": 0.010,
-    "Actual Total Time": 7.528,
+    "Actual Total Time": 7.693,
     "Actual Rows": 10001,
     "Actual Loops": 1,
     "Output": ["a"],
@@ -3033,7 +3186,7 @@ INSERT INTO plans (VALUES
         "Plan Rows": 10001,
         "Plan Width": 4,
         "Actual Startup Time": 0.009,
-        "Actual Total Time": 4.071,
+        "Actual Total Time": 4.050,
         "Actual Rows": 10001,
         "Actual Loops": 1,
         "Output": ["a"],
@@ -3053,9 +3206,10 @@ INSERT INTO plans (VALUES
       }
     ]
   },
-  "Planning Time": 0.037,
+  "Planning Time": 0.057,
   "Triggers": [
-  ]
+  ],
+  "Execution Time": 8.567
 }'),
 (25, '###### Plan 25: PlainAggregate',
  '{
@@ -3066,8 +3220,8 @@ INSERT INTO plans (VALUES
     "Total Cost": 288.02,
     "Plan Rows": 1,
     "Plan Width": 4,
-    "Actual Startup Time": 3.238,
-    "Actual Total Time": 3.239,
+    "Actual Startup Time": 3.302,
+    "Actual Total Time": 3.302,
     "Actual Rows": 1,
     "Actual Loops": 1,
     "Output": ["sum(a)"],
@@ -3094,8 +3248,8 @@ INSERT INTO plans (VALUES
         "Total Cost": 263.01,
         "Plan Rows": 10001,
         "Plan Width": 4,
-        "Actual Startup Time": 0.095,
-        "Actual Total Time": 1.427,
+        "Actual Startup Time": 0.094,
+        "Actual Total Time": 1.500,
         "Actual Rows": 10001,
         "Actual Loops": 1,
         "Output": ["a", "b", "c"],
@@ -3114,31 +3268,32 @@ INSERT INTO plans (VALUES
       }
     ]
   },
-  "Planning Time": 0.032,
+  "Planning Time": 0.033,
   "Triggers": [
-  ]
+  ],
+  "Execution Time": 3.325
 }'),
-(26, '###### Plan 26: BitmapIndexScan/BitmapHeapScan, BitmapOr',
+(26, '###### Plan 26: BitmapIndexScan/BitmapHeapScan, BitmapOr, lossy',
  '{
   "Plan": {
     "Node Type": "Bitmap Heap Scan",
     "Relation Name": "tt3",
     "Schema": "public",
     "Alias": "tt3",
-    "Startup Cost": 202.83,
-    "Total Cost": 998.31,
-    "Plan Rows": 9765,
+    "Startup Cost": 4255.43,
+    "Total Cost": 7478.44,
+    "Plan Rows": 180001,
     "Plan Width": 12,
-    "Actual Startup Time": 1.498,
-    "Actual Total Time": 3.575,
-    "Actual Rows": 10003,
+    "Actual Startup Time": 27.298,
+    "Actual Total Time": 65.241,
+    "Actual Rows": 180000,
     "Actual Loops": 1,
     "Output": ["a", "b", "c"],
-    "Recheck Cond": "((tt3.a = 5000) OR (tt3.b = 50))",
-    "Rows Removed by Index Recheck": 0,
-    "Exact Heap Blocks": 57,
-    "Lossy Heap Blocks": 0,
-    "Shared Hit Blocks": 96,
+    "Recheck Cond": "(tt3.b > (-99998))",
+    "Rows Removed by Index Recheck": 3,
+    "Exact Heap Blocks": 558,
+    "Lossy Heap Blocks": 415,
+    "Shared Hit Blocks": 1686,
     "Shared Read Blocks": 0,
     "Shared Dirtied Blocks": 0,
     "Shared Written Blocks": 0,
@@ -3152,17 +3307,19 @@ INSERT INTO plans (VALUES
     "I/O Write Time": 0.000,
     "Plans": [
       {
-        "Node Type": "BitmapOr",
+        "Node Type": "Bitmap Index Scan",
         "Parent Relationship": "Outer",
-        "Startup Cost": 202.83,
-        "Total Cost": 202.83,
-        "Plan Rows": 9765,
+        "Index Name": "i_tt3_b",
+        "Startup Cost": 0.00,
+        "Total Cost": 4210.43,
+        "Plan Rows": 180001,
         "Plan Width": 0,
-        "Actual Startup Time": 1.486,
-        "Actual Total Time": 1.486,
-        "Actual Rows": 0,
+        "Actual Startup Time": 27.185,
+        "Actual Total Time": 27.185,
+        "Actual Rows": 180000,
         "Actual Loops": 1,
-        "Shared Hit Blocks": 39,
+        "Index Cond": "(tt3.b > (-99998))",
+        "Shared Hit Blocks": 713,
         "Shared Read Blocks": 0,
         "Shared Dirtied Blocks": 0,
         "Shared Written Blocks": 0,
@@ -3173,22 +3330,85 @@ INSERT INTO plans (VALUES
         "Temp Read Blocks": 0,
         "Temp Written Blocks": 0,
         "I/O Read Time": 0.000,
+        "I/O Write Time": 0.000
+      }
+    ]
+  },
+  "Planning Time": 0.101,
+  "Triggers": [
+  ],
+  "Execution Time": 78.996
+}'),
+(27, '###### Plan 27: Join Filter',
+ '{
+  "Plan": {
+    "Node Type": "Limit",
+    "Startup Cost": 0.00,
+    "Total Cost": 21.52,
+    "Plan Rows": 100,
+    "Plan Width": 12,
+    "Actual Startup Time": 5.307,
+    "Actual Total Time": 5.431,
+    "Actual Rows": 100,
+    "Actual Loops": 1,
+    "Output": ["tt2.a", "tt2.b", "tt2.c"],
+    "Shared Hit Blocks": 40,
+    "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": 12,
+    "I/O Read Time": 0.000,
+    "I/O Write Time": 0.000,
+    "Plans": [
+      {
+        "Node Type": "Nested Loop",
+        "Parent Relationship": "Outer",
+        "Join Type": "Inner",
+        "Startup Cost": 0.00,
+        "Total Cost": 43048282.11,
+        "Plan Rows": 200023334,
+        "Plan Width": 12,
+        "Actual Startup Time": 5.306,
+        "Actual Total Time": 5.414,
+        "Actual Rows": 100,
+        "Actual 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,
+        "Shared Hit Blocks": 40,
+        "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": 12,
+        "I/O Read Time": 0.000,
         "I/O Write Time": 0.000,
         "Plans": [
           {
-            "Node Type": "Bitmap Index Scan",
-            "Parent Relationship": "Member",
-            "Index Name": "i_tt3_a",
+            "Node Type": "Seq Scan",
+            "Parent Relationship": "Outer",
+            "Relation Name": "tt2",
+            "Schema": "public",
+            "Alias": "tt2",
             "Startup Cost": 0.00,
-            "Total Cost": 193.52,
-            "Plan Rows": 9764,
-            "Plan Width": 0,
-            "Actual Startup Time": 1.480,
-            "Actual Total Time": 1.480,
-            "Actual Rows": 10003,
+            "Total Cost": 155.01,
+            "Plan Rows": 10001,
+            "Plan Width": 12,
+            "Actual Startup Time": 0.009,
+            "Actual Total Time": 0.009,
+            "Actual Rows": 1,
             "Actual Loops": 1,
-            "Index Cond": "(tt3.a = 5000)",
-            "Shared Hit Blocks": 36,
+            "Output": ["tt2.a", "tt2.b", "tt2.c"],
+            "Shared Hit Blocks": 1,
             "Shared Read Blocks": 0,
             "Shared Dirtied Blocks": 0,
             "Shared Written Blocks": 0,
@@ -3202,19 +3422,18 @@ INSERT INTO plans (VALUES
             "I/O Write Time": 0.000
           },
           {
-            "Node Type": "Bitmap Index Scan",
-            "Parent Relationship": "Member",
-            "Index Name": "i_tt3_b",
+            "Node Type": "Materialize",
+            "Parent Relationship": "Inner",
             "Startup Cost": 0.00,
-            "Total Cost": 4.43,
-            "Plan Rows": 1,
-            "Plan Width": 0,
-            "Actual Startup Time": 0.006,
-            "Actual Total Time": 0.006,
-            "Actual Rows": 1,
+            "Total Cost": 4377.05,
+            "Plan Rows": 180003,
+            "Plan Width": 4,
+            "Actual Startup Time": 0.010,
+            "Actual Total Time": 4.185,
+            "Actual Rows": 7101,
             "Actual Loops": 1,
-            "Index Cond": "(tt3.b = 50)",
-            "Shared Hit Blocks": 3,
+            "Output": ["tt3.a"],
+            "Shared Hit Blocks": 39,
             "Shared Read Blocks": 0,
             "Shared Dirtied Blocks": 0,
             "Shared Written Blocks": 0,
@@ -3223,19 +3442,50 @@ INSERT INTO plans (VALUES
             "Local Dirtied Blocks": 0,
             "Local Written Blocks": 0,
             "Temp Read Blocks": 0,
-            "Temp Written Blocks": 0,
+            "Temp Written Blocks": 12,
             "I/O Read Time": 0.000,
-            "I/O Write Time": 0.000
+            "I/O Write Time": 0.000,
+            "Plans": [
+              {
+                "Node Type": "Seq Scan",
+                "Parent Relationship": "Outer",
+                "Relation Name": "tt3",
+                "Schema": "public",
+                "Alias": "tt3",
+                "Startup Cost": 0.00,
+                "Total Cost": 2773.03,
+                "Plan Rows": 180003,
+                "Plan Width": 4,
+                "Actual Startup Time": 0.008,
+                "Actual Total Time": 1.689,
+                "Actual Rows": 7101,
+                "Actual Loops": 1,
+                "Output": ["tt3.a"],
+                "Shared Hit Blocks": 39,
+                "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.089,
+  "Planning Time": 0.171,
   "Triggers": [
-  ]
+  ],
+  "Execution Time": 5.538
 }'),
-(27, '###### Plan 27: TidScan',
+(28, '###### Plan 28: TidScan',
  E'{
   "Plan": {
     "Node Type": "Tid Scan",
@@ -3246,8 +3496,8 @@ INSERT INTO plans (VALUES
     "Total Cost": 4.01,
     "Plan Rows": 1,
     "Plan Width": 12,
-    "Actual Startup Time": 0.003,
-    "Actual Total Time": 0.003,
+    "Actual Startup Time": 0.004,
+    "Actual Total Time": 0.004,
     "Actual Rows": 1,
     "Actual Loops": 1,
     "Output": ["a", "b", "c"],
@@ -3265,11 +3515,12 @@ INSERT INTO plans (VALUES
     "I/O Read Time": 0.000,
     "I/O Write Time": 0.000
   },
-  "Planning Time": 0.061,
+  "Planning Time": 0.070,
   "Triggers": [
-  ]
+  ],
+  "Execution Time": 0.017
 }'),
-(28, '###### Plan 28: LockRows',
+(29, '###### Plan 29: LockRows',
  '{
   "Plan": {
     "Node Type": "LockRows",
@@ -3277,8 +3528,8 @@ INSERT INTO plans (VALUES
     "Total Cost": 313.51,
     "Plan Rows": 50,
     "Plan Width": 10,
-    "Actual Startup Time": 0.106,
-    "Actual Total Time": 6.666,
+    "Actual Startup Time": 0.153,
+    "Actual Total Time": 5.178,
     "Actual Rows": 1001,
     "Actual Loops": 1,
     "Output": ["a", "ctid"],
@@ -3305,8 +3556,8 @@ INSERT INTO plans (VALUES
         "Total Cost": 313.01,
         "Plan Rows": 50,
         "Plan Width": 10,
-        "Actual Startup Time": 0.096,
-        "Actual Total Time": 3.082,
+        "Actual Startup Time": 0.141,
+        "Actual Total Time": 3.714,
         "Actual Rows": 1001,
         "Actual Loops": 1,
         "Output": ["a", "ctid"],
@@ -3327,11 +3578,12 @@ INSERT INTO plans (VALUES
       }
     ]
   },
-  "Planning Time": 0.036,
+  "Planning Time": 0.041,
   "Triggers": [
-  ]
+  ],
+  "Execution Time": 5.344
 }'),
-(29, '###### Plan 29: Materialize',
+(30, '###### Plan 30: Materialize',
  '{
   "Plan": {
     "Node Type": "Seq Scan",
@@ -3342,8 +3594,8 @@ INSERT INTO plans (VALUES
     "Total Cost": 1150490.52,
     "Plan Rows": 5000,
     "Plan Width": 12,
-    "Actual Startup Time": 4.884,
-    "Actual Total Time": 4.884,
+    "Actual Startup Time": 5.697,
+    "Actual Total Time": 5.697,
     "Actual Rows": 0,
     "Actual Loops": 1,
     "Output": ["tt1.a", "tt1.b", "tt1.c"],
@@ -3398,8 +3650,8 @@ INSERT INTO plans (VALUES
             "Total Cost": 155.01,
             "Plan Rows": 10001,
             "Plan Width": 4,
-            "Actual Startup Time": 0.007,
-            "Actual Total Time": 0.007,
+            "Actual Startup Time": 0.008,
+            "Actual Total Time": 0.008,
             "Actual Rows": 1,
             "Actual Loops": 1,
             "Output": ["tt2.b"],
@@ -3420,9 +3672,10 @@ INSERT INTO plans (VALUES
       }
     ]
   },
-  "Planning Time": 0.053,
+  "Planning Time": 0.060,
   "Triggers": [
-  ]
+  ],
+  "Execution Time": 5.723
 }'));
 
 \pset pager
@@ -3431,6 +3684,9 @@ INSERT INTO plans (VALUES
 \echo ###### set shortened JSON
 UPDATE plans SET splan = pg_store_plans_shorten(lplan);
 
+\echo ###### tag abbreviation test
+SELECT splan FROM plans WHERE id = -1;
+
 \echo ###### JSON properties round-trip test
 SELECT id FROM plans
        where pg_store_plans_jsonplan(splan) <> lplan;