Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit7516056

Browse files
committed
Attempt to stabilize new window agg regression test
This test was recently added in3900a02. It appears to be unstable inregards to the join order presumably due to the relations at either sideof the join being equal in side. Here we add a qual to make one of themsmaller so the planner is more likely to choose to hash the smaller of thetwo.Reported-by: Nathan Bossart, Tom LaneDiscussion:https://www.postgr.es/m/20230803235403.GC1238296@nathanxps13
1 parent3fd19a9 commit7516056

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

‎src/test/regress/expected/window.out

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4834,17 +4834,19 @@ LIMIT 1;
48344834
EXPLAIN (COSTS OFF)
48354835
SELECT COUNT(*) OVER ()
48364836
FROM tenk1 t1 INNER JOIN tenk1 t2 ON t1.unique1 = t2.tenthous
4837+
WHERE t2.two = 1
48374838
LIMIT 1;
4838-
QUERY PLAN
4839-
--------------------------------------------------------------------------------
4839+
QUERY PLAN
4840+
-------------------------------------------------------------------
48404841
Limit
48414842
-> WindowAgg
48424843
-> Hash Join
48434844
Hash Cond: (t1.unique1 = t2.tenthous)
48444845
-> Index Only Scan using tenk1_unique1 on tenk1 t1
48454846
-> Hash
4846-
-> Index Only Scan using tenk1_thous_tenthous on tenk1 t2
4847-
(7 rows)
4847+
-> Seq Scan on tenk1 t2
4848+
Filter: (two = 1)
4849+
(8 rows)
48484850

48494851
-- Ensure we get a cheap total plan. This time use UNBOUNDED FOLLOWING, which
48504852
-- needs to read all join rows to output the first WindowAgg row.

‎src/test/regress/sql/window.sql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1734,6 +1734,7 @@ LIMIT 1;
17341734
EXPLAIN (COSTS OFF)
17351735
SELECTCOUNT(*) OVER ()
17361736
FROM tenk1 t1INNER JOIN tenk1 t2ONt1.unique1=t2.tenthous
1737+
WHEREt2.two=1
17371738
LIMIT1;
17381739

17391740
-- Ensure we get a cheap total plan. This time use UNBOUNDED FOLLOWING, which

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp