Skip to content

Commit db6ac90

Browse files
author
Alena Rybakina
committed
Fix look-a-like output test. Delete lines containing Memory
1 parent 404e503 commit db6ac90

File tree

2 files changed

+12
-17
lines changed

2 files changed

+12
-17
lines changed

expected/look_a_like.out

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -124,28 +124,27 @@ WHERE str NOT LIKE 'Query Identifier%';
124124
SELECT str AS result
125125
FROM expln('
126126
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%';
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
145144
SELECT str AS result
146145
FROM expln('
147146
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%';
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
178175
SELECT str AS result
179176
FROM expln('
180177
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%';
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.
210206
SELECT str AS result
211207
FROM expln('
212208
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%';
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

238233
DROP EXTENSION aqo CASCADE;

sql/look_a_like.sql

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,24 +49,24 @@ WHERE str NOT LIKE 'Query Identifier%';
4949
SELECT str AS result
5050
FROM expln('
5151
SELECT x FROM A where x < 10 group by(x);') AS str
52-
WHERE str NOT LIKE 'Query Identifier%';
52+
WHERE str NOT LIKE 'Query Identifier%' and str NOT LIKE '%Memory%';
5353
-- cardinality 1000 in Seq Scan on a
5454
SELECT str AS result
5555
FROM expln('
5656
SELECT x,y FROM A,B WHERE x < 10 AND A.x = B.y;') AS str
57-
WHERE str NOT LIKE 'Query Identifier%';
57+
WHERE str NOT LIKE 'Query Identifier%' and str NOT LIKE '%Memory%';
5858

5959
-- cardinality 100 in Seq Scan on a and Seq Scan on b
6060
SELECT str AS result
6161
FROM expln('
6262
SELECT x FROM A,B where x < 10 and y > 10 group by(x);') AS str
63-
WHERE str NOT LIKE 'Query Identifier%';
63+
WHERE str NOT LIKE 'Query Identifier%' and str NOT LIKE '%Memory%';
6464
-- cardinality 1000 Hash Cond: (a.x = b.y) and 1 Seq Scan on b
6565
-- this cardinality is wrong because we take it from bad neibours (previous query).
6666
-- clause y > 10 give count of rows with the same clauses.
6767
SELECT str AS result
6868
FROM expln('
6969
SELECT x,y FROM A,B WHERE x < 10 and y > 10 AND A.x = B.y;') AS str
70-
WHERE str NOT LIKE 'Query Identifier%';
70+
WHERE str NOT LIKE 'Query Identifier%' and str NOT LIKE '%Memory%';
7171

7272
DROP EXTENSION aqo CASCADE;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy