From: Tomas Vondra Date: Wed, 30 Aug 2017 22:45:10 +0000 (+0200) Subject: Accept plan changes in btree_gist contrib module X-Git-Tag: XL_10_R1BETA1~136 X-Git-Url: http://git.postgresql.org/gitweb/?a=commitdiff_plain;h=30cd960811fee23e5c72b2fe1e0d86b65a866185;p=postgres-xl.git Accept plan changes in btree_gist contrib module The changes are fairly simple and generally expected due to distributing upstream queries, so adding either Remote Fast Query Execution or Remote Subquery Scan nodes. An explicit ORDER BY was added to a few queries to stabilize the output. --- diff --git a/contrib/btree_gist/expected/bit.out b/contrib/btree_gist/expected/bit.out index 8606baf366..ebdf4a8c44 100644 --- a/contrib/btree_gist/expected/bit.out +++ b/contrib/btree_gist/expected/bit.out @@ -68,9 +68,11 @@ SELECT count(*) FROM bittmp WHERE a > '011011000100010111011000110000100'; SET enable_bitmapscan=off; EXPLAIN (COSTS OFF) SELECT a FROM bittmp WHERE a BETWEEN '1000000' and '1000001'; - QUERY PLAN ------------------------------------------------------------------------ - Index Only Scan using bitidx on bittmp - Index Cond: ((a >= B'1000000'::"bit") AND (a <= B'1000001'::"bit")) -(2 rows) + QUERY PLAN +----------------------------------------------------------------------------- + Remote Fast Query Execution + Node/s: datanode_1, datanode_2 + -> Index Only Scan using bitidx on bittmp + Index Cond: ((a >= B'1000000'::"bit") AND (a <= B'1000001'::"bit")) +(4 rows) diff --git a/contrib/btree_gist/expected/bytea.out b/contrib/btree_gist/expected/bytea.out index b9efa73c08..6059f9e3a2 100644 --- a/contrib/btree_gist/expected/bytea.out +++ b/contrib/btree_gist/expected/bytea.out @@ -74,14 +74,17 @@ SELECT count(*) FROM byteatmp WHERE a = '2eb2c961c1cbf6 cf8d7b68cb9a2f36 7bbed -- Test index-only scans SET enable_bitmapscan=off; EXPLAIN (COSTS OFF) -SELECT a FROM byteatmp where a > 'ffa'::bytea; - QUERY PLAN --------------------------------------------- - Index Only Scan using byteaidx on byteatmp - Index Cond: (a > '\x666661'::bytea) -(2 rows) +SELECT a FROM byteatmp where a > 'ffa'::bytea ORDER BY a; + QUERY PLAN +-------------------------------------------------------- + Remote Subquery Scan on all (datanode_1,datanode_2) + -> Sort + Sort Key: a + -> Index Only Scan using byteaidx on byteatmp + Index Cond: (a > '\x666661'::bytea) +(5 rows) -SELECT a FROM byteatmp where a > 'ffa'::bytea; +SELECT a FROM byteatmp where a > 'ffa'::bytea ORDER BY a; a -------------------------------- \x666662656532373363376262 diff --git a/contrib/btree_gist/expected/cash.out b/contrib/btree_gist/expected/cash.out index cacbd71854..81bc43f290 100644 --- a/contrib/btree_gist/expected/cash.out +++ b/contrib/btree_gist/expected/cash.out @@ -74,12 +74,14 @@ SELECT count(*) FROM moneytmp WHERE a > '22649.64'::money; EXPLAIN (COSTS OFF) SELECT a, a <-> '21472.79' FROM moneytmp ORDER BY a <-> '21472.79' LIMIT 3; - QUERY PLAN --------------------------------------------------- + QUERY PLAN +-------------------------------------------------------------- Limit - -> Index Only Scan using moneyidx on moneytmp - Order By: (a <-> '$21,472.79'::money) -(3 rows) + -> Remote Subquery Scan on all (datanode_1,datanode_2) + -> Limit + -> Index Only Scan using moneyidx on moneytmp + Order By: (a <-> '$21,472.79'::money) +(5 rows) SELECT a, a <-> '21472.79' FROM moneytmp ORDER BY a <-> '21472.79' LIMIT 3; a | ?column? diff --git a/contrib/btree_gist/expected/char.out b/contrib/btree_gist/expected/char.out index d715c045cc..dca0a8d7f5 100644 --- a/contrib/btree_gist/expected/char.out +++ b/contrib/btree_gist/expected/char.out @@ -68,11 +68,13 @@ SELECT count(*) FROM chartmp WHERE a > '31b0'::char(32); SET enable_bitmapscan=off; EXPLAIN (COSTS OFF) SELECT * FROM chartmp WHERE a BETWEEN '31a' AND '31c'; - QUERY PLAN ---------------------------------------------------------------- - Index Only Scan using charidx on chartmp - Index Cond: ((a >= '31a'::bpchar) AND (a <= '31c'::bpchar)) -(2 rows) + QUERY PLAN +--------------------------------------------------------------------- + Remote Fast Query Execution + Node/s: datanode_1, datanode_2 + -> Index Only Scan using charidx on chartmp + Index Cond: ((a >= '31a'::bpchar) AND (a <= '31c'::bpchar)) +(4 rows) SELECT * FROM chartmp WHERE a BETWEEN '31a' AND '31c'; a diff --git a/contrib/btree_gist/expected/date.out b/contrib/btree_gist/expected/date.out index 5db864bb82..4fd08e1998 100644 --- a/contrib/btree_gist/expected/date.out +++ b/contrib/btree_gist/expected/date.out @@ -74,12 +74,14 @@ SELECT count(*) FROM datetmp WHERE a > '2001-02-13'::date; EXPLAIN (COSTS OFF) SELECT a, a <-> '2001-02-13' FROM datetmp ORDER BY a <-> '2001-02-13' LIMIT 3; - QUERY PLAN ------------------------------------------------- + QUERY PLAN +------------------------------------------------------------ Limit - -> Index Only Scan using dateidx on datetmp - Order By: (a <-> '02-13-2001'::date) -(3 rows) + -> Remote Subquery Scan on all (datanode_1,datanode_2) + -> Limit + -> Index Only Scan using dateidx on datetmp + Order By: (a <-> '02-13-2001'::date) +(5 rows) SELECT a, a <-> '2001-02-13' FROM datetmp ORDER BY a <-> '2001-02-13' LIMIT 3; a | ?column? diff --git a/contrib/btree_gist/expected/enum.out b/contrib/btree_gist/expected/enum.out index c4b769dd4b..156b245c5c 100644 --- a/contrib/btree_gist/expected/enum.out +++ b/contrib/btree_gist/expected/enum.out @@ -80,12 +80,14 @@ SELECT count(*) FROM enumtmp WHERE a > 'g'::rainbow; EXPLAIN (COSTS OFF) SELECT count(*) FROM enumtmp WHERE a >= 'g'::rainbow; - QUERY PLAN ------------------------------------------------ - Aggregate - -> Bitmap Heap Scan on enumtmp - Recheck Cond: (a >= 'g'::rainbow) - -> Bitmap Index Scan on enumidx - Index Cond: (a >= 'g'::rainbow) -(5 rows) + QUERY PLAN +----------------------------------------------------------- + Finalize Aggregate + -> Remote Subquery Scan on all (datanode_1,datanode_2) + -> Partial Aggregate + -> Bitmap Heap Scan on enumtmp + Recheck Cond: (a >= 'g'::rainbow) + -> Bitmap Index Scan on enumidx + Index Cond: (a >= 'g'::rainbow) +(7 rows) diff --git a/contrib/btree_gist/expected/float4.out b/contrib/btree_gist/expected/float4.out index abbd9eef4e..551763a9da 100644 --- a/contrib/btree_gist/expected/float4.out +++ b/contrib/btree_gist/expected/float4.out @@ -74,12 +74,14 @@ SELECT count(*) FROM float4tmp WHERE a > -179.0::float4; EXPLAIN (COSTS OFF) SELECT a, a <-> '-179.0' FROM float4tmp ORDER BY a <-> '-179.0' LIMIT 3; - QUERY PLAN ----------------------------------------------------- + QUERY PLAN +---------------------------------------------------------------- Limit - -> Index Only Scan using float4idx on float4tmp - Order By: (a <-> '-179'::real) -(3 rows) + -> Remote Subquery Scan on all (datanode_1,datanode_2) + -> Limit + -> Index Only Scan using float4idx on float4tmp + Order By: (a <-> '-179'::real) +(5 rows) SELECT a, a <-> '-179.0' FROM float4tmp ORDER BY a <-> '-179.0' LIMIT 3; a | ?column? diff --git a/contrib/btree_gist/expected/float8.out b/contrib/btree_gist/expected/float8.out index 5111dbdfae..d8f2d9a9e4 100644 --- a/contrib/btree_gist/expected/float8.out +++ b/contrib/btree_gist/expected/float8.out @@ -74,12 +74,14 @@ SELECT count(*) FROM float8tmp WHERE a > -1890.0::float8; EXPLAIN (COSTS OFF) SELECT a, a <-> '-1890.0' FROM float8tmp ORDER BY a <-> '-1890.0' LIMIT 3; - QUERY PLAN ------------------------------------------------------ + QUERY PLAN +----------------------------------------------------------------- Limit - -> Index Only Scan using float8idx on float8tmp - Order By: (a <-> '-1890'::double precision) -(3 rows) + -> Remote Subquery Scan on all (datanode_1,datanode_2) + -> Limit + -> Index Only Scan using float8idx on float8tmp + Order By: (a <-> '-1890'::double precision) +(5 rows) SELECT a, a <-> '-1890.0' FROM float8tmp ORDER BY a <-> '-1890.0' LIMIT 3; a | ?column? diff --git a/contrib/btree_gist/expected/int2.out b/contrib/btree_gist/expected/int2.out index 50a332939b..abc87b801e 100644 --- a/contrib/btree_gist/expected/int2.out +++ b/contrib/btree_gist/expected/int2.out @@ -74,12 +74,14 @@ SELECT count(*) FROM int2tmp WHERE a > 237::int2; EXPLAIN (COSTS OFF) SELECT a, a <-> '237' FROM int2tmp ORDER BY a <-> '237' LIMIT 3; - QUERY PLAN ------------------------------------------------- + QUERY PLAN +------------------------------------------------------------ Limit - -> Index Only Scan using int2idx on int2tmp - Order By: (a <-> '237'::smallint) -(3 rows) + -> Remote Subquery Scan on all (datanode_1,datanode_2) + -> Limit + -> Index Only Scan using int2idx on int2tmp + Order By: (a <-> '237'::smallint) +(5 rows) SELECT a, a <-> '237' FROM int2tmp ORDER BY a <-> '237' LIMIT 3; a | ?column? diff --git a/contrib/btree_gist/expected/int4.out b/contrib/btree_gist/expected/int4.out index 6bbdc7c3f4..5e825eee23 100644 --- a/contrib/btree_gist/expected/int4.out +++ b/contrib/btree_gist/expected/int4.out @@ -74,12 +74,14 @@ SELECT count(*) FROM int4tmp WHERE a > 237::int4; EXPLAIN (COSTS OFF) SELECT a, a <-> '237' FROM int4tmp ORDER BY a <-> '237' LIMIT 3; - QUERY PLAN ------------------------------------------------- + QUERY PLAN +------------------------------------------------------------ Limit - -> Index Only Scan using int4idx on int4tmp - Order By: (a <-> 237) -(3 rows) + -> Remote Subquery Scan on all (datanode_1,datanode_2) + -> Limit + -> Index Only Scan using int4idx on int4tmp + Order By: (a <-> 237) +(5 rows) SELECT a, a <-> '237' FROM int4tmp ORDER BY a <-> '237' LIMIT 3; a | ?column? diff --git a/contrib/btree_gist/expected/int8.out b/contrib/btree_gist/expected/int8.out index eff77c26b5..131412a472 100644 --- a/contrib/btree_gist/expected/int8.out +++ b/contrib/btree_gist/expected/int8.out @@ -74,12 +74,14 @@ SELECT count(*) FROM int8tmp WHERE a > 464571291354841::int8; EXPLAIN (COSTS OFF) SELECT a, a <-> '464571291354841' FROM int8tmp ORDER BY a <-> '464571291354841' LIMIT 3; - QUERY PLAN ------------------------------------------------------ + QUERY PLAN +----------------------------------------------------------------- Limit - -> Index Only Scan using int8idx on int8tmp - Order By: (a <-> '464571291354841'::bigint) -(3 rows) + -> Remote Subquery Scan on all (datanode_1,datanode_2) + -> Limit + -> Index Only Scan using int8idx on int8tmp + Order By: (a <-> '464571291354841'::bigint) +(5 rows) SELECT a, a <-> '464571291354841' FROM int8tmp ORDER BY a <-> '464571291354841' LIMIT 3; a | ?column? diff --git a/contrib/btree_gist/expected/interval.out b/contrib/btree_gist/expected/interval.out index 4c3d494e4a..f00584f80e 100644 --- a/contrib/btree_gist/expected/interval.out +++ b/contrib/btree_gist/expected/interval.out @@ -74,12 +74,14 @@ SELECT count(*) FROM intervaltmp WHERE a > '199 days 21:21:23'::interval; EXPLAIN (COSTS OFF) SELECT a, a <-> '199 days 21:21:23' FROM intervaltmp ORDER BY a <-> '199 days 21:21:23' LIMIT 3; - QUERY PLAN ---------------------------------------------------------------------------- + QUERY PLAN +--------------------------------------------------------------------------------------- Limit - -> Index Only Scan using intervalidx on intervaltmp - Order By: (a <-> '@ 199 days 21 hours 21 mins 23 secs'::interval) -(3 rows) + -> Remote Subquery Scan on all (datanode_1,datanode_2) + -> Limit + -> Index Only Scan using intervalidx on intervaltmp + Order By: (a <-> '@ 199 days 21 hours 21 mins 23 secs'::interval) +(5 rows) SELECT a, a <-> '199 days 21:21:23' FROM intervaltmp ORDER BY a <-> '199 days 21:21:23' LIMIT 3; a | ?column? @@ -92,12 +94,14 @@ SELECT a, a <-> '199 days 21:21:23' FROM intervaltmp ORDER BY a <-> '199 days 21 SET enable_indexonlyscan=off; EXPLAIN (COSTS OFF) SELECT a, a <-> '199 days 21:21:23' FROM intervaltmp ORDER BY a <-> '199 days 21:21:23' LIMIT 3; - QUERY PLAN ---------------------------------------------------------------------------- + QUERY PLAN +--------------------------------------------------------------------------------------- Limit - -> Index Scan using intervalidx on intervaltmp - Order By: (a <-> '@ 199 days 21 hours 21 mins 23 secs'::interval) -(3 rows) + -> Remote Subquery Scan on all (datanode_1,datanode_2) + -> Limit + -> Index Scan using intervalidx on intervaltmp + Order By: (a <-> '@ 199 days 21 hours 21 mins 23 secs'::interval) +(5 rows) SELECT a, a <-> '199 days 21:21:23' FROM intervaltmp ORDER BY a <-> '199 days 21:21:23' LIMIT 3; a | ?column? diff --git a/contrib/btree_gist/expected/macaddr.out b/contrib/btree_gist/expected/macaddr.out index c0a4c6287f..bc4eee0552 100644 --- a/contrib/btree_gist/expected/macaddr.out +++ b/contrib/btree_gist/expected/macaddr.out @@ -67,14 +67,17 @@ SELECT count(*) FROM macaddrtmp WHERE a > '22:00:5c:e5:9b:0d'::macaddr; -- Test index-only scans SET enable_bitmapscan=off; EXPLAIN (COSTS OFF) -SELECT * FROM macaddrtmp WHERE a < '02:03:04:05:06:07'::macaddr; - QUERY PLAN --------------------------------------------------- - Index Only Scan using macaddridx on macaddrtmp - Index Cond: (a < '02:03:04:05:06:07'::macaddr) -(2 rows) +SELECT * FROM macaddrtmp WHERE a < '02:03:04:05:06:07'::macaddr ORDER BY a; + QUERY PLAN +-------------------------------------------------------------- + Remote Subquery Scan on all (datanode_1,datanode_2) + -> Sort + Sort Key: a + -> Index Only Scan using macaddridx on macaddrtmp + Index Cond: (a < '02:03:04:05:06:07'::macaddr) +(5 rows) -SELECT * FROM macaddrtmp WHERE a < '02:03:04:05:06:07'::macaddr; +SELECT * FROM macaddrtmp WHERE a < '02:03:04:05:06:07'::macaddr ORDER BY a; a ------------------- 01:02:37:05:4f:36 diff --git a/contrib/btree_gist/expected/macaddr8.out b/contrib/btree_gist/expected/macaddr8.out index e5ec6a5dea..1d87771cde 100644 --- a/contrib/btree_gist/expected/macaddr8.out +++ b/contrib/btree_gist/expected/macaddr8.out @@ -67,14 +67,17 @@ SELECT count(*) FROM macaddr8tmp WHERE a > '22:00:5c:e5:9b:0d'::macaddr8; -- Test index-only scans SET enable_bitmapscan=off; EXPLAIN (COSTS OFF) -SELECT * FROM macaddr8tmp WHERE a < '02:03:04:05:06:07'::macaddr8; - QUERY PLAN ---------------------------------------------------------- - Index Only Scan using macaddr8idx on macaddr8tmp - Index Cond: (a < '02:03:04:ff:fe:05:06:07'::macaddr8) -(2 rows) +SELECT * FROM macaddr8tmp WHERE a < '02:03:04:05:06:07'::macaddr8 ORDER BY a; + QUERY PLAN +--------------------------------------------------------------------- + Remote Subquery Scan on all (datanode_1,datanode_2) + -> Sort + Sort Key: a + -> Index Only Scan using macaddr8idx on macaddr8tmp + Index Cond: (a < '02:03:04:ff:fe:05:06:07'::macaddr8) +(5 rows) -SELECT * FROM macaddr8tmp WHERE a < '02:03:04:05:06:07'::macaddr8; +SELECT * FROM macaddr8tmp WHERE a < '02:03:04:05:06:07'::macaddr8 ORDER BY a; a ------------------------- 01:02:37:ff:fe:05:4f:36 diff --git a/contrib/btree_gist/expected/not_equal.out b/contrib/btree_gist/expected/not_equal.out index 85b1e868a8..e07ce52628 100644 --- a/contrib/btree_gist/expected/not_equal.out +++ b/contrib/btree_gist/expected/not_equal.out @@ -11,13 +11,15 @@ INSERT INTO test_ne VALUES('2011-09-01', 43.7); INSERT INTO test_ne SELECT '2009-01-01', 10.7 FROM generate_series(1,1000); SET enable_indexscan to false; EXPLAIN (COSTS OFF) SELECT * FROM test_ne WHERE a <> '2009-01-01' AND b <> 10.7; - QUERY PLAN ------------------------------------------------------------------------------------------------------- - Bitmap Heap Scan on test_ne - Recheck Cond: ((a <> 'Thu Jan 01 00:00:00 2009'::timestamp without time zone) AND (b <> 10.7)) - -> Bitmap Index Scan on test_ne_idx - Index Cond: ((a <> 'Thu Jan 01 00:00:00 2009'::timestamp without time zone) AND (b <> 10.7)) -(4 rows) + QUERY PLAN +------------------------------------------------------------------------------------------------------------ + Remote Fast Query Execution + Node/s: datanode_1, datanode_2 + -> Bitmap Heap Scan on test_ne + Recheck Cond: ((a <> 'Thu Jan 01 00:00:00 2009'::timestamp without time zone) AND (b <> 10.7)) + -> Bitmap Index Scan on test_ne_idx + Index Cond: ((a <> 'Thu Jan 01 00:00:00 2009'::timestamp without time zone) AND (b <> 10.7)) +(6 rows) SELECT * FROM test_ne WHERE a <> '2009-01-01' AND b <> 10.7; a | b diff --git a/contrib/btree_gist/expected/numeric.out b/contrib/btree_gist/expected/numeric.out index ae839b8ec8..c29432fcf2 100644 --- a/contrib/btree_gist/expected/numeric.out +++ b/contrib/btree_gist/expected/numeric.out @@ -190,13 +190,14 @@ SELECT count(*) FROM numerictmp WHERE a > 0 ; SET enable_bitmapscan=off; EXPLAIN (COSTS OFF) SELECT * FROM numerictmp WHERE a BETWEEN 1 AND 300 ORDER BY a; - QUERY PLAN ---------------------------------------------------------------------- - Sort - Sort Key: a - -> Index Only Scan using numericidx on numerictmp - Index Cond: ((a >= '1'::numeric) AND (a <= '300'::numeric)) -(4 rows) + QUERY PLAN +--------------------------------------------------------------------------- + Remote Subquery Scan on all (datanode_1,datanode_2) + -> Sort + Sort Key: a + -> Index Only Scan using numericidx on numerictmp + Index Cond: ((a >= '1'::numeric) AND (a <= '300'::numeric)) +(5 rows) SELECT * FROM numerictmp WHERE a BETWEEN 1 AND 300 ORDER BY a; a diff --git a/contrib/btree_gist/expected/text.out b/contrib/btree_gist/expected/text.out index bb4e2e62d1..40ee34f5c9 100644 --- a/contrib/btree_gist/expected/text.out +++ b/contrib/btree_gist/expected/text.out @@ -75,11 +75,13 @@ SELECT count(*) FROM texttmp WHERE a = '2eb2c961c1cbf6 cf8d7b68cb9a2f36 7bbedb SET enable_bitmapscan=off; EXPLAIN (COSTS OFF) SELECT * FROM texttmp WHERE a BETWEEN '31a' AND '31c'; - QUERY PLAN ------------------------------------------------------------ - Index Only Scan using textidx on texttmp - Index Cond: ((a >= '31a'::text) AND (a <= '31c'::text)) -(2 rows) + QUERY PLAN +----------------------------------------------------------------- + Remote Fast Query Execution + Node/s: datanode_1, datanode_2 + -> Index Only Scan using textidx on texttmp + Index Cond: ((a >= '31a'::text) AND (a <= '31c'::text)) +(4 rows) SELECT * FROM texttmp WHERE a BETWEEN '31a' AND '31c'; a diff --git a/contrib/btree_gist/expected/time.out b/contrib/btree_gist/expected/time.out index ec95ef77c5..c5ad6f4140 100644 --- a/contrib/btree_gist/expected/time.out +++ b/contrib/btree_gist/expected/time.out @@ -74,12 +74,14 @@ SELECT count(*) FROM timetmp WHERE a > '10:57:11'::time; EXPLAIN (COSTS OFF) SELECT a, a <-> '10:57:11' FROM timetmp ORDER BY a <-> '10:57:11' LIMIT 3; - QUERY PLAN --------------------------------------------------------------- + QUERY PLAN +-------------------------------------------------------------------------- Limit - -> Index Only Scan using timeidx on timetmp - Order By: (a <-> '10:57:11'::time without time zone) -(3 rows) + -> Remote Subquery Scan on all (datanode_1,datanode_2) + -> Limit + -> Index Only Scan using timeidx on timetmp + Order By: (a <-> '10:57:11'::time without time zone) +(5 rows) SELECT a, a <-> '10:57:11' FROM timetmp ORDER BY a <-> '10:57:11' LIMIT 3; a | ?column? diff --git a/contrib/btree_gist/expected/timestamp.out b/contrib/btree_gist/expected/timestamp.out index 0d94f2f245..ed45336144 100644 --- a/contrib/btree_gist/expected/timestamp.out +++ b/contrib/btree_gist/expected/timestamp.out @@ -74,12 +74,14 @@ SELECT count(*) FROM timestamptmp WHERE a > '2004-10-26 08:55:08'::timestamp; EXPLAIN (COSTS OFF) SELECT a, a <-> '2004-10-26 08:55:08' FROM timestamptmp ORDER BY a <-> '2004-10-26 08:55:08' LIMIT 3; - QUERY PLAN ------------------------------------------------------------------------------------ + QUERY PLAN +----------------------------------------------------------------------------------------------- Limit - -> Index Only Scan using timestampidx on timestamptmp - Order By: (a <-> 'Tue Oct 26 08:55:08 2004'::timestamp without time zone) -(3 rows) + -> Remote Subquery Scan on all (datanode_1,datanode_2) + -> Limit + -> Index Only Scan using timestampidx on timestamptmp + Order By: (a <-> 'Tue Oct 26 08:55:08 2004'::timestamp without time zone) +(5 rows) SELECT a, a <-> '2004-10-26 08:55:08' FROM timestamptmp ORDER BY a <-> '2004-10-26 08:55:08' LIMIT 3; a | ?column? diff --git a/contrib/btree_gist/expected/timestamptz.out b/contrib/btree_gist/expected/timestamptz.out index 75a15a4256..04e6850093 100644 --- a/contrib/btree_gist/expected/timestamptz.out +++ b/contrib/btree_gist/expected/timestamptz.out @@ -194,12 +194,14 @@ SELECT count(*) FROM timestamptztmp WHERE a > '2018-12-18 10:59:54 GMT+4'::time EXPLAIN (COSTS OFF) SELECT a, a <-> '2018-12-18 10:59:54 GMT+2' FROM timestamptztmp ORDER BY a <-> '2018-12-18 10:59:54 GMT+2' LIMIT 3; - QUERY PLAN ------------------------------------------------------------------------------------- + QUERY PLAN +------------------------------------------------------------------------------------------------ Limit - -> Index Only Scan using timestamptzidx on timestamptztmp - Order By: (a <-> 'Tue Dec 18 04:59:54 2018 PST'::timestamp with time zone) -(3 rows) + -> Remote Subquery Scan on all (datanode_1,datanode_2) + -> Limit + -> Index Only Scan using timestamptzidx on timestamptztmp + Order By: (a <-> 'Tue Dec 18 04:59:54 2018 PST'::timestamp with time zone) +(5 rows) SELECT a, a <-> '2018-12-18 10:59:54 GMT+2' FROM timestamptztmp ORDER BY a <-> '2018-12-18 10:59:54 GMT+2' LIMIT 3; a | ?column? diff --git a/contrib/btree_gist/expected/varbit.out b/contrib/btree_gist/expected/varbit.out index 538ace85c9..c871db4c95 100644 --- a/contrib/btree_gist/expected/varbit.out +++ b/contrib/btree_gist/expected/varbit.out @@ -68,9 +68,11 @@ SELECT count(*) FROM varbittmp WHERE a > '1110100111010'::varbit; SET enable_bitmapscan=off; EXPLAIN (COSTS OFF) SELECT a FROM bittmp WHERE a BETWEEN '1000000' and '1000001'; - QUERY PLAN ------------------------------------------------------------------------ - Index Only Scan using bitidx on bittmp - Index Cond: ((a >= B'1000000'::"bit") AND (a <= B'1000001'::"bit")) -(2 rows) + QUERY PLAN +----------------------------------------------------------------------------- + Remote Fast Query Execution + Node/s: datanode_1, datanode_2 + -> Index Only Scan using bitidx on bittmp + Index Cond: ((a >= B'1000000'::"bit") AND (a <= B'1000001'::"bit")) +(4 rows) diff --git a/contrib/btree_gist/sql/bytea.sql b/contrib/btree_gist/sql/bytea.sql index 6885f5e56d..630b3b9492 100644 --- a/contrib/btree_gist/sql/bytea.sql +++ b/contrib/btree_gist/sql/bytea.sql @@ -36,5 +36,5 @@ SELECT count(*) FROM byteatmp WHERE a = '2eb2c961c1cbf6 cf8d7b68cb9a2f36 7bbed -- Test index-only scans SET enable_bitmapscan=off; EXPLAIN (COSTS OFF) -SELECT a FROM byteatmp where a > 'ffa'::bytea; -SELECT a FROM byteatmp where a > 'ffa'::bytea; +SELECT a FROM byteatmp where a > 'ffa'::bytea ORDER BY a; +SELECT a FROM byteatmp where a > 'ffa'::bytea ORDER BY a; diff --git a/contrib/btree_gist/sql/macaddr.sql b/contrib/btree_gist/sql/macaddr.sql index 85c271f7ce..d3fdd02cfd 100644 --- a/contrib/btree_gist/sql/macaddr.sql +++ b/contrib/btree_gist/sql/macaddr.sql @@ -33,5 +33,5 @@ SELECT count(*) FROM macaddrtmp WHERE a > '22:00:5c:e5:9b:0d'::macaddr; -- Test index-only scans SET enable_bitmapscan=off; EXPLAIN (COSTS OFF) -SELECT * FROM macaddrtmp WHERE a < '02:03:04:05:06:07'::macaddr; -SELECT * FROM macaddrtmp WHERE a < '02:03:04:05:06:07'::macaddr; +SELECT * FROM macaddrtmp WHERE a < '02:03:04:05:06:07'::macaddr ORDER BY a; +SELECT * FROM macaddrtmp WHERE a < '02:03:04:05:06:07'::macaddr ORDER BY a; diff --git a/contrib/btree_gist/sql/macaddr8.sql b/contrib/btree_gist/sql/macaddr8.sql index 61e7d7af40..76252374eb 100644 --- a/contrib/btree_gist/sql/macaddr8.sql +++ b/contrib/btree_gist/sql/macaddr8.sql @@ -33,5 +33,5 @@ SELECT count(*) FROM macaddr8tmp WHERE a > '22:00:5c:e5:9b:0d'::macaddr8; -- Test index-only scans SET enable_bitmapscan=off; EXPLAIN (COSTS OFF) -SELECT * FROM macaddr8tmp WHERE a < '02:03:04:05:06:07'::macaddr8; -SELECT * FROM macaddr8tmp WHERE a < '02:03:04:05:06:07'::macaddr8; +SELECT * FROM macaddr8tmp WHERE a < '02:03:04:05:06:07'::macaddr8 ORDER BY a; +SELECT * FROM macaddr8tmp WHERE a < '02:03:04:05:06:07'::macaddr8 ORDER BY a;