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

Commitc588df9

Browse files
committed
Make psql_crosstab plans more stable
To achieve this, ANALYZE the data table before querying it, as suggestedby Tom Lane. On my system, this enables the test to pass with 128 kB ofwork_mem (a value with which other tests fail -- so it seems goodenough).Reported by Michaël Paquier.
1 parent736c95c commitc588df9

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ VALUES
1010
('v0','h4','dbl', -3, '2014-12-15'),
1111
('v0',NULL,'qux', 5, '2014-07-15'),
1212
('v1','h2','quux',7, '2015-04-04');
13+
-- make plans more stable
14+
ANALYZE ctv_data;
1315
-- running \crosstabview after query uses query in buffer
1416
SELECT v, EXTRACT(year FROM d), count(*)
1517
FROM ctv_data

‎src/test/regress/sql/psql_crosstab.sql

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ VALUES
1212
('v0',NULL,'qux',5,'2014-07-15'),
1313
('v1','h2','quux',7,'2015-04-04');
1414

15+
-- make plans more stable
16+
ANALYZE ctv_data;
17+
1518
-- running \crosstabview after query uses query in buffer
1619
SELECT v, EXTRACT(yearFROM d),count(*)
1720
FROM ctv_data

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp