Make psql_crosstab plans more stable
To achieve this, ANALYZE the data table before querying it, as suggested by Tom Lane. On my system, this enables the test to pass with 128 kB of work_mem (a value with which other tests fail -- so it seems good enough). Reported by Michaël Paquier.
This commit is contained in:
parent
736c95ca16
commit
c588df9971
@ -10,6 +10,8 @@ VALUES
|
||||
('v0','h4','dbl', -3, '2014-12-15'),
|
||||
('v0',NULL,'qux', 5, '2014-07-15'),
|
||||
('v1','h2','quux',7, '2015-04-04');
|
||||
-- make plans more stable
|
||||
ANALYZE ctv_data;
|
||||
-- running \crosstabview after query uses query in buffer
|
||||
SELECT v, EXTRACT(year FROM d), count(*)
|
||||
FROM ctv_data
|
||||
|
@ -12,6 +12,9 @@ VALUES
|
||||
('v0',NULL,'qux', 5, '2014-07-15'),
|
||||
('v1','h2','quux',7, '2015-04-04');
|
||||
|
||||
-- make plans more stable
|
||||
ANALYZE ctv_data;
|
||||
|
||||
-- running \crosstabview after query uses query in buffer
|
||||
SELECT v, EXTRACT(year FROM d), count(*)
|
||||
FROM ctv_data
|
||||
|
Loading…
x
Reference in New Issue
Block a user