From 51c3215137ff5f33d3090a1e88e6831c7703a1fa Mon Sep 17 00:00:00 2001 From: Javier Goizueta Date: Tue, 17 Jul 2018 12:42:33 +0200 Subject: [PATCH] Change UNION by UNION ALL in tests It seems UNION (without ALL) can be much slower in recent PG versions --- test/acceptance/aggregation.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/test/acceptance/aggregation.js b/test/acceptance/aggregation.js index d0d272e5..17944029 100644 --- a/test/acceptance/aggregation.js +++ b/test/acceptance/aggregation.js @@ -178,7 +178,7 @@ describe('aggregation', function () { ST_SetSRID(ST_MakePoint(x*l, y*l), 3857) AS the_geom_webmercator, ST_Transform(ST_SetSRID(ST_MakePoint(x*l, y*l), 3857), 4326) AS the_geom FROM params, generate_series(-1,1) x, generate_series(-1,1) y - UNION + UNION ALL SELECT row_number() OVER () + 9 AS cartodb_id, ST_SetSRID(ST_MakePoint(x*l-l/2, y*l-l/2), 3857) AS the_geom_webmercator, @@ -193,15 +193,15 @@ describe('aggregation', function () { 1 AS cartodb_id, ST_SetSRID(ST_MakePoint(18181005.8, -18181043.9), 3857) AS the_geom_webmercator, ST_Transform(ST_SetSRID(ST_MakePoint(18181005.8, -18181043.9), 3857), 4326) AS the_geom - UNION SELECT + UNION ALL SELECT 2 AS cartodb_id, ST_SetSRID(ST_MakePoint(18181005.9, -18181044.0), 3857) AS the_geom_webmercator, ST_Transform(ST_SetSRID(ST_MakePoint(18181005.9, -18181044.0), 3857), 4326) AS the_geom - UNION SELECT + UNION ALL SELECT 3 AS cartodb_id, ST_SetSRID(ST_MakePoint(18181005.87, -18181043.94), 3857) AS the_geom_webmercator, ST_Transform(ST_SetSRID(ST_MakePoint(18181005.87, -18181043.94), 3857), 4326) AS the_geom - UNION SELECT + UNION ALL SELECT 4 AS cartodb_id, ST_SetSRID(ST_MakePoint(18181005.8, -18181043.9), 3857) AS the_geom_webmercator, ST_Transform(ST_SetSRID(ST_MakePoint(18181005.8, -18181043.9), 3857), 4326) AS the_geom @@ -214,15 +214,15 @@ describe('aggregation', function () { 1 AS cartodb_id, ST_SetSRID(ST_MakePoint(18181005.95, -18181043.8), 3857) AS the_geom_webmercator, ST_Transform(ST_SetSRID(ST_MakePoint(18181005.95, -18181043.8), 3857), 4326) AS the_geom - UNION SELECT + UNION ALL SELECT 2 AS cartodb_id, ST_SetSRID(ST_MakePoint(18181006.09, -18181043.72), 3857) AS the_geom_webmercator, ST_Transform(ST_SetSRID(ST_MakePoint(18181006.09, -18181043.72), 3857), 4326) AS the_geom - UNION SELECT + UNION ALL SELECT 3 AS cartodb_id, ST_SetSRID(ST_MakePoint(18181006.02, -18181043.79), 3857) AS the_geom_webmercator, ST_Transform(ST_SetSRID(ST_MakePoint(18181006.02, -18181043.79), 3857), 4326) AS the_geom - UNION SELECT + UNION ALL SELECT 4 AS cartodb_id, ST_SetSRID(ST_MakePoint(18181006.01, -18181043.75), 3857) AS the_geom_webmercator, ST_Transform(ST_SetSRID(ST_MakePoint(18181006.01, -18181043.75), 3857), 4326) AS the_geom