@@ -124,28 +124,27 @@ WHERE str NOT LIKE 'Query Identifier%';
124124SELECT str AS result
125125FROM expln('
126126SELECT x FROM A where x < 10 group by(x);') AS str
127- WHERE str NOT LIKE 'Query Identifier%';
127+ WHERE str NOT LIKE 'Query Identifier%' and str NOT LIKE '%Memory%' ;
128128 result
129129-------------------------------------------------------
130130 HashAggregate (actual rows=10 loops=1)
131131 AQO not used
132132 Output: x
133133 Group Key: a.x
134- Batches: 1 Memory Usage: 40kB
135134 -> Seq Scan on public.a (actual rows=1000 loops=1)
136135 AQO not used
137136 Output: x
138137 Filter: (a.x < 10)
139138 Using aqo: true
140139 AQO mode: LEARN
141140 JOINS: 0
142- (12 rows)
141+ (11 rows)
143142
144143-- cardinality 1000 in Seq Scan on a
145144SELECT str AS result
146145FROM expln('
147146SELECT x,y FROM A,B WHERE x < 10 AND A.x = B.y;') AS str
148- WHERE str NOT LIKE 'Query Identifier%';
147+ WHERE str NOT LIKE 'Query Identifier%' and str NOT LIKE '%Memory%' ;
149148 result
150149-------------------------------------------------------------
151150 Merge Join (actual rows=100000 loops=1)
@@ -156,7 +155,6 @@ WHERE str NOT LIKE 'Query Identifier%';
156155 AQO not used
157156 Output: a.x
158157 Sort Key: a.x
159- Sort Method: quicksort Memory: 79kB
160158 -> Seq Scan on public.a (actual rows=1000 loops=1)
161159 AQO: rows=1000, error=0%
162160 Output: a.x
@@ -165,27 +163,25 @@ WHERE str NOT LIKE 'Query Identifier%';
165163 AQO not used
166164 Output: b.y
167165 Sort Key: b.y
168- Sort Method: quicksort Memory: 79kB
169166 -> Seq Scan on public.b (actual rows=1000 loops=1)
170167 AQO not used
171168 Output: b.y
172169 Using aqo: true
173170 AQO mode: LEARN
174171 JOINS: 0
175- (24 rows)
172+ (22 rows)
176173
177174-- cardinality 100 in Seq Scan on a and Seq Scan on b
178175SELECT str AS result
179176FROM expln('
180177SELECT x FROM A,B where x < 10 and y > 10 group by(x);') AS str
181- WHERE str NOT LIKE 'Query Identifier%';
178+ WHERE str NOT LIKE 'Query Identifier%' and str NOT LIKE '%Memory%' ;
182179 result
183180----------------------------------------------------------------
184181 HashAggregate (actual rows=0 loops=1)
185182 AQO not used
186183 Output: a.x
187184 Group Key: a.x
188- Batches: 1 Memory Usage: 40kB
189185 -> Nested Loop (actual rows=0 loops=1)
190186 AQO not used
191187 Output: a.x
@@ -202,15 +198,15 @@ WHERE str NOT LIKE 'Query Identifier%';
202198 Using aqo: true
203199 AQO mode: LEARN
204200 JOINS: 1
205- (21 rows)
201+ (20 rows)
206202
207203-- cardinality 1000 Hash Cond: (a.x = b.y) and 1 Seq Scan on b
208204-- this cardinality is wrong because we take it from bad neibours (previous query).
209205-- clause y > 10 give count of rows with the same clauses.
210206SELECT str AS result
211207FROM expln('
212208SELECT x,y FROM A,B WHERE x < 10 and y > 10 AND A.x = B.y;') AS str
213- WHERE str NOT LIKE 'Query Identifier%';
209+ WHERE str NOT LIKE 'Query Identifier%' and str NOT LIKE '%Memory%' ;
214210 result
215211----------------------------------------------------------
216212 Hash Join (actual rows=0 loops=1)
@@ -224,7 +220,6 @@ WHERE str NOT LIKE 'Query Identifier%';
224220 -> Hash (actual rows=0 loops=1)
225221 AQO not used
226222 Output: b.y
227- Buckets: 1024 Batches: 1 Memory Usage: 8kB
228223 -> Seq Scan on public.b (actual rows=0 loops=1)
229224 AQO: rows=1, error=100%
230225 Output: b.y
@@ -233,6 +228,6 @@ WHERE str NOT LIKE 'Query Identifier%';
233228 Using aqo: true
234229 AQO mode: LEARN
235230 JOINS: 0
236- (20 rows)
231+ (19 rows)
237232
238233DROP EXTENSION aqo CASCADE;