@@ -124,28 +124,27 @@ WHERE str NOT LIKE 'Query Identifier%';
124
124
SELECT str AS result
125
125
FROM expln('
126
126
SELECT 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%' ;
128
128
result
129
129
-------------------------------------------------------
130
130
HashAggregate (actual rows=10 loops=1)
131
131
AQO not used
132
132
Output: x
133
133
Group Key: a.x
134
- Batches: 1 Memory Usage: 40kB
135
134
-> Seq Scan on public.a (actual rows=1000 loops=1)
136
135
AQO not used
137
136
Output: x
138
137
Filter: (a.x < 10)
139
138
Using aqo: true
140
139
AQO mode: LEARN
141
140
JOINS: 0
142
- (12 rows)
141
+ (11 rows)
143
142
144
143
-- cardinality 1000 in Seq Scan on a
145
144
SELECT str AS result
146
145
FROM expln('
147
146
SELECT 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%' ;
149
148
result
150
149
-------------------------------------------------------------
151
150
Merge Join (actual rows=100000 loops=1)
@@ -156,7 +155,6 @@ WHERE str NOT LIKE 'Query Identifier%';
156
155
AQO not used
157
156
Output: a.x
158
157
Sort Key: a.x
159
- Sort Method: quicksort Memory: 79kB
160
158
-> Seq Scan on public.a (actual rows=1000 loops=1)
161
159
AQO: rows=1000, error=0%
162
160
Output: a.x
@@ -165,27 +163,25 @@ WHERE str NOT LIKE 'Query Identifier%';
165
163
AQO not used
166
164
Output: b.y
167
165
Sort Key: b.y
168
- Sort Method: quicksort Memory: 79kB
169
166
-> Seq Scan on public.b (actual rows=1000 loops=1)
170
167
AQO not used
171
168
Output: b.y
172
169
Using aqo: true
173
170
AQO mode: LEARN
174
171
JOINS: 0
175
- (24 rows)
172
+ (22 rows)
176
173
177
174
-- cardinality 100 in Seq Scan on a and Seq Scan on b
178
175
SELECT str AS result
179
176
FROM expln('
180
177
SELECT 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%' ;
182
179
result
183
180
----------------------------------------------------------------
184
181
HashAggregate (actual rows=0 loops=1)
185
182
AQO not used
186
183
Output: a.x
187
184
Group Key: a.x
188
- Batches: 1 Memory Usage: 40kB
189
185
-> Nested Loop (actual rows=0 loops=1)
190
186
AQO not used
191
187
Output: a.x
@@ -202,15 +198,15 @@ WHERE str NOT LIKE 'Query Identifier%';
202
198
Using aqo: true
203
199
AQO mode: LEARN
204
200
JOINS: 1
205
- (21 rows)
201
+ (20 rows)
206
202
207
203
-- cardinality 1000 Hash Cond: (a.x = b.y) and 1 Seq Scan on b
208
204
-- this cardinality is wrong because we take it from bad neibours (previous query).
209
205
-- clause y > 10 give count of rows with the same clauses.
210
206
SELECT str AS result
211
207
FROM expln('
212
208
SELECT 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%' ;
214
210
result
215
211
----------------------------------------------------------
216
212
Hash Join (actual rows=0 loops=1)
@@ -224,7 +220,6 @@ WHERE str NOT LIKE 'Query Identifier%';
224
220
-> Hash (actual rows=0 loops=1)
225
221
AQO not used
226
222
Output: b.y
227
- Buckets: 1024 Batches: 1 Memory Usage: 8kB
228
223
-> Seq Scan on public.b (actual rows=0 loops=1)
229
224
AQO: rows=1, error=100%
230
225
Output: b.y
@@ -233,6 +228,6 @@ WHERE str NOT LIKE 'Query Identifier%';
233
228
Using aqo: true
234
229
AQO mode: LEARN
235
230
JOINS: 0
236
- (20 rows)
231
+ (19 rows)
237
232
238
233
DROP EXTENSION aqo CASCADE;
0 commit comments