mirror of https://github.com/citusdata/citus.git
Removes large_table_shard_count GUC
parent
b1e6636398
commit
121ff39b26
|
@ -34,7 +34,6 @@
|
|||
|
||||
|
||||
/* Config variables managed via guc.c */
|
||||
int LargeTableShardCount = 4; /* shard counts for a large table */
|
||||
bool LogMultiJoinOrder = false; /* print join order as a debugging aid */
|
||||
|
||||
/* Function pointer type definition for join rule evaluation functions */
|
||||
|
|
|
@ -71,6 +71,7 @@ static bool StatisticsCollectionGucCheckHook(bool *newval, void **extra, GucSour
|
|||
|
||||
/* static variable to hold value of deprecated GUC variable */
|
||||
static bool ExpireCachedShards = false;
|
||||
static int LargeTableShardCount = 0;
|
||||
|
||||
|
||||
/* *INDENT-OFF* */
|
||||
|
@ -656,15 +657,12 @@ RegisterCitusConfigVariables(void)
|
|||
|
||||
DefineCustomIntVariable(
|
||||
"citus.large_table_shard_count",
|
||||
gettext_noop("The shard count threshold over which a table is considered large."),
|
||||
gettext_noop("A distributed table is considered to be large if it has "
|
||||
"more shards than the value specified here. This largeness "
|
||||
"criteria is then used in picking a table join order during "
|
||||
"distributed query planning."),
|
||||
gettext_noop("This variable has been deprecated."),
|
||||
gettext_noop("Consider reference tables instead"),
|
||||
&LargeTableShardCount,
|
||||
4, 1, 10000,
|
||||
PGC_USERSET,
|
||||
0,
|
||||
GUC_NO_SHOW_ALL,
|
||||
NULL, NULL, NULL);
|
||||
|
||||
DefineCustomIntVariable(
|
||||
|
|
|
@ -74,7 +74,6 @@ typedef struct JoinOrderNode
|
|||
|
||||
|
||||
/* Config variables managed via guc.c */
|
||||
extern int LargeTableShardCount;
|
||||
extern bool LogMultiJoinOrder;
|
||||
|
||||
|
||||
|
|
|
@ -73,7 +73,6 @@ check-multi-mx: all tempinstall-main
|
|||
check-multi-task-tracker-extra: all tempinstall-main
|
||||
$(pg_regress_multi_check) --load-extension=citus \
|
||||
--server-option=citus.task_executor_type=task-tracker \
|
||||
--server-option=citus.large_table_shard_count=1 \
|
||||
-- $(MULTI_REGRESS_OPTS) --schedule=$(citus_abs_srcdir)/multi_task_tracker_extra_schedule $(EXTRA_TESTS)
|
||||
|
||||
check-follower-cluster: all
|
||||
|
|
|
@ -831,7 +831,6 @@ Aggregate
|
|||
-> Seq Scan on lineitem_290001 lineitem
|
||||
Filter: (l_orderkey > 9030)
|
||||
-- Test re-partition join
|
||||
SET citus.large_table_shard_count TO 1;
|
||||
EXPLAIN (COSTS FALSE)
|
||||
SELECT count(*)
|
||||
FROM lineitem, orders, customer_append, supplier_single_shard
|
||||
|
|
|
@ -831,7 +831,6 @@ Aggregate
|
|||
-> Seq Scan on lineitem_290001 lineitem
|
||||
Filter: (l_orderkey > 9030)
|
||||
-- Test re-partition join
|
||||
SET citus.large_table_shard_count TO 1;
|
||||
EXPLAIN (COSTS FALSE)
|
||||
SELECT count(*)
|
||||
FROM lineitem, orders, customer_append, supplier_single_shard
|
||||
|
|
|
@ -81,8 +81,6 @@ DEBUG: join prunable for intervals [8997,14947] and [1,5986]
|
|||
explain statements for distributed queries are not enabled
|
||||
(2 rows)
|
||||
|
||||
-- Update configuration to treat lineitem and orders tables as large
|
||||
SET citus.large_table_shard_count TO 2;
|
||||
SET client_min_messages TO LOG;
|
||||
-- The following queries check that we correctly handle joins and OR clauses. In
|
||||
-- particular, these queries check that we factorize out OR clauses if possible,
|
||||
|
@ -103,12 +101,6 @@ EXPLAIN SELECT l_quantity FROM lineitem, orders
|
|||
LOG: join order: [ "lineitem" ][ cartesian product "orders" ]
|
||||
ERROR: cannot perform distributed planning on this query
|
||||
DETAIL: Cartesian products are currently unsupported
|
||||
-- The below queries modify the partition method in pg_dist_partition. We thus
|
||||
-- begin a transaction here so the changes don't impact any other parallel
|
||||
-- running tests.
|
||||
BEGIN;
|
||||
-- Validate that we take into account the partition method when building the
|
||||
-- join-order plan.
|
||||
EXPLAIN SELECT count(*) FROM orders, lineitem_hash
|
||||
WHERE o_orderkey = l_orderkey;
|
||||
LOG: join order: [ "orders" ][ single partition join "lineitem_hash" ]
|
||||
|
@ -141,8 +133,6 @@ LOG: join order: [ "customer_hash" ][ reference join "nation" ]
|
|||
explain statements for distributed queries are not enabled
|
||||
(3 rows)
|
||||
|
||||
-- Update the large table shard count for all the following tests.
|
||||
SET citus.large_table_shard_count TO 1;
|
||||
-- Validate that we don't use a single-partition join method for a hash
|
||||
-- re-partitioned table, thus preventing a partition of just the customer table.
|
||||
EXPLAIN SELECT count(*) FROM orders, lineitem, customer_append
|
||||
|
@ -179,7 +169,6 @@ LOG: join order: [ "orders_hash" ][ single partition join "customer_append" ]
|
|||
explain statements for distributed queries are not enabled
|
||||
(3 rows)
|
||||
|
||||
COMMIT;
|
||||
-- Reset client logging level to its previous value
|
||||
SET client_min_messages TO NOTICE;
|
||||
DROP TABLE lineitem_hash;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
--
|
||||
-- MULTI_JOIN_ORDER_TPCH_LARGE
|
||||
-- MULTI_JOIN_ORDER_TPCH_REPARTITION
|
||||
--
|
||||
SET citus.next_shard_id TO 660000;
|
||||
-- Enable configuration to print table join order
|
||||
|
@ -7,11 +7,9 @@ SET citus.explain_distributed_queries TO off;
|
|||
SET citus.log_multi_join_order TO TRUE;
|
||||
SET citus.task_executor_type = 'task-tracker'; -- can't explain all queries otherwise
|
||||
SET client_min_messages TO LOG;
|
||||
-- Change configuration to treat lineitem, orders, customer, and part tables as
|
||||
-- large. The following queries are basically the same as the ones in tpch_small
|
||||
-- The following queries are basically the same as the ones in tpch_small
|
||||
-- except that more data has been loaded into customer and part tables. Therefore,
|
||||
-- we will apply different distributed join strategies for these queries.
|
||||
SET citus.large_table_shard_count TO 2;
|
||||
-- Query #6 from the TPC-H decision support benchmark
|
||||
EXPLAIN SELECT
|
||||
sum(l_extendedprice * l_discount) as revenue
|
|
@ -5,8 +5,6 @@
|
|||
SET citus.explain_distributed_queries TO off;
|
||||
SET citus.log_multi_join_order TO TRUE;
|
||||
SET client_min_messages TO LOG;
|
||||
-- Change configuration to treat lineitem and orders tables as large
|
||||
SET citus.large_table_shard_count TO 2;
|
||||
-- Query #6 from the TPC-H decision support benchmark
|
||||
EXPLAIN SELECT
|
||||
sum(l_extendedprice * l_discount) as revenue
|
||||
|
|
|
@ -1,13 +1,11 @@
|
|||
--
|
||||
-- MULTI_JOIN_PRUNING
|
||||
--
|
||||
-- Check that join-pruning works for joins between two large relations. For now
|
||||
-- Check that join-pruning works for joins between two relations. For now
|
||||
-- we only check for join-pruning between locally partitioned relations. In the
|
||||
-- future we want to check for pruning between re-partitioned relations as well.
|
||||
SET citus.explain_distributed_queries TO off;
|
||||
SET client_min_messages TO DEBUG2;
|
||||
-- Change configuration to treat all tables as large
|
||||
SET citus.large_table_shard_count TO 2;
|
||||
SELECT sum(l_linenumber), avg(l_linenumber) FROM lineitem, orders
|
||||
WHERE l_orderkey = o_orderkey;
|
||||
DEBUG: join prunable for intervals [1,5986] and [8997,14947]
|
||||
|
|
|
@ -65,11 +65,8 @@ SELECT c_custkey, c_name, count(*) as lineitem_count
|
|||
304 | Customer#000000304 | 31
|
||||
(10 rows)
|
||||
|
||||
-- Now, enable limit optimization to fetch half of each task's results. For this
|
||||
-- test, we also change a config setting to ensure that we don't repartition any
|
||||
-- of the tables during the query.
|
||||
-- Now, enable limit optimization to fetch half of each task's results.
|
||||
SET citus.limit_clause_row_fetch_count TO 150;
|
||||
SET citus.large_table_shard_count TO 2;
|
||||
SELECT c_custkey, c_name, count(*) as lineitem_count
|
||||
FROM customer, orders, lineitem
|
||||
WHERE c_custkey = o_custkey AND l_orderkey = o_orderkey
|
||||
|
@ -90,7 +87,6 @@ DEBUG: push down of limit count: 150
|
|||
304 | Customer#000000304 | 31
|
||||
(10 rows)
|
||||
|
||||
RESET citus.large_table_shard_count;
|
||||
-- We now test scenarios where applying the limit optimization wouldn't produce
|
||||
-- meaningful results. First, we check that we don't push down the limit clause
|
||||
-- for non-commutative aggregates.
|
||||
|
|
|
@ -496,7 +496,6 @@ Aggregate
|
|||
-> Index Only Scan using lineitem_mx_pkey_1220052 on lineitem_mx_1220052 lineitem_mx
|
||||
Index Cond: (l_orderkey > 9030)
|
||||
-- Test re-partition join
|
||||
SET citus.large_table_shard_count TO 1;
|
||||
EXPLAIN (COSTS FALSE)
|
||||
SELECT count(*)
|
||||
FROM lineitem_mx, orders_mx, customer_mx, supplier_mx
|
||||
|
|
|
@ -496,7 +496,6 @@ Aggregate
|
|||
-> Index Only Scan using lineitem_mx_pkey_1220052 on lineitem_mx_1220052 lineitem_mx
|
||||
Index Cond: (l_orderkey > 9030)
|
||||
-- Test re-partition join
|
||||
SET citus.large_table_shard_count TO 1;
|
||||
EXPLAIN (COSTS FALSE)
|
||||
SELECT count(*)
|
||||
FROM lineitem_mx, orders_mx, customer_mx, supplier_mx
|
||||
|
|
|
@ -166,7 +166,6 @@ SELECT * FROM repartition_udt JOIN repartition_udt_other
|
|||
(0 rows)
|
||||
|
||||
-- Query that should result in a repartition join on UDT column.
|
||||
SET citus.large_table_shard_count = 1;
|
||||
SET citus.log_multi_join_order = true;
|
||||
EXPLAIN SELECT * FROM repartition_udt JOIN repartition_udt_other
|
||||
ON repartition_udt.udtcol = repartition_udt_other.udtcol
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
\c - - - :worker_1_port
|
||||
SET client_min_messages = LOG;
|
||||
-- Query that should result in a repartition join on UDT column.
|
||||
SET citus.large_table_shard_count = 1;
|
||||
SET citus.task_executor_type = 'task-tracker';
|
||||
SET citus.log_multi_join_order = true;
|
||||
-- Query that should result in a repartition
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
\c - - - :worker_2_port
|
||||
SET client_min_messages = LOG;
|
||||
-- Query that should result in a repartition join on UDT column.
|
||||
SET citus.large_table_shard_count = 1;
|
||||
SET citus.task_executor_type = 'task-tracker';
|
||||
SET citus.log_multi_join_order = true;
|
||||
-- Query that should result in a repartition
|
||||
|
|
|
@ -57,7 +57,6 @@ INSERT INTO articles_hash_mx VALUES (48, 8, 'alkylic', 18610);
|
|||
INSERT INTO articles_hash_mx VALUES (49, 9, 'anyone', 2681);
|
||||
INSERT INTO articles_hash_mx VALUES (50, 10, 'anjanette', 19519);
|
||||
SET citus.task_executor_type TO 'real-time';
|
||||
SET citus.large_table_shard_count TO 2;
|
||||
SET client_min_messages TO 'DEBUG2';
|
||||
-- insert a single row for the test
|
||||
INSERT INTO articles_single_shard_hash_mx VALUES (50, 10, 'anjanette', 19519);
|
||||
|
|
|
@ -3,8 +3,6 @@
|
|||
--
|
||||
-- connect to the coordinator
|
||||
\c - - - :master_port
|
||||
-- Change configuration to treat lineitem and orders tables as large
|
||||
SET citus.large_table_shard_count TO 2;
|
||||
-- Query #1 from the TPC-H decision support benchmark
|
||||
SELECT
|
||||
l_returnflag,
|
||||
|
@ -37,8 +35,6 @@ ORDER BY
|
|||
|
||||
-- connect one of the workers
|
||||
\c - - - :worker_1_port
|
||||
-- Change configuration to treat lineitem and orders tables as large
|
||||
SET citus.large_table_shard_count TO 2;
|
||||
-- Query #1 from the TPC-H decision support benchmark
|
||||
SELECT
|
||||
l_returnflag,
|
||||
|
@ -71,8 +67,6 @@ ORDER BY
|
|||
|
||||
-- connect to the other node
|
||||
\c - - - :worker_2_port
|
||||
-- Change configuration to treat lineitem and orders tables as large
|
||||
SET citus.large_table_shard_count TO 2;
|
||||
-- Query #1 from the TPC-H decision support benchmark
|
||||
SELECT
|
||||
l_returnflag,
|
||||
|
|
|
@ -1,9 +1,7 @@
|
|||
--
|
||||
-- MULTI_MX_TPCH_QUERY10
|
||||
--
|
||||
-- Query #10 from the TPC-H decision support benchmark. Unlike other TPC-H tests,
|
||||
-- we don't set citus.large_table_shard_count here, and instead use the default value
|
||||
-- coming from postgresql.conf or multi_task_tracker_executor.conf.
|
||||
-- Query #10 from the TPC-H decision support benchmark.
|
||||
-- connect to master
|
||||
\c - - - :master_port
|
||||
SELECT
|
||||
|
|
|
@ -3,8 +3,6 @@
|
|||
--
|
||||
-- connect to the coordinator
|
||||
\c - - - :master_port
|
||||
-- Change configuration to treat lineitem and orders tables as large
|
||||
SET citus.large_table_shard_count TO 2;
|
||||
-- Query #12 from the TPC-H decision support benchmark
|
||||
SELECT
|
||||
l_shipmode,
|
||||
|
@ -42,8 +40,6 @@ ORDER BY
|
|||
|
||||
-- connect one of the workers
|
||||
\c - - - :worker_1_port
|
||||
-- Change configuration to treat lineitem and orders tables as large
|
||||
SET citus.large_table_shard_count TO 2;
|
||||
-- Query #12 from the TPC-H decision support benchmark
|
||||
SELECT
|
||||
l_shipmode,
|
||||
|
@ -81,8 +77,6 @@ ORDER BY
|
|||
|
||||
-- connect to the other worker node
|
||||
\c - - - :worker_2_port
|
||||
-- Change configuration to treat lineitem and orders tables as large
|
||||
SET citus.large_table_shard_count TO 2;
|
||||
-- Query #12 from the TPC-H decision support benchmark
|
||||
SELECT
|
||||
l_shipmode,
|
||||
|
|
|
@ -3,8 +3,6 @@
|
|||
--
|
||||
-- connect to the coordinator
|
||||
\c - - - :master_port
|
||||
-- Change configuration to treat lineitem and orders tables as large
|
||||
SET citus.large_table_shard_count TO 2;
|
||||
-- Query #14 from the TPC-H decision support benchmark
|
||||
SELECT
|
||||
100.00 * sum(case
|
||||
|
@ -26,8 +24,6 @@ WHERE
|
|||
|
||||
-- connect one of the workers
|
||||
\c - - - :worker_1_port
|
||||
-- Change configuration to treat lineitem and orders tables as large
|
||||
SET citus.large_table_shard_count TO 2;
|
||||
-- Query #14 from the TPC-H decision support benchmark
|
||||
SELECT
|
||||
100.00 * sum(case
|
||||
|
@ -49,8 +45,6 @@ WHERE
|
|||
|
||||
-- connect to the other node
|
||||
\c - - - :worker_2_port
|
||||
-- Change configuration to treat lineitem and orders tables as large
|
||||
SET citus.large_table_shard_count TO 2;
|
||||
-- Query #14 from the TPC-H decision support benchmark
|
||||
SELECT
|
||||
100.00 * sum(case
|
||||
|
|
|
@ -3,8 +3,6 @@
|
|||
--
|
||||
-- connect to the coordinator
|
||||
\c - - - :master_port
|
||||
-- Change configuration to treat lineitem and orders tables as large
|
||||
SET citus.large_table_shard_count TO 2;
|
||||
-- Query #19 from the TPC-H decision support benchmark. Note that we modified
|
||||
-- the query from its original to make it work on smaller data sets.
|
||||
SELECT
|
||||
|
@ -43,8 +41,6 @@ WHERE
|
|||
|
||||
-- connect one of the workers
|
||||
\c - - - :worker_1_port
|
||||
-- Change configuration to treat lineitem and orders tables as large
|
||||
SET citus.large_table_shard_count TO 2;
|
||||
-- Query #19 from the TPC-H decision support benchmark. Note that we modified
|
||||
-- the query from its original to make it work on smaller data sets.
|
||||
SELECT
|
||||
|
@ -83,8 +79,6 @@ WHERE
|
|||
|
||||
-- connect to the other node
|
||||
\c - - - :worker_2_port
|
||||
-- Change configuration to treat lineitem and orders tables as large
|
||||
SET citus.large_table_shard_count TO 2;
|
||||
-- Query #19 from the TPC-H decision support benchmark. Note that we modified
|
||||
-- the query from its original to make it work on smaller data sets.
|
||||
SELECT
|
||||
|
|
|
@ -1,9 +1,7 @@
|
|||
--
|
||||
-- MULTI_MX_TPCH_QUERY3
|
||||
--
|
||||
-- Query #3 from the TPC-H decision support benchmark. Unlike other TPC-H tests,
|
||||
-- we don't set citus.large_table_shard_count here, and instead use the default value
|
||||
-- coming from postgresql.conf or multi_task_tracker_executor.conf.
|
||||
-- Query #3 from the TPC-H decision support benchmark.
|
||||
-- connect to the coordinator
|
||||
\c - - - :master_port
|
||||
SELECT
|
||||
|
|
|
@ -3,8 +3,6 @@
|
|||
--
|
||||
-- connect to the coordinator
|
||||
\c - - - :master_port
|
||||
-- Change configuration to treat lineitem and orders tables as large
|
||||
SET citus.large_table_shard_count TO 2;
|
||||
-- Query #6 from the TPC-H decision support benchmark
|
||||
SELECT
|
||||
sum(l_extendedprice * l_discount) as revenue
|
||||
|
@ -22,8 +20,6 @@ WHERE
|
|||
|
||||
-- connect to one of the worker nodes
|
||||
\c - - - :worker_1_port
|
||||
-- Change configuration to treat lineitem and orders tables as large
|
||||
SET citus.large_table_shard_count TO 2;
|
||||
-- Query #6 from the TPC-H decision support benchmark
|
||||
SELECT
|
||||
sum(l_extendedprice * l_discount) as revenue
|
||||
|
@ -41,8 +37,6 @@ WHERE
|
|||
|
||||
-- connect to the other worker node
|
||||
\c - - - :worker_2_port
|
||||
-- Change configuration to treat lineitem and orders tables as large
|
||||
SET citus.large_table_shard_count TO 2;
|
||||
-- Query #6 from the TPC-H decision support benchmark
|
||||
SELECT
|
||||
sum(l_extendedprice * l_discount) as revenue
|
||||
|
|
|
@ -3,8 +3,6 @@
|
|||
--
|
||||
-- connect to the coordinator
|
||||
\c - - - :master_port
|
||||
-- Change configuration to treat lineitem AND orders tables as large
|
||||
SET citus.large_table_shard_count TO 2;
|
||||
-- Query #7 from the TPC-H decision support benchmark
|
||||
SELECT
|
||||
supp_nation,
|
||||
|
@ -52,8 +50,6 @@ ORDER BY
|
|||
|
||||
-- connect one of the workers
|
||||
\c - - - :worker_1_port
|
||||
-- Change configuration to treat lineitem AND orders tables as large
|
||||
SET citus.large_table_shard_count TO 2;
|
||||
-- Query #7 from the TPC-H decision support benchmark
|
||||
SELECT
|
||||
supp_nation,
|
||||
|
@ -101,8 +97,6 @@ ORDER BY
|
|||
|
||||
-- connect to the other worker node
|
||||
\c - - - :worker_2_port
|
||||
-- Change configuration to treat lineitem AND orders tables as large
|
||||
SET citus.large_table_shard_count TO 2;
|
||||
-- Query #7 from the TPC-H decision support benchmark
|
||||
SELECT
|
||||
supp_nation,
|
||||
|
|
|
@ -3,8 +3,6 @@
|
|||
--
|
||||
-- connect to the coordinator
|
||||
\c - - - :master_port
|
||||
-- Change configuration to treat lineitem AND orders tables AS large
|
||||
SET citus.large_table_shard_count TO 2;
|
||||
-- Query #7 from the TPC-H benchmark; modified to include sub-selects
|
||||
SELECT
|
||||
supp_nation,
|
||||
|
@ -61,8 +59,6 @@ ORDER BY
|
|||
|
||||
-- connect to one of the workers
|
||||
\c - - - :worker_1_port
|
||||
-- Change configuration to treat lineitem AND orders tables AS large
|
||||
SET citus.large_table_shard_count TO 2;
|
||||
-- Query #7 from the TPC-H benchmark; modified to include sub-selects
|
||||
SELECT
|
||||
supp_nation,
|
||||
|
@ -119,8 +115,6 @@ ORDER BY
|
|||
|
||||
-- connect to the coordinator
|
||||
\c - - - :worker_2_port
|
||||
-- Change configuration to treat lineitem AND orders tables AS large
|
||||
SET citus.large_table_shard_count TO 2;
|
||||
-- Query #7 from the TPC-H benchmark; modified to include sub-selects
|
||||
SELECT
|
||||
supp_nation,
|
||||
|
|
|
@ -18,7 +18,6 @@ SET citus.explain_all_tasks TO on;
|
|||
-- because were testing pruning here.
|
||||
SET citus.task_executor_type TO 'real-time';
|
||||
-- Change configuration to treat lineitem and orders tables as large
|
||||
SET citus.large_table_shard_count TO 2;
|
||||
SET citus.log_multi_join_order to true;
|
||||
SET citus.enable_repartition_joins to ON;
|
||||
SELECT shardminvalue, shardmaxvalue from pg_dist_shard WHERE shardid = 290000;
|
||||
|
|
|
@ -18,7 +18,6 @@ SET citus.explain_all_tasks TO on;
|
|||
-- because were testing pruning here.
|
||||
SET citus.task_executor_type TO 'real-time';
|
||||
-- Change configuration to treat lineitem and orders tables as large
|
||||
SET citus.large_table_shard_count TO 2;
|
||||
SET citus.log_multi_join_order to true;
|
||||
SET citus.enable_repartition_joins to ON;
|
||||
SELECT shardminvalue, shardmaxvalue from pg_dist_shard WHERE shardid = 290000;
|
||||
|
|
|
@ -18,7 +18,6 @@ SET citus.explain_all_tasks TO on;
|
|||
-- because were testing pruning here.
|
||||
SET citus.task_executor_type TO 'real-time';
|
||||
-- Change configuration to treat lineitem and orders tables as large
|
||||
SET citus.large_table_shard_count TO 2;
|
||||
SET citus.log_multi_join_order to true;
|
||||
SET citus.enable_repartition_joins to ON;
|
||||
SELECT shardminvalue, shardmaxvalue from pg_dist_shard WHERE shardid = 290000;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
--
|
||||
-- MULTI_LARGE_TABLE_PLANNING
|
||||
-- MULTI_REPARTITION_JOIN_PLANNING
|
||||
--
|
||||
-- Tests that cover large table join planning. Note that we explicitly start a
|
||||
-- Tests that cover repartition join planning. Note that we explicitly start a
|
||||
-- transaction block here so that we don't emit debug messages with changing
|
||||
-- transaction ids in them. Also, we set the executor type to task tracker
|
||||
-- executor here, as we cannot run repartition jobs with real time executor.
|
||||
|
@ -17,7 +17,6 @@ SELECT substring(:'server_version', '\d+')::int > 9 AS version_above_nine;
|
|||
|
||||
BEGIN;
|
||||
SET client_min_messages TO DEBUG4;
|
||||
SET citus.large_table_shard_count TO 2;
|
||||
SET citus.task_executor_type TO 'task-tracker';
|
||||
-- Debug4 log messages display jobIds within them. We explicitly set the jobId
|
||||
-- sequence here so that the regression output becomes independent of the number
|
|
@ -1,7 +1,7 @@
|
|||
--
|
||||
-- MULTI_LARGE_TABLE_PLANNING
|
||||
-- MULTI_REPARTITION_JOIN_PLANNING
|
||||
--
|
||||
-- Tests that cover large table join planning. Note that we explicitly start a
|
||||
-- Tests that cover repartition join planning. Note that we explicitly start a
|
||||
-- transaction block here so that we don't emit debug messages with changing
|
||||
-- transaction ids in them. Also, we set the executor type to task tracker
|
||||
-- executor here, as we cannot run repartition jobs with real time executor.
|
||||
|
@ -18,10 +18,6 @@ SELECT substring(:'server_version', '\d+')::int > 9 AS version_above_nine;
|
|||
BEGIN;
|
||||
SET client_min_messages TO DEBUG4;
|
||||
DEBUG: CommitTransactionCommand
|
||||
SET citus.large_table_shard_count TO 2;
|
||||
DEBUG: StartTransactionCommand
|
||||
DEBUG: ProcessUtility
|
||||
DEBUG: CommitTransactionCommand
|
||||
SET citus.task_executor_type TO 'task-tracker';
|
||||
DEBUG: StartTransactionCommand
|
||||
DEBUG: ProcessUtility
|
|
@ -1,11 +1,10 @@
|
|||
--
|
||||
-- MULTI_LARGE_TABLE_PRUNING
|
||||
-- MULTI_REPARTITION_JOIN_PRUNING
|
||||
--
|
||||
-- Tests covering partition and join-pruning for large table joins. Note that we
|
||||
-- Tests covering partition and join-pruning for repartition joins. Note that we
|
||||
-- set executor type to task tracker executor here, as we cannot run repartition
|
||||
-- jobs with real time executor.
|
||||
SET citus.next_shard_id TO 700000;
|
||||
SET citus.large_table_shard_count TO 2;
|
||||
SET client_min_messages TO DEBUG2;
|
||||
SET citus.task_executor_type TO 'task-tracker';
|
||||
-- Single range-repartition join to test join-pruning behaviour.
|
|
@ -1,5 +1,5 @@
|
|||
--
|
||||
-- MULTI_LARGE_TABLE_TASK_ASSIGNMENT
|
||||
-- MULTI_REPARTITION_JOIN_TASK_ASSIGNMENT
|
||||
--
|
||||
-- Tests which cover task assignment for MapMerge jobs for single range repartition
|
||||
-- and dual hash repartition joins. The tests also cover task assignment propagation
|
||||
|
@ -16,7 +16,6 @@ SELECT substring(:'server_version', '\d+')::int > 9 AS version_above_nine;
|
|||
|
||||
BEGIN;
|
||||
SET client_min_messages TO DEBUG3;
|
||||
SET citus.large_table_shard_count TO 2;
|
||||
SET citus.task_executor_type TO 'task-tracker';
|
||||
-- Single range repartition join to test anchor-shard based task assignment and
|
||||
-- assignment propagation to merge and data-fetch tasks.
|
||||
|
@ -51,8 +50,7 @@ DEBUG: assigned task 2 to node localhost:57637
|
|||
-- Single range repartition join, along with a join with a small table containing
|
||||
-- more than one shard. This situation results in multiple sql tasks depending on
|
||||
-- the same merge task, and tests our constraint group creation and assignment
|
||||
-- propagation. Here 'orders' is considered the small table.
|
||||
SET citus.large_table_shard_count TO 3;
|
||||
-- propagation.
|
||||
SELECT
|
||||
count(*)
|
||||
FROM
|
||||
|
@ -76,7 +74,6 @@ DEBUG: assigned task 2 to node localhost:57638
|
|||
12000
|
||||
(1 row)
|
||||
|
||||
SET citus.large_table_shard_count TO 2;
|
||||
-- Dual hash repartition join which tests the separate hash repartition join
|
||||
-- task assignment algorithm.
|
||||
SELECT
|
|
@ -1,5 +1,5 @@
|
|||
--
|
||||
-- MULTI_LARGE_TABLE_TASK_ASSIGNMENT
|
||||
-- MULTI_REPARTITION_JOIN_TASK_ASSIGNMENT
|
||||
--
|
||||
-- Tests which cover task assignment for MapMerge jobs for single range repartition
|
||||
-- and dual hash repartition joins. The tests also cover task assignment propagation
|
||||
|
@ -17,10 +17,6 @@ SELECT substring(:'server_version', '\d+')::int > 9 AS version_above_nine;
|
|||
BEGIN;
|
||||
SET client_min_messages TO DEBUG3;
|
||||
DEBUG: CommitTransactionCommand
|
||||
SET citus.large_table_shard_count TO 2;
|
||||
DEBUG: StartTransactionCommand
|
||||
DEBUG: ProcessUtility
|
||||
DEBUG: CommitTransactionCommand
|
||||
SET citus.task_executor_type TO 'task-tracker';
|
||||
DEBUG: StartTransactionCommand
|
||||
DEBUG: ProcessUtility
|
||||
|
@ -60,11 +56,7 @@ DEBUG: CommitTransactionCommand
|
|||
-- Single range repartition join, along with a join with a small table containing
|
||||
-- more than one shard. This situation results in multiple sql tasks depending on
|
||||
-- the same merge task, and tests our constraint group creation and assignment
|
||||
-- propagation. Here 'orders' is considered the small table.
|
||||
SET citus.large_table_shard_count TO 3;
|
||||
DEBUG: StartTransactionCommand
|
||||
DEBUG: ProcessUtility
|
||||
DEBUG: CommitTransactionCommand
|
||||
-- propagation.
|
||||
SELECT
|
||||
count(*)
|
||||
FROM
|
||||
|
@ -90,10 +82,6 @@ DEBUG: CommitTransactionCommand
|
|||
12000
|
||||
(1 row)
|
||||
|
||||
SET citus.large_table_shard_count TO 2;
|
||||
DEBUG: StartTransactionCommand
|
||||
DEBUG: ProcessUtility
|
||||
DEBUG: CommitTransactionCommand
|
||||
-- Dual hash repartition join which tests the separate hash repartition join
|
||||
-- task assignment algorithm.
|
||||
SELECT
|
|
@ -175,7 +175,6 @@ SELECT * FROM repartition_udt JOIN repartition_udt_other
|
|||
(0 rows)
|
||||
|
||||
-- Query that should result in a repartition join on UDT column.
|
||||
SET citus.large_table_shard_count = 1;
|
||||
SET citus.task_executor_type = 'task-tracker';
|
||||
SET citus.log_multi_join_order = true;
|
||||
EXPLAIN SELECT * FROM repartition_udt JOIN repartition_udt_other
|
||||
|
|
|
@ -117,7 +117,6 @@ INSERT INTO articles_hash VALUES (48, 8, 'alkylic', 18610);
|
|||
INSERT INTO articles_hash VALUES (49, 9, 'anyone', 2681);
|
||||
INSERT INTO articles_hash VALUES (50, 10, 'anjanette', 19519);
|
||||
SET citus.task_executor_type TO 'real-time';
|
||||
SET citus.large_table_shard_count TO 2;
|
||||
SET client_min_messages TO 'DEBUG2';
|
||||
-- insert a single row for the test
|
||||
INSERT INTO articles_single_shard_hash VALUES (50, 10, 'anjanette', 19519);
|
||||
|
|
|
@ -215,7 +215,6 @@ SELECT * FROM articles WHERE author_id IN (SELECT id FROM authors WHERE name LIK
|
|||
(0 rows)
|
||||
|
||||
-- subqueries are supported in FROM clause
|
||||
SET citus.large_table_shard_count TO 1;
|
||||
SELECT articles.id,test.word_count
|
||||
FROM articles, (SELECT id, word_count FROM articles) AS test WHERE test.id = articles.id
|
||||
ORDER BY articles.id;
|
||||
|
@ -273,7 +272,6 @@ ORDER BY articles.id;
|
|||
50 | 19519
|
||||
(50 rows)
|
||||
|
||||
RESET citus.large_table_shard_count;
|
||||
-- subqueries are not supported in SELECT clause
|
||||
SELECT a.title AS name, (SELECT a2.id FROM articles_single_shard a2 WHERE a.id = a2.id LIMIT 1)
|
||||
AS special_price FROM articles a;
|
||||
|
@ -408,7 +406,6 @@ SELECT o_orderstatus, sum(l_linenumber), avg(l_linenumber) FROM lineitem, orders
|
|||
|
||||
-- now, test the cases where Citus do or do not need to create
|
||||
-- the master queries
|
||||
SET citus.large_table_shard_count TO 2;
|
||||
SET client_min_messages TO 'DEBUG2';
|
||||
SET citus.task_executor_type TO 'real-time';
|
||||
-- start with the simple lookup query
|
||||
|
|
|
@ -212,12 +212,10 @@ SELECT * FROM articles, position('om' in 'Thomas') ORDER BY 2 DESC, 1 DESC, 3 DE
|
|||
SELECT * FROM articles WHERE author_id IN (SELECT id FROM authors WHERE name LIKE '%a');
|
||||
ERROR: Complex subqueries and CTEs are not supported when task_executor_type is set to 'task-tracker'
|
||||
-- subqueries are supported in FROM clause
|
||||
SET citus.large_table_shard_count TO 1;
|
||||
SELECT articles.id,test.word_count
|
||||
FROM articles, (SELECT id, word_count FROM articles) AS test WHERE test.id = articles.id
|
||||
ORDER BY articles.id;
|
||||
ERROR: Complex subqueries and CTEs are not supported when task_executor_type is set to 'task-tracker'
|
||||
RESET citus.large_table_shard_count;
|
||||
-- subqueries are not supported in SELECT clause
|
||||
SELECT a.title AS name, (SELECT a2.id FROM articles_single_shard a2 WHERE a.id = a2.id LIMIT 1)
|
||||
AS special_price FROM articles a;
|
||||
|
@ -352,7 +350,6 @@ SELECT o_orderstatus, sum(l_linenumber), avg(l_linenumber) FROM lineitem, orders
|
|||
|
||||
-- now, test the cases where Citus do or do not need to create
|
||||
-- the master queries
|
||||
SET citus.large_table_shard_count TO 2;
|
||||
SET client_min_messages TO 'DEBUG2';
|
||||
SET citus.task_executor_type TO 'real-time';
|
||||
-- start with the simple lookup query
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
--
|
||||
-- MULTI_TPCH_QUERY1
|
||||
--
|
||||
-- Change configuration to treat lineitem and orders tables as large
|
||||
SET citus.large_table_shard_count TO 2;
|
||||
-- Query #1 from the TPC-H decision support benchmark
|
||||
SELECT
|
||||
l_returnflag,
|
||||
|
|
|
@ -1,9 +1,7 @@
|
|||
--
|
||||
-- MULTI_TPCH_QUERY10
|
||||
--
|
||||
-- Query #10 from the TPC-H decision support benchmark. Unlike other TPC-H tests,
|
||||
-- we don't set citus.large_table_shard_count here, and instead use the default value
|
||||
-- coming from postgresql.conf or multi_task_tracker_executor.conf.
|
||||
-- Query #10 from the TPC-H decision support benchmark.
|
||||
SELECT
|
||||
c_custkey,
|
||||
c_name,
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
--
|
||||
-- MULTI_TPCH_QUERY12
|
||||
--
|
||||
-- Change configuration to treat lineitem and orders tables as large
|
||||
SET citus.large_table_shard_count TO 2;
|
||||
-- Query #12 from the TPC-H decision support benchmark
|
||||
SELECT
|
||||
l_shipmode,
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
--
|
||||
-- MULTI_TPCH_QUERY14
|
||||
--
|
||||
-- Change configuration to treat lineitem and orders tables as large
|
||||
SET citus.large_table_shard_count TO 2;
|
||||
-- Query #14 from the TPC-H decision support benchmark
|
||||
SELECT
|
||||
100.00 * sum(case
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
--
|
||||
-- MULTI_TPCH_QUERY19
|
||||
--
|
||||
-- Change configuration to treat lineitem and orders tables as large
|
||||
SET citus.large_table_shard_count TO 2;
|
||||
-- Query #19 from the TPC-H decision support benchmark. Note that we modified
|
||||
-- the query from its original to make it work on smaller data sets.
|
||||
SELECT
|
||||
|
|
|
@ -1,9 +1,7 @@
|
|||
--
|
||||
-- MULTI_TPCH_QUERY3
|
||||
--
|
||||
-- Query #3 from the TPC-H decision support benchmark. Unlike other TPC-H tests,
|
||||
-- we don't set citus.large_table_shard_count here, and instead use the default value
|
||||
-- coming from postgresql.conf or multi_task_tracker_executor.conf.
|
||||
-- Query #3 from the TPC-H decision support benchmark.
|
||||
SELECT
|
||||
l_orderkey,
|
||||
sum(l_extendedprice * (1 - l_discount)) as revenue,
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
--
|
||||
-- MULTI_TPCH_QUERY6
|
||||
--
|
||||
-- Change configuration to treat lineitem and orders tables as large
|
||||
SET citus.large_table_shard_count TO 2;
|
||||
-- Query #6 from the TPC-H decision support benchmark
|
||||
SELECT
|
||||
sum(l_extendedprice * l_discount) as revenue
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
--
|
||||
-- MULTI_TPCH_QUERY7
|
||||
--
|
||||
-- Change configuration to treat lineitem AND orders tables as large
|
||||
SET citus.large_table_shard_count TO 2;
|
||||
-- Query #7 from the TPC-H decision support benchmark
|
||||
SELECT
|
||||
supp_nation,
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
--
|
||||
-- MULTI_TPCH_QUERY7_NESTED
|
||||
--
|
||||
-- Change configuration to treat lineitem AND orders tables AS large
|
||||
SET citus.large_table_shard_count TO 2;
|
||||
-- Query #7 from the TPC-H benchmark; modified to include sub-selects
|
||||
SELECT
|
||||
supp_nation,
|
||||
|
|
|
@ -39,7 +39,6 @@ SELECT * FROM lineitem_pricing_summary ORDER BY l_returnflag, l_linestatus;
|
|||
(4 rows)
|
||||
|
||||
-- Test we can handle joins
|
||||
SET citus.large_table_shard_count TO 2;
|
||||
CREATE TABLE shipping_priority AS
|
||||
(
|
||||
SELECT
|
||||
|
|
|
@ -9,7 +9,6 @@ SELECT master_create_distributed_table('test_table_1', 'id', 'append');
|
|||
|
||||
(1 row)
|
||||
|
||||
SET citus.large_table_shard_count to 1;
|
||||
\copy test_table_1 FROM STDIN DELIMITER ','
|
||||
\copy test_table_1 FROM STDIN DELIMITER ','
|
||||
CREATE TABLE test_table_2(id int, value_1 int);
|
||||
|
|
|
@ -47,14 +47,12 @@ SELECT avg(distinct l_orderkey) FROM lineitem_range;
|
|||
-- sharded table. For this test, we also change a config setting to ensure that
|
||||
-- we don't repartition any of the tables during the query.
|
||||
|
||||
SET citus.large_table_shard_count TO 2;
|
||||
|
||||
SELECT p_partkey, count(distinct l_orderkey) FROM lineitem_range, part
|
||||
WHERE l_partkey = p_partkey
|
||||
GROUP BY p_partkey
|
||||
ORDER BY p_partkey LIMIT 10;
|
||||
|
||||
RESET citus.large_table_shard_count;
|
||||
|
||||
-- Check that we support count(distinct) on non-partition column.
|
||||
SELECT count(distinct l_partkey) FROM lineitem_range;
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
SET citus.next_shard_id TO 310000;
|
||||
|
||||
|
||||
SET citus.large_table_shard_count TO 2;
|
||||
SET citus.log_multi_join_order to true;
|
||||
SET client_min_messages TO LOG;
|
||||
|
||||
|
|
|
@ -85,14 +85,14 @@ test: multi_tpch_query7 multi_tpch_query7_nested
|
|||
# ----------
|
||||
test: multi_join_order_tpch_small multi_join_order_additional
|
||||
test: multi_load_more_data
|
||||
test: multi_join_order_tpch_large
|
||||
test: multi_join_order_tpch_repartition
|
||||
|
||||
# ----------
|
||||
# Tests for large-table join planning and execution. Be careful when creating
|
||||
# Tests for repartition join planning and execution. Be careful when creating
|
||||
# new shards before these tests, as they expect specific shard identifiers in
|
||||
# the output.
|
||||
# ----------
|
||||
test: multi_large_table_join_planning multi_large_table_pruning multi_large_table_task_assignment
|
||||
test: multi_repartition_join_planning multi_repartition_join_pruning multi_repartition_join_task_assignment
|
||||
|
||||
# ---------
|
||||
# Tests for recursive planning.
|
||||
|
|
|
@ -51,7 +51,7 @@ test: multi_tpch_query7 multi_tpch_query7_nested
|
|||
# below; and therefore these tests should come after the execution tests.
|
||||
# ----------
|
||||
test: multi_load_more_data
|
||||
test: multi_join_order_tpch_large
|
||||
test: multi_join_order_tpch_repartition
|
||||
|
||||
# ----------
|
||||
# Tests to check our large record loading and shard deletion behavior
|
||||
|
|
|
@ -53,7 +53,6 @@ SELECT avg(distinct l_orderkey) FROM lineitem_range;
|
|||
-- Run count(distinct) on join between a range partitioned table and a single
|
||||
-- sharded table. For this test, we also change a config setting to ensure that
|
||||
-- we don't repartition any of the tables during the query.
|
||||
SET citus.large_table_shard_count TO 2;
|
||||
SELECT p_partkey, count(distinct l_orderkey) FROM lineitem_range, part
|
||||
WHERE l_partkey = p_partkey
|
||||
GROUP BY p_partkey
|
||||
|
@ -72,7 +71,6 @@ SELECT p_partkey, count(distinct l_orderkey) FROM lineitem_range, part
|
|||
222 | 1
|
||||
(10 rows)
|
||||
|
||||
RESET citus.large_table_shard_count;
|
||||
-- Check that we support count(distinct) on non-partition column.
|
||||
SELECT count(distinct l_partkey) FROM lineitem_range;
|
||||
count
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
SET citus.next_shard_id TO 310000;
|
||||
SET citus.large_table_shard_count TO 2;
|
||||
SET citus.log_multi_join_order to true;
|
||||
SET client_min_messages TO LOG;
|
||||
CREATE TABLE multi_outer_join_left
|
||||
|
|
|
@ -400,7 +400,6 @@ EXPLAIN (COSTS FALSE)
|
|||
SELECT avg(l_linenumber) FROM lineitem WHERE l_orderkey > 9030;
|
||||
|
||||
-- Test re-partition join
|
||||
SET citus.large_table_shard_count TO 1;
|
||||
|
||||
EXPLAIN (COSTS FALSE)
|
||||
SELECT count(*)
|
||||
|
|
|
@ -69,9 +69,6 @@ SET client_min_messages TO DEBUG2;
|
|||
EXPLAIN SELECT l1.l_quantity FROM lineitem l1, lineitem l2
|
||||
WHERE l1.l_orderkey = l2.l_orderkey AND l1.l_quantity > 5;
|
||||
|
||||
-- Update configuration to treat lineitem and orders tables as large
|
||||
|
||||
SET citus.large_table_shard_count TO 2;
|
||||
SET client_min_messages TO LOG;
|
||||
|
||||
-- The following queries check that we correctly handle joins and OR clauses. In
|
||||
|
@ -85,14 +82,6 @@ EXPLAIN SELECT count(*) FROM lineitem, orders
|
|||
EXPLAIN SELECT l_quantity FROM lineitem, orders
|
||||
WHERE (l_orderkey = o_orderkey OR l_quantity > 5);
|
||||
|
||||
-- The below queries modify the partition method in pg_dist_partition. We thus
|
||||
-- begin a transaction here so the changes don't impact any other parallel
|
||||
-- running tests.
|
||||
BEGIN;
|
||||
|
||||
-- Validate that we take into account the partition method when building the
|
||||
-- join-order plan.
|
||||
|
||||
EXPLAIN SELECT count(*) FROM orders, lineitem_hash
|
||||
WHERE o_orderkey = l_orderkey;
|
||||
|
||||
|
@ -104,9 +93,6 @@ EXPLAIN SELECT count(*) FROM orders_hash, lineitem_hash
|
|||
EXPLAIN SELECT count(*) FROM customer_hash, nation
|
||||
WHERE c_nationkey = n_nationkey;
|
||||
|
||||
-- Update the large table shard count for all the following tests.
|
||||
SET citus.large_table_shard_count TO 1;
|
||||
|
||||
-- Validate that we don't use a single-partition join method for a hash
|
||||
-- re-partitioned table, thus preventing a partition of just the customer table.
|
||||
EXPLAIN SELECT count(*) FROM orders, lineitem, customer_append
|
||||
|
@ -122,8 +108,6 @@ EXPLAIN SELECT count(*) FROM orders, customer_hash
|
|||
EXPLAIN SELECT count(*) FROM orders_hash, customer_append
|
||||
WHERE c_custkey = o_custkey;
|
||||
|
||||
COMMIT;
|
||||
|
||||
-- Reset client logging level to its previous value
|
||||
|
||||
SET client_min_messages TO NOTICE;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
--
|
||||
-- MULTI_JOIN_ORDER_TPCH_LARGE
|
||||
-- MULTI_JOIN_ORDER_TPCH_REPARTITION
|
||||
--
|
||||
|
||||
|
||||
|
@ -13,13 +13,10 @@ SET citus.log_multi_join_order TO TRUE;
|
|||
SET citus.task_executor_type = 'task-tracker'; -- can't explain all queries otherwise
|
||||
SET client_min_messages TO LOG;
|
||||
|
||||
-- Change configuration to treat lineitem, orders, customer, and part tables as
|
||||
-- large. The following queries are basically the same as the ones in tpch_small
|
||||
-- The following queries are basically the same as the ones in tpch_small
|
||||
-- except that more data has been loaded into customer and part tables. Therefore,
|
||||
-- we will apply different distributed join strategies for these queries.
|
||||
|
||||
SET citus.large_table_shard_count TO 2;
|
||||
|
||||
-- Query #6 from the TPC-H decision support benchmark
|
||||
|
||||
EXPLAIN SELECT
|
|
@ -8,10 +8,6 @@ SET citus.explain_distributed_queries TO off;
|
|||
SET citus.log_multi_join_order TO TRUE;
|
||||
SET client_min_messages TO LOG;
|
||||
|
||||
-- Change configuration to treat lineitem and orders tables as large
|
||||
|
||||
SET citus.large_table_shard_count TO 2;
|
||||
|
||||
-- Query #6 from the TPC-H decision support benchmark
|
||||
|
||||
EXPLAIN SELECT
|
||||
|
|
|
@ -3,18 +3,13 @@
|
|||
--
|
||||
|
||||
|
||||
|
||||
|
||||
-- Check that join-pruning works for joins between two large relations. For now
|
||||
-- Check that join-pruning works for joins between two relations. For now
|
||||
-- we only check for join-pruning between locally partitioned relations. In the
|
||||
-- future we want to check for pruning between re-partitioned relations as well.
|
||||
|
||||
SET citus.explain_distributed_queries TO off;
|
||||
SET client_min_messages TO DEBUG2;
|
||||
|
||||
-- Change configuration to treat all tables as large
|
||||
|
||||
SET citus.large_table_shard_count TO 2;
|
||||
|
||||
SELECT sum(l_linenumber), avg(l_linenumber) FROM lineitem, orders
|
||||
WHERE l_orderkey = o_orderkey;
|
||||
|
|
|
@ -34,12 +34,9 @@ SELECT c_custkey, c_name, count(*) as lineitem_count
|
|||
GROUP BY c_custkey, c_name
|
||||
ORDER BY lineitem_count DESC, c_custkey LIMIT 10;
|
||||
|
||||
-- Now, enable limit optimization to fetch half of each task's results. For this
|
||||
-- test, we also change a config setting to ensure that we don't repartition any
|
||||
-- of the tables during the query.
|
||||
-- Now, enable limit optimization to fetch half of each task's results.
|
||||
|
||||
SET citus.limit_clause_row_fetch_count TO 150;
|
||||
SET citus.large_table_shard_count TO 2;
|
||||
|
||||
SELECT c_custkey, c_name, count(*) as lineitem_count
|
||||
FROM customer, orders, lineitem
|
||||
|
@ -47,8 +44,6 @@ SELECT c_custkey, c_name, count(*) as lineitem_count
|
|||
GROUP BY c_custkey, c_name
|
||||
ORDER BY lineitem_count DESC, c_custkey LIMIT 10;
|
||||
|
||||
RESET citus.large_table_shard_count;
|
||||
|
||||
-- We now test scenarios where applying the limit optimization wouldn't produce
|
||||
-- meaningful results. First, we check that we don't push down the limit clause
|
||||
-- for non-commutative aggregates.
|
||||
|
|
|
@ -173,7 +173,6 @@ EXPLAIN (COSTS FALSE)
|
|||
SELECT avg(l_linenumber) FROM lineitem_mx WHERE l_orderkey > 9030;
|
||||
|
||||
-- Test re-partition join
|
||||
SET citus.large_table_shard_count TO 1;
|
||||
|
||||
EXPLAIN (COSTS FALSE)
|
||||
SELECT count(*)
|
||||
|
|
|
@ -199,7 +199,6 @@ SELECT * FROM repartition_udt JOIN repartition_udt_other
|
|||
ON repartition_udt.pk = repartition_udt_other.pk;
|
||||
|
||||
-- Query that should result in a repartition join on UDT column.
|
||||
SET citus.large_table_shard_count = 1;
|
||||
SET citus.log_multi_join_order = true;
|
||||
|
||||
EXPLAIN SELECT * FROM repartition_udt JOIN repartition_udt_other
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
\c - - - :worker_1_port
|
||||
SET client_min_messages = LOG;
|
||||
-- Query that should result in a repartition join on UDT column.
|
||||
SET citus.large_table_shard_count = 1;
|
||||
SET citus.task_executor_type = 'task-tracker';
|
||||
SET citus.log_multi_join_order = true;
|
||||
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
\c - - - :worker_2_port
|
||||
SET client_min_messages = LOG;
|
||||
-- Query that should result in a repartition join on UDT column.
|
||||
SET citus.large_table_shard_count = 1;
|
||||
SET citus.task_executor_type = 'task-tracker';
|
||||
SET citus.log_multi_join_order = true;
|
||||
|
||||
|
|
|
@ -65,7 +65,6 @@ INSERT INTO articles_hash_mx VALUES (50, 10, 'anjanette', 19519);
|
|||
|
||||
|
||||
SET citus.task_executor_type TO 'real-time';
|
||||
SET citus.large_table_shard_count TO 2;
|
||||
SET client_min_messages TO 'DEBUG2';
|
||||
|
||||
-- insert a single row for the test
|
||||
|
|
|
@ -6,10 +6,6 @@
|
|||
-- connect to the coordinator
|
||||
\c - - - :master_port
|
||||
|
||||
-- Change configuration to treat lineitem and orders tables as large
|
||||
|
||||
SET citus.large_table_shard_count TO 2;
|
||||
|
||||
-- Query #1 from the TPC-H decision support benchmark
|
||||
|
||||
SELECT
|
||||
|
@ -37,10 +33,6 @@ ORDER BY
|
|||
-- connect one of the workers
|
||||
\c - - - :worker_1_port
|
||||
|
||||
-- Change configuration to treat lineitem and orders tables as large
|
||||
|
||||
SET citus.large_table_shard_count TO 2;
|
||||
|
||||
-- Query #1 from the TPC-H decision support benchmark
|
||||
|
||||
SELECT
|
||||
|
@ -68,10 +60,6 @@ ORDER BY
|
|||
-- connect to the other node
|
||||
\c - - - :worker_2_port
|
||||
|
||||
-- Change configuration to treat lineitem and orders tables as large
|
||||
|
||||
SET citus.large_table_shard_count TO 2;
|
||||
|
||||
-- Query #1 from the TPC-H decision support benchmark
|
||||
|
||||
SELECT
|
||||
|
|
|
@ -2,9 +2,7 @@
|
|||
-- MULTI_MX_TPCH_QUERY10
|
||||
--
|
||||
|
||||
-- Query #10 from the TPC-H decision support benchmark. Unlike other TPC-H tests,
|
||||
-- we don't set citus.large_table_shard_count here, and instead use the default value
|
||||
-- coming from postgresql.conf or multi_task_tracker_executor.conf.
|
||||
-- Query #10 from the TPC-H decision support benchmark.
|
||||
|
||||
|
||||
-- connect to master
|
||||
|
|
|
@ -6,10 +6,6 @@
|
|||
-- connect to the coordinator
|
||||
\c - - - :master_port
|
||||
|
||||
-- Change configuration to treat lineitem and orders tables as large
|
||||
|
||||
SET citus.large_table_shard_count TO 2;
|
||||
|
||||
-- Query #12 from the TPC-H decision support benchmark
|
||||
|
||||
SELECT
|
||||
|
@ -44,10 +40,6 @@ ORDER BY
|
|||
-- connect one of the workers
|
||||
\c - - - :worker_1_port
|
||||
|
||||
-- Change configuration to treat lineitem and orders tables as large
|
||||
|
||||
SET citus.large_table_shard_count TO 2;
|
||||
|
||||
-- Query #12 from the TPC-H decision support benchmark
|
||||
|
||||
SELECT
|
||||
|
@ -82,10 +74,6 @@ ORDER BY
|
|||
-- connect to the other worker node
|
||||
\c - - - :worker_2_port
|
||||
|
||||
-- Change configuration to treat lineitem and orders tables as large
|
||||
|
||||
SET citus.large_table_shard_count TO 2;
|
||||
|
||||
-- Query #12 from the TPC-H decision support benchmark
|
||||
|
||||
SELECT
|
||||
|
|
|
@ -6,10 +6,6 @@
|
|||
-- connect to the coordinator
|
||||
\c - - - :master_port
|
||||
|
||||
-- Change configuration to treat lineitem and orders tables as large
|
||||
|
||||
SET citus.large_table_shard_count TO 2;
|
||||
|
||||
-- Query #14 from the TPC-H decision support benchmark
|
||||
|
||||
SELECT
|
||||
|
@ -29,10 +25,6 @@ WHERE
|
|||
-- connect one of the workers
|
||||
\c - - - :worker_1_port
|
||||
|
||||
-- Change configuration to treat lineitem and orders tables as large
|
||||
|
||||
SET citus.large_table_shard_count TO 2;
|
||||
|
||||
-- Query #14 from the TPC-H decision support benchmark
|
||||
|
||||
SELECT
|
||||
|
@ -52,10 +44,6 @@ WHERE
|
|||
-- connect to the other node
|
||||
\c - - - :worker_2_port
|
||||
|
||||
-- Change configuration to treat lineitem and orders tables as large
|
||||
|
||||
SET citus.large_table_shard_count TO 2;
|
||||
|
||||
-- Query #14 from the TPC-H decision support benchmark
|
||||
|
||||
SELECT
|
||||
|
|
|
@ -6,10 +6,6 @@
|
|||
-- connect to the coordinator
|
||||
\c - - - :master_port
|
||||
|
||||
-- Change configuration to treat lineitem and orders tables as large
|
||||
|
||||
SET citus.large_table_shard_count TO 2;
|
||||
|
||||
-- Query #19 from the TPC-H decision support benchmark. Note that we modified
|
||||
-- the query from its original to make it work on smaller data sets.
|
||||
|
||||
|
@ -46,10 +42,6 @@ WHERE
|
|||
-- connect one of the workers
|
||||
\c - - - :worker_1_port
|
||||
|
||||
-- Change configuration to treat lineitem and orders tables as large
|
||||
|
||||
SET citus.large_table_shard_count TO 2;
|
||||
|
||||
-- Query #19 from the TPC-H decision support benchmark. Note that we modified
|
||||
-- the query from its original to make it work on smaller data sets.
|
||||
|
||||
|
@ -86,10 +78,6 @@ WHERE
|
|||
-- connect to the other node
|
||||
\c - - - :worker_2_port
|
||||
|
||||
-- Change configuration to treat lineitem and orders tables as large
|
||||
|
||||
SET citus.large_table_shard_count TO 2;
|
||||
|
||||
-- Query #19 from the TPC-H decision support benchmark. Note that we modified
|
||||
-- the query from its original to make it work on smaller data sets.
|
||||
|
||||
|
|
|
@ -2,9 +2,7 @@
|
|||
-- MULTI_MX_TPCH_QUERY3
|
||||
--
|
||||
|
||||
-- Query #3 from the TPC-H decision support benchmark. Unlike other TPC-H tests,
|
||||
-- we don't set citus.large_table_shard_count here, and instead use the default value
|
||||
-- coming from postgresql.conf or multi_task_tracker_executor.conf.
|
||||
-- Query #3 from the TPC-H decision support benchmark.
|
||||
|
||||
|
||||
-- connect to the coordinator
|
||||
|
|
|
@ -6,10 +6,6 @@
|
|||
-- connect to the coordinator
|
||||
\c - - - :master_port
|
||||
|
||||
-- Change configuration to treat lineitem and orders tables as large
|
||||
|
||||
SET citus.large_table_shard_count TO 2;
|
||||
|
||||
-- Query #6 from the TPC-H decision support benchmark
|
||||
|
||||
SELECT
|
||||
|
@ -25,10 +21,6 @@ WHERE
|
|||
-- connect to one of the worker nodes
|
||||
\c - - - :worker_1_port
|
||||
|
||||
-- Change configuration to treat lineitem and orders tables as large
|
||||
|
||||
SET citus.large_table_shard_count TO 2;
|
||||
|
||||
-- Query #6 from the TPC-H decision support benchmark
|
||||
|
||||
SELECT
|
||||
|
@ -44,10 +36,6 @@ WHERE
|
|||
-- connect to the other worker node
|
||||
\c - - - :worker_2_port
|
||||
|
||||
-- Change configuration to treat lineitem and orders tables as large
|
||||
|
||||
SET citus.large_table_shard_count TO 2;
|
||||
|
||||
-- Query #6 from the TPC-H decision support benchmark
|
||||
|
||||
SELECT
|
||||
|
|
|
@ -6,10 +6,6 @@
|
|||
-- connect to the coordinator
|
||||
\c - - - :master_port
|
||||
|
||||
-- Change configuration to treat lineitem AND orders tables as large
|
||||
|
||||
SET citus.large_table_shard_count TO 2;
|
||||
|
||||
-- Query #7 from the TPC-H decision support benchmark
|
||||
|
||||
SELECT
|
||||
|
@ -55,10 +51,6 @@ ORDER BY
|
|||
-- connect one of the workers
|
||||
\c - - - :worker_1_port
|
||||
|
||||
-- Change configuration to treat lineitem AND orders tables as large
|
||||
|
||||
SET citus.large_table_shard_count TO 2;
|
||||
|
||||
-- Query #7 from the TPC-H decision support benchmark
|
||||
|
||||
SELECT
|
||||
|
@ -104,10 +96,6 @@ ORDER BY
|
|||
-- connect to the other worker node
|
||||
\c - - - :worker_2_port
|
||||
|
||||
-- Change configuration to treat lineitem AND orders tables as large
|
||||
|
||||
SET citus.large_table_shard_count TO 2;
|
||||
|
||||
-- Query #7 from the TPC-H decision support benchmark
|
||||
|
||||
SELECT
|
||||
|
|
|
@ -6,10 +6,6 @@
|
|||
-- connect to the coordinator
|
||||
\c - - - :master_port
|
||||
|
||||
-- Change configuration to treat lineitem AND orders tables AS large
|
||||
|
||||
SET citus.large_table_shard_count TO 2;
|
||||
|
||||
-- Query #7 from the TPC-H benchmark; modified to include sub-selects
|
||||
|
||||
SELECT
|
||||
|
@ -64,10 +60,6 @@ ORDER BY
|
|||
-- connect to one of the workers
|
||||
\c - - - :worker_1_port
|
||||
|
||||
-- Change configuration to treat lineitem AND orders tables AS large
|
||||
|
||||
SET citus.large_table_shard_count TO 2;
|
||||
|
||||
-- Query #7 from the TPC-H benchmark; modified to include sub-selects
|
||||
|
||||
SELECT
|
||||
|
@ -122,10 +114,6 @@ ORDER BY
|
|||
-- connect to the coordinator
|
||||
\c - - - :worker_2_port
|
||||
|
||||
-- Change configuration to treat lineitem AND orders tables AS large
|
||||
|
||||
SET citus.large_table_shard_count TO 2;
|
||||
|
||||
-- Query #7 from the TPC-H benchmark; modified to include sub-selects
|
||||
|
||||
SELECT
|
||||
|
|
|
@ -20,7 +20,6 @@ SET citus.task_executor_type TO 'real-time';
|
|||
|
||||
-- Change configuration to treat lineitem and orders tables as large
|
||||
|
||||
SET citus.large_table_shard_count TO 2;
|
||||
SET citus.log_multi_join_order to true;
|
||||
SET citus.enable_repartition_joins to ON;
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
--
|
||||
-- MULTI_LARGE_TABLE_PLANNING
|
||||
-- MULTI_REPARTITION_JOIN_PLANNING
|
||||
--
|
||||
-- Tests that cover large table join planning. Note that we explicitly start a
|
||||
-- Tests that cover repartition join planning. Note that we explicitly start a
|
||||
-- transaction block here so that we don't emit debug messages with changing
|
||||
-- transaction ids in them. Also, we set the executor type to task tracker
|
||||
-- executor here, as we cannot run repartition jobs with real time executor.
|
||||
|
@ -16,7 +16,6 @@ SELECT substring(:'server_version', '\d+')::int > 9 AS version_above_nine;
|
|||
|
||||
BEGIN;
|
||||
SET client_min_messages TO DEBUG4;
|
||||
SET citus.large_table_shard_count TO 2;
|
||||
SET citus.task_executor_type TO 'task-tracker';
|
||||
|
||||
-- Debug4 log messages display jobIds within them. We explicitly set the jobId
|
|
@ -1,7 +1,7 @@
|
|||
--
|
||||
-- MULTI_LARGE_TABLE_PRUNING
|
||||
-- MULTI_REPARTITION_JOIN_PRUNING
|
||||
--
|
||||
-- Tests covering partition and join-pruning for large table joins. Note that we
|
||||
-- Tests covering partition and join-pruning for repartition joins. Note that we
|
||||
-- set executor type to task tracker executor here, as we cannot run repartition
|
||||
-- jobs with real time executor.
|
||||
|
||||
|
@ -9,7 +9,6 @@
|
|||
SET citus.next_shard_id TO 700000;
|
||||
|
||||
|
||||
SET citus.large_table_shard_count TO 2;
|
||||
SET client_min_messages TO DEBUG2;
|
||||
SET citus.task_executor_type TO 'task-tracker';
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
--
|
||||
-- MULTI_LARGE_TABLE_TASK_ASSIGNMENT
|
||||
-- MULTI_REPARTITION_JOIN_TASK_ASSIGNMENT
|
||||
--
|
||||
-- Tests which cover task assignment for MapMerge jobs for single range repartition
|
||||
-- and dual hash repartition joins. The tests also cover task assignment propagation
|
||||
|
@ -16,7 +16,6 @@ SELECT substring(:'server_version', '\d+')::int > 9 AS version_above_nine;
|
|||
|
||||
BEGIN;
|
||||
SET client_min_messages TO DEBUG3;
|
||||
SET citus.large_table_shard_count TO 2;
|
||||
SET citus.task_executor_type TO 'task-tracker';
|
||||
|
||||
-- Single range repartition join to test anchor-shard based task assignment and
|
||||
|
@ -32,9 +31,7 @@ WHERE
|
|||
-- Single range repartition join, along with a join with a small table containing
|
||||
-- more than one shard. This situation results in multiple sql tasks depending on
|
||||
-- the same merge task, and tests our constraint group creation and assignment
|
||||
-- propagation. Here 'orders' is considered the small table.
|
||||
|
||||
SET citus.large_table_shard_count TO 3;
|
||||
-- propagation.
|
||||
|
||||
SELECT
|
||||
count(*)
|
||||
|
@ -44,7 +41,6 @@ WHERE
|
|||
o_custkey = c_custkey AND
|
||||
o_orderkey = l_orderkey;
|
||||
|
||||
SET citus.large_table_shard_count TO 2;
|
||||
-- Dual hash repartition join which tests the separate hash repartition join
|
||||
-- task assignment algorithm.
|
||||
|
|
@ -197,7 +197,6 @@ SELECT * FROM repartition_udt JOIN repartition_udt_other
|
|||
WHERE repartition_udt.pk = 1;
|
||||
|
||||
-- Query that should result in a repartition join on UDT column.
|
||||
SET citus.large_table_shard_count = 1;
|
||||
SET citus.task_executor_type = 'task-tracker';
|
||||
SET citus.log_multi_join_order = true;
|
||||
|
||||
|
|
|
@ -104,7 +104,6 @@ INSERT INTO articles_hash VALUES (50, 10, 'anjanette', 19519);
|
|||
|
||||
|
||||
SET citus.task_executor_type TO 'real-time';
|
||||
SET citus.large_table_shard_count TO 2;
|
||||
SET client_min_messages TO 'DEBUG2';
|
||||
|
||||
-- insert a single row for the test
|
||||
|
|
|
@ -133,14 +133,10 @@ SELECT * FROM articles WHERE author_id IN (SELECT id FROM authors WHERE name LIK
|
|||
|
||||
-- subqueries are supported in FROM clause
|
||||
|
||||
SET citus.large_table_shard_count TO 1;
|
||||
|
||||
SELECT articles.id,test.word_count
|
||||
FROM articles, (SELECT id, word_count FROM articles) AS test WHERE test.id = articles.id
|
||||
ORDER BY articles.id;
|
||||
|
||||
RESET citus.large_table_shard_count;
|
||||
|
||||
-- subqueries are not supported in SELECT clause
|
||||
SELECT a.title AS name, (SELECT a2.id FROM articles_single_shard a2 WHERE a.id = a2.id LIMIT 1)
|
||||
AS special_price FROM articles a;
|
||||
|
@ -216,7 +212,6 @@ SELECT o_orderstatus, sum(l_linenumber), avg(l_linenumber) FROM lineitem, orders
|
|||
|
||||
-- now, test the cases where Citus do or do not need to create
|
||||
-- the master queries
|
||||
SET citus.large_table_shard_count TO 2;
|
||||
SET client_min_messages TO 'DEBUG2';
|
||||
SET citus.task_executor_type TO 'real-time';
|
||||
|
||||
|
|
|
@ -3,10 +3,6 @@
|
|||
--
|
||||
|
||||
|
||||
-- Change configuration to treat lineitem and orders tables as large
|
||||
|
||||
SET citus.large_table_shard_count TO 2;
|
||||
|
||||
-- Query #1 from the TPC-H decision support benchmark
|
||||
|
||||
SELECT
|
||||
|
|
|
@ -2,9 +2,7 @@
|
|||
-- MULTI_TPCH_QUERY10
|
||||
--
|
||||
|
||||
-- Query #10 from the TPC-H decision support benchmark. Unlike other TPC-H tests,
|
||||
-- we don't set citus.large_table_shard_count here, and instead use the default value
|
||||
-- coming from postgresql.conf or multi_task_tracker_executor.conf.
|
||||
-- Query #10 from the TPC-H decision support benchmark.
|
||||
|
||||
|
||||
SELECT
|
||||
|
|
|
@ -3,10 +3,6 @@
|
|||
--
|
||||
|
||||
|
||||
-- Change configuration to treat lineitem and orders tables as large
|
||||
|
||||
SET citus.large_table_shard_count TO 2;
|
||||
|
||||
-- Query #12 from the TPC-H decision support benchmark
|
||||
|
||||
SELECT
|
||||
|
|
|
@ -3,10 +3,6 @@
|
|||
--
|
||||
|
||||
|
||||
-- Change configuration to treat lineitem and orders tables as large
|
||||
|
||||
SET citus.large_table_shard_count TO 2;
|
||||
|
||||
-- Query #14 from the TPC-H decision support benchmark
|
||||
|
||||
SELECT
|
||||
|
|
|
@ -3,10 +3,6 @@
|
|||
--
|
||||
|
||||
|
||||
-- Change configuration to treat lineitem and orders tables as large
|
||||
|
||||
SET citus.large_table_shard_count TO 2;
|
||||
|
||||
-- Query #19 from the TPC-H decision support benchmark. Note that we modified
|
||||
-- the query from its original to make it work on smaller data sets.
|
||||
|
||||
|
|
|
@ -2,9 +2,7 @@
|
|||
-- MULTI_TPCH_QUERY3
|
||||
--
|
||||
|
||||
-- Query #3 from the TPC-H decision support benchmark. Unlike other TPC-H tests,
|
||||
-- we don't set citus.large_table_shard_count here, and instead use the default value
|
||||
-- coming from postgresql.conf or multi_task_tracker_executor.conf.
|
||||
-- Query #3 from the TPC-H decision support benchmark.
|
||||
|
||||
|
||||
SELECT
|
||||
|
|
|
@ -3,10 +3,6 @@
|
|||
--
|
||||
|
||||
|
||||
-- Change configuration to treat lineitem and orders tables as large
|
||||
|
||||
SET citus.large_table_shard_count TO 2;
|
||||
|
||||
-- Query #6 from the TPC-H decision support benchmark
|
||||
|
||||
SELECT
|
||||
|
|
|
@ -3,10 +3,6 @@
|
|||
--
|
||||
|
||||
|
||||
-- Change configuration to treat lineitem AND orders tables as large
|
||||
|
||||
SET citus.large_table_shard_count TO 2;
|
||||
|
||||
-- Query #7 from the TPC-H decision support benchmark
|
||||
|
||||
SELECT
|
||||
|
|
|
@ -3,10 +3,6 @@
|
|||
--
|
||||
|
||||
|
||||
-- Change configuration to treat lineitem AND orders tables AS large
|
||||
|
||||
SET citus.large_table_shard_count TO 2;
|
||||
|
||||
-- Query #7 from the TPC-H benchmark; modified to include sub-selects
|
||||
|
||||
SELECT
|
||||
|
|
|
@ -39,8 +39,6 @@ SELECT * FROM lineitem_pricing_summary ORDER BY l_returnflag, l_linestatus;
|
|||
|
||||
-- Test we can handle joins
|
||||
|
||||
SET citus.large_table_shard_count TO 2;
|
||||
|
||||
CREATE TABLE shipping_priority AS
|
||||
(
|
||||
SELECT
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
|
||||
CREATE TABLE test_table_1(id int, value_1 int);
|
||||
SELECT master_create_distributed_table('test_table_1', 'id', 'append');
|
||||
SET citus.large_table_shard_count to 1;
|
||||
|
||||
\copy test_table_1 FROM STDIN DELIMITER ','
|
||||
1,2
|
||||
|
|
Loading…
Reference in New Issue