mirror of https://github.com/citusdata/citus.git
Boring regression test output adjustments.
Soon shard pruning will be optimized not to generally work linearly anymore. Thus we can't print the pruned shard intervals as currently done anymore. The current printing of shard ids also prevents us from running tests in parallel, as otherwise shard ids aren't linearly numbered.pull/1351/head
parent
e637fd802d
commit
b7dfeb0bec
|
@ -2655,12 +2655,7 @@ PruneShardList(Oid relationId, Index tableId, List *whereClauseList,
|
|||
shardPruned = predicate_refuted_by(constraintList, restrictInfoList);
|
||||
}
|
||||
|
||||
if (shardPruned)
|
||||
{
|
||||
ereport(DEBUG2, (errmsg("predicate pruning for shardId "
|
||||
UINT64_FORMAT, shardInterval->shardId)));
|
||||
}
|
||||
else
|
||||
if (!shardPruned)
|
||||
{
|
||||
remainingShardList = lappend(remainingShardList, shardInterval);
|
||||
}
|
||||
|
|
|
@ -39,9 +39,6 @@ SELECT count(*) FROM orders_hash_partitioned;
|
|||
(1 row)
|
||||
|
||||
SELECT count(*) FROM orders_hash_partitioned WHERE o_orderkey = 1;
|
||||
DEBUG: predicate pruning for shardId 630001
|
||||
DEBUG: predicate pruning for shardId 630002
|
||||
DEBUG: predicate pruning for shardId 630003
|
||||
DEBUG: Creating router plan
|
||||
DEBUG: Plan is router executable
|
||||
count
|
||||
|
@ -50,9 +47,6 @@ DEBUG: Plan is router executable
|
|||
(1 row)
|
||||
|
||||
SELECT count(*) FROM orders_hash_partitioned WHERE o_orderkey = 2;
|
||||
DEBUG: predicate pruning for shardId 630000
|
||||
DEBUG: predicate pruning for shardId 630001
|
||||
DEBUG: predicate pruning for shardId 630002
|
||||
DEBUG: Creating router plan
|
||||
DEBUG: Plan is router executable
|
||||
count
|
||||
|
@ -61,9 +55,6 @@ DEBUG: Plan is router executable
|
|||
(1 row)
|
||||
|
||||
SELECT count(*) FROM orders_hash_partitioned WHERE o_orderkey = 3;
|
||||
DEBUG: predicate pruning for shardId 630000
|
||||
DEBUG: predicate pruning for shardId 630002
|
||||
DEBUG: predicate pruning for shardId 630003
|
||||
DEBUG: Creating router plan
|
||||
DEBUG: Plan is router executable
|
||||
count
|
||||
|
@ -72,9 +63,6 @@ DEBUG: Plan is router executable
|
|||
(1 row)
|
||||
|
||||
SELECT count(*) FROM orders_hash_partitioned WHERE o_orderkey = 4;
|
||||
DEBUG: predicate pruning for shardId 630000
|
||||
DEBUG: predicate pruning for shardId 630002
|
||||
DEBUG: predicate pruning for shardId 630003
|
||||
DEBUG: Creating router plan
|
||||
DEBUG: Plan is router executable
|
||||
count
|
||||
|
@ -84,9 +72,6 @@ DEBUG: Plan is router executable
|
|||
|
||||
SELECT count(*) FROM orders_hash_partitioned
|
||||
WHERE o_orderkey = 1 AND o_clerk = 'aaa';
|
||||
DEBUG: predicate pruning for shardId 630001
|
||||
DEBUG: predicate pruning for shardId 630002
|
||||
DEBUG: predicate pruning for shardId 630003
|
||||
DEBUG: Creating router plan
|
||||
DEBUG: Plan is router executable
|
||||
count
|
||||
|
@ -95,9 +80,6 @@ DEBUG: Plan is router executable
|
|||
(1 row)
|
||||
|
||||
SELECT count(*) FROM orders_hash_partitioned WHERE o_orderkey = abs(-1);
|
||||
DEBUG: predicate pruning for shardId 630001
|
||||
DEBUG: predicate pruning for shardId 630002
|
||||
DEBUG: predicate pruning for shardId 630003
|
||||
DEBUG: Creating router plan
|
||||
DEBUG: Plan is router executable
|
||||
count
|
||||
|
@ -114,36 +96,24 @@ SELECT count(*) FROM orders_hash_partitioned;
|
|||
(1 row)
|
||||
|
||||
SELECT count(*) FROM orders_hash_partitioned WHERE o_orderkey = 1;
|
||||
DEBUG: predicate pruning for shardId 630001
|
||||
DEBUG: predicate pruning for shardId 630002
|
||||
DEBUG: predicate pruning for shardId 630003
|
||||
count
|
||||
-------
|
||||
0
|
||||
(1 row)
|
||||
|
||||
SELECT count(*) FROM orders_hash_partitioned WHERE o_orderkey = 2;
|
||||
DEBUG: predicate pruning for shardId 630000
|
||||
DEBUG: predicate pruning for shardId 630001
|
||||
DEBUG: predicate pruning for shardId 630002
|
||||
count
|
||||
-------
|
||||
0
|
||||
(1 row)
|
||||
|
||||
SELECT count(*) FROM orders_hash_partitioned WHERE o_orderkey = 3;
|
||||
DEBUG: predicate pruning for shardId 630000
|
||||
DEBUG: predicate pruning for shardId 630002
|
||||
DEBUG: predicate pruning for shardId 630003
|
||||
count
|
||||
-------
|
||||
0
|
||||
(1 row)
|
||||
|
||||
SELECT count(*) FROM orders_hash_partitioned WHERE o_orderkey = 4;
|
||||
DEBUG: predicate pruning for shardId 630000
|
||||
DEBUG: predicate pruning for shardId 630002
|
||||
DEBUG: predicate pruning for shardId 630003
|
||||
count
|
||||
-------
|
||||
0
|
||||
|
@ -151,18 +121,12 @@ DEBUG: predicate pruning for shardId 630003
|
|||
|
||||
SELECT count(*) FROM orders_hash_partitioned
|
||||
WHERE o_orderkey = 1 AND o_clerk = 'aaa';
|
||||
DEBUG: predicate pruning for shardId 630001
|
||||
DEBUG: predicate pruning for shardId 630002
|
||||
DEBUG: predicate pruning for shardId 630003
|
||||
count
|
||||
-------
|
||||
0
|
||||
(1 row)
|
||||
|
||||
SELECT count(*) FROM orders_hash_partitioned WHERE o_orderkey = abs(-1);
|
||||
DEBUG: predicate pruning for shardId 630001
|
||||
DEBUG: predicate pruning for shardId 630002
|
||||
DEBUG: predicate pruning for shardId 630003
|
||||
count
|
||||
-------
|
||||
0
|
||||
|
@ -189,10 +153,6 @@ SELECT count(*) FROM orders_hash_partitioned WHERE o_orderkey > 2;
|
|||
|
||||
SELECT count(*) FROM orders_hash_partitioned
|
||||
WHERE o_orderkey = 1 OR o_orderkey = 2;
|
||||
DEBUG: predicate pruning for shardId 630001
|
||||
DEBUG: predicate pruning for shardId 630002
|
||||
DEBUG: predicate pruning for shardId 630001
|
||||
DEBUG: predicate pruning for shardId 630002
|
||||
count
|
||||
-------
|
||||
0
|
||||
|
@ -207,10 +167,6 @@ SELECT count(*) FROM orders_hash_partitioned
|
|||
|
||||
SELECT count(*) FROM orders_hash_partitioned
|
||||
WHERE o_orderkey = 1 OR (o_orderkey = 3 AND o_clerk = 'aaa');
|
||||
DEBUG: predicate pruning for shardId 630002
|
||||
DEBUG: predicate pruning for shardId 630003
|
||||
DEBUG: predicate pruning for shardId 630002
|
||||
DEBUG: predicate pruning for shardId 630003
|
||||
count
|
||||
-------
|
||||
0
|
||||
|
@ -225,9 +181,6 @@ SELECT count(*) FROM orders_hash_partitioned
|
|||
|
||||
SELECT count(*) FROM
|
||||
(SELECT o_orderkey FROM orders_hash_partitioned WHERE o_orderkey = 1) AS orderkeys;
|
||||
DEBUG: predicate pruning for shardId 630001
|
||||
DEBUG: predicate pruning for shardId 630002
|
||||
DEBUG: predicate pruning for shardId 630003
|
||||
DEBUG: Creating router plan
|
||||
DEBUG: Plan is router executable
|
||||
count
|
||||
|
@ -282,9 +235,6 @@ SELECT count(*) FROM orders_hash_partitioned
|
|||
|
||||
SELECT count(*) FROM orders_hash_partitioned
|
||||
WHERE o_orderkey = random() AND o_orderkey = 1;
|
||||
DEBUG: predicate pruning for shardId 630001
|
||||
DEBUG: predicate pruning for shardId 630002
|
||||
DEBUG: predicate pruning for shardId 630003
|
||||
DEBUG: Creating router plan
|
||||
DEBUG: Plan is router executable
|
||||
count
|
||||
|
@ -318,12 +268,6 @@ SELECT count(*)
|
|||
WHERE orders1.o_orderkey = orders2.o_orderkey
|
||||
AND orders1.o_orderkey = 1
|
||||
AND orders2.o_orderkey is NULL;
|
||||
DEBUG: predicate pruning for shardId 630001
|
||||
DEBUG: predicate pruning for shardId 630002
|
||||
DEBUG: predicate pruning for shardId 630003
|
||||
DEBUG: predicate pruning for shardId 630001
|
||||
DEBUG: predicate pruning for shardId 630002
|
||||
DEBUG: predicate pruning for shardId 630003
|
||||
DEBUG: Creating router plan
|
||||
DEBUG: Plan is router executable
|
||||
count
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -25,10 +25,6 @@ DEBUG: join prunable for intervals [13473,14947] and [1,5986]
|
|||
|
||||
SELECT sum(l_linenumber), avg(l_linenumber) FROM lineitem, orders
|
||||
WHERE l_orderkey = o_orderkey AND l_orderkey > 9030;
|
||||
DEBUG: predicate pruning for shardId 290000
|
||||
DEBUG: predicate pruning for shardId 290001
|
||||
DEBUG: predicate pruning for shardId 290002
|
||||
DEBUG: predicate pruning for shardId 290003
|
||||
DEBUG: join prunable for intervals [8997,10560] and [1,5986]
|
||||
DEBUG: join prunable for intervals [10560,12036] and [1,5986]
|
||||
DEBUG: join prunable for intervals [12036,13473] and [1,5986]
|
||||
|
@ -42,14 +38,6 @@ DEBUG: join prunable for intervals [13473,14947] and [1,5986]
|
|||
-- works as expected in this case.
|
||||
SELECT sum(l_linenumber), avg(l_linenumber) FROM lineitem, orders
|
||||
WHERE l_orderkey = o_orderkey AND l_orderkey > 20000;
|
||||
DEBUG: predicate pruning for shardId 290000
|
||||
DEBUG: predicate pruning for shardId 290001
|
||||
DEBUG: predicate pruning for shardId 290002
|
||||
DEBUG: predicate pruning for shardId 290003
|
||||
DEBUG: predicate pruning for shardId 290004
|
||||
DEBUG: predicate pruning for shardId 290005
|
||||
DEBUG: predicate pruning for shardId 290006
|
||||
DEBUG: predicate pruning for shardId 290007
|
||||
sum | avg
|
||||
-----+-----
|
||||
|
|
||||
|
@ -60,11 +48,6 @@ DEBUG: predicate pruning for shardId 290007
|
|||
-- out all the shards, and leave us with an empty task list.
|
||||
SELECT sum(l_linenumber), avg(l_linenumber) FROM lineitem, orders
|
||||
WHERE l_orderkey = o_orderkey AND l_orderkey > 6000 AND o_orderkey < 6000;
|
||||
DEBUG: predicate pruning for shardId 290000
|
||||
DEBUG: predicate pruning for shardId 290001
|
||||
DEBUG: predicate pruning for shardId 290002
|
||||
DEBUG: predicate pruning for shardId 290003
|
||||
DEBUG: predicate pruning for shardId 290009
|
||||
DEBUG: join prunable for intervals [8997,10560] and [1,5986]
|
||||
DEBUG: join prunable for intervals [10560,12036] and [1,5986]
|
||||
DEBUG: join prunable for intervals [12036,13473] and [1,5986]
|
||||
|
|
|
@ -41,8 +41,6 @@ FROM
|
|||
WHERE
|
||||
o_custkey = c_custkey AND
|
||||
o_orderkey < 0;
|
||||
DEBUG: predicate pruning for shardId 290008
|
||||
DEBUG: predicate pruning for shardId 290009
|
||||
count
|
||||
-------
|
||||
0
|
||||
|
@ -57,9 +55,6 @@ FROM
|
|||
WHERE
|
||||
o_custkey = c_custkey AND
|
||||
c_custkey < 0;
|
||||
DEBUG: predicate pruning for shardId 290010
|
||||
DEBUG: predicate pruning for shardId 280001
|
||||
DEBUG: predicate pruning for shardId 280000
|
||||
count
|
||||
-------
|
||||
0
|
||||
|
@ -116,14 +111,6 @@ FROM
|
|||
WHERE
|
||||
l_partkey = c_nationkey AND
|
||||
l_orderkey < 0;
|
||||
DEBUG: predicate pruning for shardId 290000
|
||||
DEBUG: predicate pruning for shardId 290001
|
||||
DEBUG: predicate pruning for shardId 290002
|
||||
DEBUG: predicate pruning for shardId 290003
|
||||
DEBUG: predicate pruning for shardId 290004
|
||||
DEBUG: predicate pruning for shardId 290005
|
||||
DEBUG: predicate pruning for shardId 290006
|
||||
DEBUG: predicate pruning for shardId 290007
|
||||
count
|
||||
-------
|
||||
0
|
||||
|
|
|
@ -118,7 +118,6 @@ INSERT INTO append_partitioned VALUES (414123, 'AAPL', 9580, '2004-10-19 10:23:5
|
|||
SET client_min_messages TO 'DEBUG2';
|
||||
SET citus.task_executor_type TO 'real-time';
|
||||
SELECT * FROM range_partitioned WHERE id = 32743;
|
||||
DEBUG: predicate pruning for shardId 750006
|
||||
DEBUG: Creating router plan
|
||||
DEBUG: Plan is router executable
|
||||
id | symbol | bidder_id | placed_at | kind | limit_price
|
||||
|
@ -127,7 +126,6 @@ DEBUG: Plan is router executable
|
|||
(1 row)
|
||||
|
||||
SELECT * FROM append_partitioned WHERE id = 414123;
|
||||
DEBUG: predicate pruning for shardId 750008
|
||||
DEBUG: Plan is router executable
|
||||
id | symbol | bidder_id | placed_at | kind | limit_price
|
||||
--------+--------+-----------+--------------------------+------+-------------
|
||||
|
|
|
@ -67,7 +67,6 @@ DEBUG: Plan is router executable
|
|||
-- single-shard tests
|
||||
-- test simple select for a single row
|
||||
SELECT * FROM articles_hash_mx WHERE author_id = 10 AND id = 50;
|
||||
DEBUG: predicate pruning for shardId 1220105
|
||||
DEBUG: Creating router plan
|
||||
DEBUG: Plan is router executable
|
||||
id | author_id | title | word_count
|
||||
|
@ -77,7 +76,6 @@ DEBUG: Plan is router executable
|
|||
|
||||
-- get all titles by a single author
|
||||
SELECT title FROM articles_hash_mx WHERE author_id = 10;
|
||||
DEBUG: predicate pruning for shardId 1220105
|
||||
DEBUG: Creating router plan
|
||||
DEBUG: Plan is router executable
|
||||
title
|
||||
|
@ -93,7 +91,6 @@ DEBUG: Plan is router executable
|
|||
SELECT title, word_count FROM articles_hash_mx
|
||||
WHERE author_id = 10
|
||||
ORDER BY word_count DESC NULLS LAST;
|
||||
DEBUG: predicate pruning for shardId 1220105
|
||||
DEBUG: Creating router plan
|
||||
DEBUG: Plan is router executable
|
||||
title | word_count
|
||||
|
@ -110,7 +107,6 @@ SELECT title, id FROM articles_hash_mx
|
|||
WHERE author_id = 5
|
||||
ORDER BY id
|
||||
LIMIT 2;
|
||||
DEBUG: predicate pruning for shardId 1220105
|
||||
DEBUG: Creating router plan
|
||||
DEBUG: Plan is router executable
|
||||
title | id
|
||||
|
@ -124,7 +120,6 @@ DEBUG: Plan is router executable
|
|||
SELECT title, author_id FROM articles_hash_mx
|
||||
WHERE author_id = 7 OR author_id = 8
|
||||
ORDER BY author_id ASC, id;
|
||||
DEBUG: predicate pruning for shardId 1220105
|
||||
DEBUG: Creating router plan
|
||||
DEBUG: Plan is router executable
|
||||
title | author_id
|
||||
|
@ -144,7 +139,6 @@ DEBUG: Plan is router executable
|
|||
-- same query is router executable with no order by
|
||||
SELECT title, author_id FROM articles_hash_mx
|
||||
WHERE author_id = 7 OR author_id = 8;
|
||||
DEBUG: predicate pruning for shardId 1220105
|
||||
DEBUG: Creating router plan
|
||||
DEBUG: Plan is router executable
|
||||
title | author_id
|
||||
|
@ -168,7 +162,6 @@ SELECT author_id, sum(word_count) AS corpus_size FROM articles_hash_mx
|
|||
GROUP BY author_id
|
||||
HAVING sum(word_count) > 1000
|
||||
ORDER BY sum(word_count) DESC;
|
||||
DEBUG: predicate pruning for shardId 1220105
|
||||
DEBUG: Creating router plan
|
||||
DEBUG: Plan is router executable
|
||||
author_id | corpus_size
|
||||
|
@ -185,7 +178,6 @@ SELECT author_id, sum(word_count) AS corpus_size FROM articles_hash_mx
|
|||
GROUP BY author_id
|
||||
HAVING sum(word_count) > 1000
|
||||
ORDER BY sum(word_count) DESC;
|
||||
DEBUG: predicate pruning for shardId 1220105
|
||||
DEBUG: Creating router plan
|
||||
DEBUG: Plan is router executable
|
||||
author_id | corpus_size
|
||||
|
@ -227,7 +219,6 @@ HINT: Consider rewriting the expression with OR/AND clauses.
|
|||
-- queries with CTEs are supported
|
||||
WITH first_author AS ( SELECT id FROM articles_hash_mx WHERE author_id = 1)
|
||||
SELECT * FROM first_author;
|
||||
DEBUG: predicate pruning for shardId 1220105
|
||||
DEBUG: Creating router plan
|
||||
DEBUG: Plan is router executable
|
||||
id
|
||||
|
@ -242,7 +233,6 @@ DEBUG: Plan is router executable
|
|||
-- queries with CTEs are supported even if CTE is not referenced inside query
|
||||
WITH first_author AS ( SELECT id FROM articles_hash_mx WHERE author_id = 1)
|
||||
SELECT title FROM articles_hash_mx WHERE author_id = 1;
|
||||
DEBUG: predicate pruning for shardId 1220105
|
||||
DEBUG: Creating router plan
|
||||
DEBUG: Plan is router executable
|
||||
title
|
||||
|
@ -258,8 +248,6 @@ DEBUG: Plan is router executable
|
|||
WITH id_author AS ( SELECT id, author_id FROM articles_hash_mx WHERE author_id = 1),
|
||||
id_title AS (SELECT id, title from articles_hash_mx WHERE author_id = 1)
|
||||
SELECT * FROM id_author, id_title WHERE id_author.id = id_title.id;
|
||||
DEBUG: predicate pruning for shardId 1220105
|
||||
DEBUG: predicate pruning for shardId 1220105
|
||||
DEBUG: Creating router plan
|
||||
DEBUG: Plan is router executable
|
||||
id | author_id | id | title
|
||||
|
@ -274,8 +262,6 @@ DEBUG: Plan is router executable
|
|||
WITH id_author AS ( SELECT id, author_id FROM articles_hash_mx WHERE author_id = 1),
|
||||
id_title AS (SELECT id, title from articles_hash_mx WHERE author_id = 3)
|
||||
SELECT * FROM id_author, id_title WHERE id_author.id = id_title.id;
|
||||
DEBUG: predicate pruning for shardId 1220105
|
||||
DEBUG: predicate pruning for shardId 1220105
|
||||
DEBUG: Creating router plan
|
||||
DEBUG: Plan is router executable
|
||||
id | author_id | id | title
|
||||
|
@ -286,8 +272,6 @@ DEBUG: Plan is router executable
|
|||
WITH id_author AS ( SELECT id, author_id FROM articles_hash_mx WHERE author_id = 1),
|
||||
id_title AS (SELECT id, title from articles_hash_mx WHERE author_id = 2)
|
||||
SELECT * FROM id_author, id_title WHERE id_author.id = id_title.id;
|
||||
DEBUG: predicate pruning for shardId 1220105
|
||||
DEBUG: predicate pruning for shardId 1220104
|
||||
ERROR: could not run distributed query with complex table expressions
|
||||
HINT: Consider using an equality filter on the distributed table's partition column.
|
||||
-- recursive CTEs are supported when filtered on partition column
|
||||
|
@ -327,12 +311,6 @@ WITH RECURSIVE hierarchy as (
|
|||
h.company_id = ce.company_id AND
|
||||
ce.company_id = 1))
|
||||
SELECT * FROM hierarchy WHERE LEVEL <= 2;
|
||||
DEBUG: predicate pruning for shardId 1220108
|
||||
DEBUG: predicate pruning for shardId 1220109
|
||||
DEBUG: predicate pruning for shardId 1220110
|
||||
DEBUG: predicate pruning for shardId 1220108
|
||||
DEBUG: predicate pruning for shardId 1220109
|
||||
DEBUG: predicate pruning for shardId 1220110
|
||||
DEBUG: Creating router plan
|
||||
DEBUG: Plan is router executable
|
||||
company_id | employee_id | manager_id | level
|
||||
|
@ -354,9 +332,6 @@ WITH RECURSIVE hierarchy as (
|
|||
ON (h.employee_id = ce.manager_id AND
|
||||
h.company_id = ce.company_id))
|
||||
SELECT * FROM hierarchy WHERE LEVEL <= 2;
|
||||
DEBUG: predicate pruning for shardId 1220108
|
||||
DEBUG: predicate pruning for shardId 1220109
|
||||
DEBUG: predicate pruning for shardId 1220110
|
||||
ERROR: could not run distributed query with complex table expressions
|
||||
HINT: Consider using an equality filter on the distributed table's partition column.
|
||||
-- logically wrong query, query involves different shards
|
||||
|
@ -373,12 +348,6 @@ WITH RECURSIVE hierarchy as (
|
|||
h.company_id = ce.company_id AND
|
||||
ce.company_id = 2))
|
||||
SELECT * FROM hierarchy WHERE LEVEL <= 2;
|
||||
DEBUG: predicate pruning for shardId 1220107
|
||||
DEBUG: predicate pruning for shardId 1220109
|
||||
DEBUG: predicate pruning for shardId 1220110
|
||||
DEBUG: predicate pruning for shardId 1220107
|
||||
DEBUG: predicate pruning for shardId 1220108
|
||||
DEBUG: predicate pruning for shardId 1220109
|
||||
ERROR: could not run distributed query with complex table expressions
|
||||
HINT: Consider using an equality filter on the distributed table's partition column.
|
||||
-- grouping sets are supported on single shard
|
||||
|
@ -387,7 +356,6 @@ SELECT
|
|||
FROM articles_hash_mx
|
||||
WHERE author_id = 1 or author_id = 3
|
||||
GROUP BY GROUPING SETS ((id),(subtitle));
|
||||
DEBUG: predicate pruning for shardId 1220105
|
||||
DEBUG: Creating router plan
|
||||
DEBUG: Plan is router executable
|
||||
id | subtitle | count
|
||||
|
@ -422,7 +390,6 @@ ERROR: could not run distributed query with GROUPING SETS, CUBE, or ROLLUP
|
|||
HINT: Consider using an equality filter on the distributed table's partition column.
|
||||
-- queries which involve functions in FROM clause are supported if it goes to a single worker.
|
||||
SELECT * FROM articles_hash_mx, position('om' in 'Thomas') WHERE author_id = 1;
|
||||
DEBUG: predicate pruning for shardId 1220105
|
||||
DEBUG: Creating router plan
|
||||
DEBUG: Plan is router executable
|
||||
id | author_id | title | word_count | position
|
||||
|
@ -435,7 +402,6 @@ DEBUG: Plan is router executable
|
|||
(5 rows)
|
||||
|
||||
SELECT * FROM articles_hash_mx, position('om' in 'Thomas') WHERE author_id = 1 or author_id = 3;
|
||||
DEBUG: predicate pruning for shardId 1220105
|
||||
DEBUG: Creating router plan
|
||||
DEBUG: Plan is router executable
|
||||
id | author_id | title | word_count | position
|
||||
|
@ -503,8 +469,6 @@ SELECT articles_hash_mx.id,test.word_count
|
|||
FROM articles_hash_mx, (SELECT id, word_count FROM articles_hash_mx) AS test
|
||||
WHERE test.id = articles_hash_mx.id and articles_hash_mx.author_id = 1
|
||||
ORDER BY articles_hash_mx.id;
|
||||
DEBUG: predicate pruning for shardId 1220105
|
||||
DEBUG: predicate pruning for shardId 1220105
|
||||
DEBUG: join prunable for task partitionId 0 and 1
|
||||
DEBUG: join prunable for task partitionId 0 and 2
|
||||
DEBUG: join prunable for task partitionId 0 and 3
|
||||
|
@ -544,7 +508,6 @@ HINT: Consider using an equality filter on the distributed table's partition co
|
|||
SELECT *
|
||||
FROM articles_hash_mx
|
||||
WHERE author_id = 1;
|
||||
DEBUG: predicate pruning for shardId 1220105
|
||||
DEBUG: Creating router plan
|
||||
DEBUG: Plan is router executable
|
||||
id | author_id | title | word_count
|
||||
|
@ -560,7 +523,6 @@ DEBUG: Plan is router executable
|
|||
SELECT *
|
||||
FROM articles_hash_mx
|
||||
WHERE author_id = 1 OR author_id = 17;
|
||||
DEBUG: predicate pruning for shardId 1220105
|
||||
DEBUG: Creating router plan
|
||||
DEBUG: Plan is router executable
|
||||
id | author_id | title | word_count
|
||||
|
@ -590,7 +552,6 @@ SELECT *
|
|||
SELECT id as article_id, word_count * id as random_value
|
||||
FROM articles_hash_mx
|
||||
WHERE author_id = 1;
|
||||
DEBUG: predicate pruning for shardId 1220105
|
||||
DEBUG: Creating router plan
|
||||
DEBUG: Plan is router executable
|
||||
article_id | random_value
|
||||
|
@ -607,8 +568,6 @@ SELECT a.author_id as first_author, b.word_count as second_word_count
|
|||
FROM articles_hash_mx a, articles_hash_mx b
|
||||
WHERE a.author_id = 10 and a.author_id = b.author_id
|
||||
LIMIT 3;
|
||||
DEBUG: predicate pruning for shardId 1220105
|
||||
DEBUG: predicate pruning for shardId 1220105
|
||||
DEBUG: Creating router plan
|
||||
DEBUG: Plan is router executable
|
||||
first_author | second_word_count
|
||||
|
@ -624,7 +583,6 @@ SELECT a.author_id as first_author, b.word_count as second_word_count
|
|||
FROM articles_hash_mx a, articles_single_shard_hash_mx b
|
||||
WHERE a.author_id = 10 and a.author_id = b.author_id
|
||||
LIMIT 3;
|
||||
DEBUG: predicate pruning for shardId 1220105
|
||||
DEBUG: Creating router plan
|
||||
DEBUG: Plan is router executable
|
||||
first_author | second_word_count
|
||||
|
@ -643,7 +601,6 @@ SELECT a.author_id as first_author, b.word_count as second_word_count
|
|||
FROM articles_hash_mx a, single_shard b
|
||||
WHERE a.author_id = 2 and a.author_id = b.author_id
|
||||
LIMIT 3;
|
||||
DEBUG: predicate pruning for shardId 1220104
|
||||
DEBUG: Found no worker with all shard placements
|
||||
ERROR: could not run distributed query with complex table expressions
|
||||
-- single shard select with limit is router plannable
|
||||
|
@ -651,7 +608,6 @@ SELECT *
|
|||
FROM articles_hash_mx
|
||||
WHERE author_id = 1
|
||||
LIMIT 3;
|
||||
DEBUG: predicate pruning for shardId 1220105
|
||||
DEBUG: Creating router plan
|
||||
DEBUG: Plan is router executable
|
||||
id | author_id | title | word_count
|
||||
|
@ -667,7 +623,6 @@ SELECT *
|
|||
WHERE author_id = 1
|
||||
LIMIT 2
|
||||
OFFSET 1;
|
||||
DEBUG: predicate pruning for shardId 1220105
|
||||
DEBUG: Creating router plan
|
||||
DEBUG: Plan is router executable
|
||||
id | author_id | title | word_count
|
||||
|
@ -683,7 +638,6 @@ SELECT *
|
|||
ORDER BY id desc
|
||||
LIMIT 2
|
||||
OFFSET 1;
|
||||
DEBUG: predicate pruning for shardId 1220105
|
||||
DEBUG: Creating router plan
|
||||
DEBUG: Plan is router executable
|
||||
id | author_id | title | word_count
|
||||
|
@ -699,7 +653,6 @@ SELECT id
|
|||
WHERE author_id = 1
|
||||
GROUP BY id
|
||||
ORDER BY id;
|
||||
DEBUG: predicate pruning for shardId 1220105
|
||||
DEBUG: Creating router plan
|
||||
DEBUG: Plan is router executable
|
||||
id
|
||||
|
@ -716,7 +669,6 @@ SELECT distinct id
|
|||
FROM articles_hash_mx
|
||||
WHERE author_id = 1
|
||||
ORDER BY id;
|
||||
DEBUG: predicate pruning for shardId 1220105
|
||||
DEBUG: Creating router plan
|
||||
DEBUG: Plan is router executable
|
||||
id
|
||||
|
@ -732,7 +684,6 @@ DEBUG: Plan is router executable
|
|||
SELECT avg(word_count)
|
||||
FROM articles_hash_mx
|
||||
WHERE author_id = 2;
|
||||
DEBUG: predicate pruning for shardId 1220104
|
||||
DEBUG: Creating router plan
|
||||
DEBUG: Plan is router executable
|
||||
avg
|
||||
|
@ -745,7 +696,6 @@ SELECT max(word_count) as max, min(word_count) as min,
|
|||
sum(word_count) as sum, count(word_count) as cnt
|
||||
FROM articles_hash_mx
|
||||
WHERE author_id = 2;
|
||||
DEBUG: predicate pruning for shardId 1220104
|
||||
DEBUG: Creating router plan
|
||||
DEBUG: Plan is router executable
|
||||
max | min | sum | cnt
|
||||
|
@ -758,7 +708,6 @@ SELECT max(word_count)
|
|||
FROM articles_hash_mx
|
||||
WHERE author_id = 1
|
||||
GROUP BY author_id;
|
||||
DEBUG: predicate pruning for shardId 1220105
|
||||
DEBUG: Creating router plan
|
||||
DEBUG: Plan is router executable
|
||||
max
|
||||
|
@ -771,8 +720,6 @@ DEBUG: Plan is router executable
|
|||
(SELECT * FROM articles_hash_mx WHERE author_id = 1)
|
||||
UNION
|
||||
(SELECT * FROM articles_hash_mx WHERE author_id = 3);
|
||||
DEBUG: predicate pruning for shardId 1220105
|
||||
DEBUG: predicate pruning for shardId 1220105
|
||||
DEBUG: Creating router plan
|
||||
DEBUG: Plan is router executable
|
||||
id | author_id | title | word_count
|
||||
|
@ -793,8 +740,6 @@ SELECT * FROM (
|
|||
(SELECT * FROM articles_hash_mx WHERE author_id = 1)
|
||||
UNION
|
||||
(SELECT * FROM articles_hash_mx WHERE author_id = 3)) uu;
|
||||
DEBUG: predicate pruning for shardId 1220105
|
||||
DEBUG: predicate pruning for shardId 1220105
|
||||
DEBUG: Creating router plan
|
||||
DEBUG: Plan is router executable
|
||||
id | author_id | title | word_count
|
||||
|
@ -814,8 +759,6 @@ DEBUG: Plan is router executable
|
|||
(SELECT LEFT(title, 1) FROM articles_hash_mx WHERE author_id = 1)
|
||||
UNION
|
||||
(SELECT LEFT(title, 1) FROM articles_hash_mx WHERE author_id = 3);
|
||||
DEBUG: predicate pruning for shardId 1220105
|
||||
DEBUG: predicate pruning for shardId 1220105
|
||||
DEBUG: Creating router plan
|
||||
DEBUG: Plan is router executable
|
||||
left
|
||||
|
@ -826,8 +769,6 @@ DEBUG: Plan is router executable
|
|||
(SELECT LEFT(title, 1) FROM articles_hash_mx WHERE author_id = 1)
|
||||
INTERSECT
|
||||
(SELECT LEFT(title, 1) FROM articles_hash_mx WHERE author_id = 3);
|
||||
DEBUG: predicate pruning for shardId 1220105
|
||||
DEBUG: predicate pruning for shardId 1220105
|
||||
DEBUG: Creating router plan
|
||||
DEBUG: Plan is router executable
|
||||
left
|
||||
|
@ -838,8 +779,6 @@ DEBUG: Plan is router executable
|
|||
(SELECT LEFT(title, 2) FROM articles_hash_mx WHERE author_id = 1)
|
||||
EXCEPT
|
||||
(SELECT LEFT(title, 2) FROM articles_hash_mx WHERE author_id = 3);
|
||||
DEBUG: predicate pruning for shardId 1220105
|
||||
DEBUG: predicate pruning for shardId 1220105
|
||||
DEBUG: Creating router plan
|
||||
DEBUG: Plan is router executable
|
||||
left
|
||||
|
@ -903,7 +842,6 @@ SET client_min_messages to 'DEBUG2';
|
|||
SELECT *
|
||||
FROM articles_hash_mx
|
||||
WHERE author_id = 1 and author_id >= 1;
|
||||
DEBUG: predicate pruning for shardId 1220105
|
||||
DEBUG: Creating router plan
|
||||
DEBUG: Plan is router executable
|
||||
id | author_id | title | word_count
|
||||
|
@ -933,7 +871,6 @@ SELECT *
|
|||
SELECT *
|
||||
FROM articles_hash_mx
|
||||
WHERE author_id = 1 and (id = 1 or id = 41);
|
||||
DEBUG: predicate pruning for shardId 1220105
|
||||
DEBUG: Creating router plan
|
||||
DEBUG: Plan is router executable
|
||||
id | author_id | title | word_count
|
||||
|
@ -946,7 +883,6 @@ DEBUG: Plan is router executable
|
|||
SELECT *
|
||||
FROM articles_hash_mx
|
||||
WHERE author_id = 1 and (id = random()::int * 0);
|
||||
DEBUG: predicate pruning for shardId 1220105
|
||||
DEBUG: Creating router plan
|
||||
DEBUG: Plan is router executable
|
||||
id | author_id | title | word_count
|
||||
|
@ -984,7 +920,6 @@ SELECT *
|
|||
SELECT *
|
||||
FROM articles_hash_mx
|
||||
WHERE author_id = abs(-1);
|
||||
DEBUG: predicate pruning for shardId 1220105
|
||||
DEBUG: Creating router plan
|
||||
DEBUG: Plan is router executable
|
||||
id | author_id | title | word_count
|
||||
|
@ -1026,7 +961,6 @@ SELECT *
|
|||
SELECT *
|
||||
FROM articles_hash_mx
|
||||
WHERE author_id = 1 and (id = abs(id - 2));
|
||||
DEBUG: predicate pruning for shardId 1220105
|
||||
DEBUG: Creating router plan
|
||||
DEBUG: Plan is router executable
|
||||
id | author_id | title | word_count
|
||||
|
@ -1051,7 +985,6 @@ SELECT *
|
|||
SELECT *
|
||||
FROM articles_hash_mx
|
||||
WHERE (author_id = 1) = true;
|
||||
DEBUG: predicate pruning for shardId 1220105
|
||||
DEBUG: Creating router plan
|
||||
DEBUG: Plan is router executable
|
||||
id | author_id | title | word_count
|
||||
|
@ -1067,7 +1000,6 @@ DEBUG: Plan is router executable
|
|||
SELECT *
|
||||
FROM articles_hash_mx
|
||||
WHERE (author_id = 1) and id between 0 and 20;
|
||||
DEBUG: predicate pruning for shardId 1220105
|
||||
DEBUG: Creating router plan
|
||||
DEBUG: Plan is router executable
|
||||
id | author_id | title | word_count
|
||||
|
@ -1080,7 +1012,6 @@ DEBUG: Plan is router executable
|
|||
SELECT *
|
||||
FROM articles_hash_mx
|
||||
WHERE (author_id = 1) and (id = 1 or id = 31) and title like '%s';
|
||||
DEBUG: predicate pruning for shardId 1220105
|
||||
DEBUG: Creating router plan
|
||||
DEBUG: Plan is router executable
|
||||
id | author_id | title | word_count
|
||||
|
@ -1093,7 +1024,6 @@ DEBUG: Plan is router executable
|
|||
SELECT *
|
||||
FROM articles_hash_mx
|
||||
WHERE (id = 1 or id = 31) and title like '%s' and (author_id = 1);
|
||||
DEBUG: predicate pruning for shardId 1220105
|
||||
DEBUG: Creating router plan
|
||||
DEBUG: Plan is router executable
|
||||
id | author_id | title | word_count
|
||||
|
@ -1106,7 +1036,6 @@ DEBUG: Plan is router executable
|
|||
SELECT *
|
||||
FROM articles_hash_mx
|
||||
WHERE (title like '%s' or title like 'a%') and (author_id = 1);
|
||||
DEBUG: predicate pruning for shardId 1220105
|
||||
DEBUG: Creating router plan
|
||||
DEBUG: Plan is router executable
|
||||
id | author_id | title | word_count
|
||||
|
@ -1122,7 +1051,6 @@ DEBUG: Plan is router executable
|
|||
SELECT *
|
||||
FROM articles_hash_mx
|
||||
WHERE (title like '%s' or title like 'a%') and (author_id = 1) and (word_count < 3000 or word_count > 8000);
|
||||
DEBUG: predicate pruning for shardId 1220105
|
||||
DEBUG: Creating router plan
|
||||
DEBUG: Plan is router executable
|
||||
id | author_id | title | word_count
|
||||
|
@ -1136,7 +1064,6 @@ DEBUG: Plan is router executable
|
|||
SELECT LAG(title, 1) over (ORDER BY word_count) prev, title, word_count
|
||||
FROM articles_hash_mx
|
||||
WHERE author_id = 5;
|
||||
DEBUG: predicate pruning for shardId 1220105
|
||||
DEBUG: Creating router plan
|
||||
DEBUG: Plan is router executable
|
||||
prev | title | word_count
|
||||
|
@ -1152,7 +1079,6 @@ SELECT LAG(title, 1) over (ORDER BY word_count) prev, title, word_count
|
|||
FROM articles_hash_mx
|
||||
WHERE author_id = 5
|
||||
ORDER BY word_count DESC;
|
||||
DEBUG: predicate pruning for shardId 1220105
|
||||
DEBUG: Creating router plan
|
||||
DEBUG: Plan is router executable
|
||||
prev | title | word_count
|
||||
|
@ -1167,7 +1093,6 @@ DEBUG: Plan is router executable
|
|||
SELECT id, MIN(id) over (order by word_count)
|
||||
FROM articles_hash_mx
|
||||
WHERE author_id = 1;
|
||||
DEBUG: predicate pruning for shardId 1220105
|
||||
DEBUG: Creating router plan
|
||||
DEBUG: Plan is router executable
|
||||
id | min
|
||||
|
@ -1182,7 +1107,6 @@ DEBUG: Plan is router executable
|
|||
SELECT id, word_count, AVG(word_count) over (order by word_count)
|
||||
FROM articles_hash_mx
|
||||
WHERE author_id = 1;
|
||||
DEBUG: predicate pruning for shardId 1220105
|
||||
DEBUG: Creating router plan
|
||||
DEBUG: Plan is router executable
|
||||
id | word_count | avg
|
||||
|
@ -1197,7 +1121,6 @@ DEBUG: Plan is router executable
|
|||
SELECT word_count, rank() OVER (PARTITION BY author_id ORDER BY word_count)
|
||||
FROM articles_hash_mx
|
||||
WHERE author_id = 1;
|
||||
DEBUG: predicate pruning for shardId 1220105
|
||||
DEBUG: Creating router plan
|
||||
DEBUG: Plan is router executable
|
||||
word_count | rank
|
||||
|
@ -1234,7 +1157,6 @@ SELECT
|
|||
articles_hash_mx
|
||||
WHERE
|
||||
author_id = 5;
|
||||
DEBUG: predicate pruning for shardId 1220105
|
||||
DEBUG: Creating router plan
|
||||
DEBUG: Plan is router executable
|
||||
c
|
||||
|
@ -1276,7 +1198,6 @@ SELECT *
|
|||
FROM articles_hash_mx
|
||||
WHERE author_id = 1
|
||||
ORDER BY id;
|
||||
DEBUG: predicate pruning for shardId 1220105
|
||||
DEBUG: Creating router plan
|
||||
DEBUG: Plan is router executable
|
||||
id | author_id | title | word_count
|
||||
|
@ -1296,7 +1217,6 @@ DECLARE test_cursor CURSOR FOR
|
|||
FROM articles_hash_mx
|
||||
WHERE author_id = 1
|
||||
ORDER BY id;
|
||||
DEBUG: predicate pruning for shardId 1220105
|
||||
DEBUG: Creating router plan
|
||||
DEBUG: Plan is router executable
|
||||
FETCH test_cursor;
|
||||
|
@ -1324,7 +1244,6 @@ COPY (
|
|||
FROM articles_hash_mx
|
||||
WHERE author_id = 1
|
||||
ORDER BY id) TO STDOUT;
|
||||
DEBUG: predicate pruning for shardId 1220105
|
||||
DEBUG: Creating router plan
|
||||
DEBUG: Plan is router executable
|
||||
1 1 arsenous 9572
|
||||
|
@ -1339,14 +1258,12 @@ CREATE TEMP TABLE temp_articles_hash_mx as
|
|||
FROM articles_hash_mx
|
||||
WHERE author_id = 1
|
||||
ORDER BY id;
|
||||
DEBUG: predicate pruning for shardId 1220105
|
||||
DEBUG: Creating router plan
|
||||
DEBUG: Plan is router executable
|
||||
-- router plannable queries may include filter for aggragates
|
||||
SELECT count(*), count(*) FILTER (WHERE id < 3)
|
||||
FROM articles_hash_mx
|
||||
WHERE author_id = 1;
|
||||
DEBUG: predicate pruning for shardId 1220105
|
||||
DEBUG: Creating router plan
|
||||
DEBUG: Plan is router executable
|
||||
count | count
|
||||
|
@ -1369,7 +1286,6 @@ PREPARE author_1_articles as
|
|||
FROM articles_hash_mx
|
||||
WHERE author_id = 1;
|
||||
EXECUTE author_1_articles;
|
||||
DEBUG: predicate pruning for shardId 1220105
|
||||
DEBUG: Creating router plan
|
||||
DEBUG: Plan is router executable
|
||||
id | author_id | title | word_count
|
||||
|
@ -1387,7 +1303,6 @@ PREPARE author_articles(int) as
|
|||
FROM articles_hash_mx
|
||||
WHERE author_id = $1;
|
||||
EXECUTE author_articles(1);
|
||||
DEBUG: predicate pruning for shardId 1220105
|
||||
DEBUG: Creating router plan
|
||||
DEBUG: Plan is router executable
|
||||
id | author_id | title | word_count
|
||||
|
@ -1411,18 +1326,6 @@ BEGIN
|
|||
END;
|
||||
$$ LANGUAGE plpgsql;
|
||||
SELECT author_articles_max_id();
|
||||
DEBUG: predicate pruning for shardId 1220105
|
||||
CONTEXT: SQL statement "SELECT MAX(id) FROM articles_hash_mx ah
|
||||
WHERE author_id = 1"
|
||||
PL/pgSQL function author_articles_max_id() line 5 at SQL statement
|
||||
DEBUG: predicate pruning for shardId 1220105
|
||||
CONTEXT: SQL statement "SELECT MAX(id) FROM articles_hash_mx ah
|
||||
WHERE author_id = 1"
|
||||
PL/pgSQL function author_articles_max_id() line 5 at SQL statement
|
||||
DEBUG: predicate pruning for shardId 1220105
|
||||
CONTEXT: SQL statement "SELECT MAX(id) FROM articles_hash_mx ah
|
||||
WHERE author_id = 1"
|
||||
PL/pgSQL function author_articles_max_id() line 5 at SQL statement
|
||||
DEBUG: Creating router plan
|
||||
CONTEXT: SQL statement "SELECT MAX(id) FROM articles_hash_mx ah
|
||||
WHERE author_id = 1"
|
||||
|
@ -1448,11 +1351,6 @@ BEGIN
|
|||
END;
|
||||
$$ LANGUAGE plpgsql;
|
||||
SELECT * FROM author_articles_id_word_count();
|
||||
DEBUG: predicate pruning for shardId 1220105
|
||||
CONTEXT: SQL statement "SELECT ah.id, ah.word_count
|
||||
FROM articles_hash_mx ah
|
||||
WHERE author_id = 1"
|
||||
PL/pgSQL function author_articles_id_word_count() line 4 at RETURN QUERY
|
||||
DEBUG: Creating router plan
|
||||
CONTEXT: SQL statement "SELECT ah.id, ah.word_count
|
||||
FROM articles_hash_mx ah
|
||||
|
@ -1475,7 +1373,6 @@ PL/pgSQL function author_articles_id_word_count() line 4 at RETURN QUERY
|
|||
-- materialized views can be created for router plannable queries
|
||||
CREATE MATERIALIZED VIEW mv_articles_hash_mx AS
|
||||
SELECT * FROM articles_hash_mx WHERE author_id = 1;
|
||||
DEBUG: predicate pruning for shardId 1220105
|
||||
DEBUG: Creating router plan
|
||||
DEBUG: Plan is router executable
|
||||
SELECT * FROM mv_articles_hash_mx;
|
||||
|
@ -1513,7 +1410,6 @@ DEBUG: Plan is router executable
|
|||
SELECT id
|
||||
FROM articles_hash_mx
|
||||
WHERE author_id = 1;
|
||||
DEBUG: predicate pruning for shardId 1220105
|
||||
DEBUG: Creating router plan
|
||||
DEBUG: Plan is router executable
|
||||
id
|
||||
|
|
|
@ -22,12 +22,6 @@ SELECT shardminvalue, shardmaxvalue from pg_dist_shard WHERE shardid = 290001;
|
|||
-- Check that partition and join pruning works when min/max values exist
|
||||
-- Adding l_orderkey = 1 to make the query not router executable
|
||||
SELECT l_orderkey, l_linenumber, l_shipdate FROM lineitem WHERE l_orderkey = 9030 or l_orderkey = 1;
|
||||
DEBUG: predicate pruning for shardId 290001
|
||||
DEBUG: predicate pruning for shardId 290002
|
||||
DEBUG: predicate pruning for shardId 290003
|
||||
DEBUG: predicate pruning for shardId 290005
|
||||
DEBUG: predicate pruning for shardId 290006
|
||||
DEBUG: predicate pruning for shardId 290007
|
||||
l_orderkey | l_linenumber | l_shipdate
|
||||
------------+--------------+------------
|
||||
1 | 1 | 03-13-1996
|
||||
|
@ -63,12 +57,6 @@ DEBUG: join prunable for intervals [13473,14947] and [1,5986]
|
|||
-- partition or join pruning for the shard with null min value.
|
||||
UPDATE pg_dist_shard SET shardminvalue = NULL WHERE shardid = 290000;
|
||||
SELECT l_orderkey, l_linenumber, l_shipdate FROM lineitem WHERE l_orderkey = 9030;
|
||||
DEBUG: predicate pruning for shardId 290001
|
||||
DEBUG: predicate pruning for shardId 290002
|
||||
DEBUG: predicate pruning for shardId 290003
|
||||
DEBUG: predicate pruning for shardId 290005
|
||||
DEBUG: predicate pruning for shardId 290006
|
||||
DEBUG: predicate pruning for shardId 290007
|
||||
l_orderkey | l_linenumber | l_shipdate
|
||||
------------+--------------+------------
|
||||
9030 | 1 | 09-02-1998
|
||||
|
@ -97,11 +85,6 @@ DEBUG: join prunable for intervals [13473,14947] and [1,5986]
|
|||
-- don't apply partition or join pruning for this other shard either.
|
||||
UPDATE pg_dist_shard SET shardmaxvalue = NULL WHERE shardid = 290001;
|
||||
SELECT l_orderkey, l_linenumber, l_shipdate FROM lineitem WHERE l_orderkey = 9030;
|
||||
DEBUG: predicate pruning for shardId 290002
|
||||
DEBUG: predicate pruning for shardId 290003
|
||||
DEBUG: predicate pruning for shardId 290005
|
||||
DEBUG: predicate pruning for shardId 290006
|
||||
DEBUG: predicate pruning for shardId 290007
|
||||
l_orderkey | l_linenumber | l_shipdate
|
||||
------------+--------------+------------
|
||||
9030 | 1 | 09-02-1998
|
||||
|
@ -129,12 +112,6 @@ DEBUG: join prunable for intervals [13473,14947] and [1,5986]
|
|||
-- should apply partition and join pruning for this shard now.
|
||||
UPDATE pg_dist_shard SET shardminvalue = '0' WHERE shardid = 290000;
|
||||
SELECT l_orderkey, l_linenumber, l_shipdate FROM lineitem WHERE l_orderkey = 9030;
|
||||
DEBUG: predicate pruning for shardId 290000
|
||||
DEBUG: predicate pruning for shardId 290002
|
||||
DEBUG: predicate pruning for shardId 290003
|
||||
DEBUG: predicate pruning for shardId 290005
|
||||
DEBUG: predicate pruning for shardId 290006
|
||||
DEBUG: predicate pruning for shardId 290007
|
||||
l_orderkey | l_linenumber | l_shipdate
|
||||
------------+--------------+------------
|
||||
9030 | 1 | 09-02-1998
|
||||
|
|
|
@ -8,12 +8,6 @@ SET citus.explain_distributed_queries TO off;
|
|||
SET client_min_messages TO DEBUG2;
|
||||
-- Adding additional l_orderkey = 1 to make this query not router executable
|
||||
SELECT l_orderkey, l_linenumber, l_shipdate FROM lineitem WHERE l_orderkey = 9030 or l_orderkey = 1;
|
||||
DEBUG: predicate pruning for shardId 290001
|
||||
DEBUG: predicate pruning for shardId 290002
|
||||
DEBUG: predicate pruning for shardId 290003
|
||||
DEBUG: predicate pruning for shardId 290005
|
||||
DEBUG: predicate pruning for shardId 290006
|
||||
DEBUG: predicate pruning for shardId 290007
|
||||
l_orderkey | l_linenumber | l_shipdate
|
||||
------------+--------------+------------
|
||||
1 | 1 | 03-13-1996
|
||||
|
@ -36,10 +30,6 @@ DEBUG: predicate pruning for shardId 290007
|
|||
-- trigger the the creation of toasted tables and indexes. This in turn prints
|
||||
-- non-deterministic debug messages. To avoid this chain, we use l_linenumber.
|
||||
SELECT sum(l_linenumber), avg(l_linenumber) FROM lineitem WHERE l_orderkey > 9030;
|
||||
DEBUG: predicate pruning for shardId 290000
|
||||
DEBUG: predicate pruning for shardId 290001
|
||||
DEBUG: predicate pruning for shardId 290002
|
||||
DEBUG: predicate pruning for shardId 290003
|
||||
sum | avg
|
||||
-------+--------------------
|
||||
17999 | 3.0189533713518953
|
||||
|
@ -47,7 +37,6 @@ DEBUG: predicate pruning for shardId 290003
|
|||
|
||||
SELECT sum(l_linenumber), avg(l_linenumber) FROM lineitem
|
||||
WHERE (l_orderkey < 4000 OR l_orderkey > 9030);
|
||||
DEBUG: predicate pruning for shardId 290003
|
||||
sum | avg
|
||||
-------+--------------------
|
||||
30184 | 3.0159872102318145
|
||||
|
@ -55,14 +44,6 @@ DEBUG: predicate pruning for shardId 290003
|
|||
|
||||
-- The following query should prune out all shards and return empty results
|
||||
SELECT sum(l_linenumber), avg(l_linenumber) FROM lineitem WHERE l_orderkey > 20000;
|
||||
DEBUG: predicate pruning for shardId 290000
|
||||
DEBUG: predicate pruning for shardId 290001
|
||||
DEBUG: predicate pruning for shardId 290002
|
||||
DEBUG: predicate pruning for shardId 290003
|
||||
DEBUG: predicate pruning for shardId 290004
|
||||
DEBUG: predicate pruning for shardId 290005
|
||||
DEBUG: predicate pruning for shardId 290006
|
||||
DEBUG: predicate pruning for shardId 290007
|
||||
sum | avg
|
||||
-----+-----
|
||||
|
|
||||
|
@ -168,7 +149,6 @@ INSERT INTO pg_dist_shard_placement (shardid, shardstate, shardlength, nodename,
|
|||
-- Verify that shard pruning works. Note that these queries should all prune
|
||||
-- one shard.
|
||||
EXPLAIN SELECT count(*) FROM varchar_partitioned_table WHERE varchar_column = 'BA2';
|
||||
DEBUG: predicate pruning for shardId 100
|
||||
QUERY PLAN
|
||||
-----------------------------------------------------------------------
|
||||
Aggregate (cost=0.00..0.00 rows=0 width=0)
|
||||
|
@ -178,7 +158,6 @@ DEBUG: predicate pruning for shardId 100
|
|||
|
||||
EXPLAIN SELECT count(*) FROM array_partitioned_table
|
||||
WHERE array_column > '{BA1000U2AMO4ZGX, BZZXSP27F21T6}';
|
||||
DEBUG: predicate pruning for shardId 102
|
||||
QUERY PLAN
|
||||
-----------------------------------------------------------------------
|
||||
Aggregate (cost=0.00..0.00 rows=0 width=0)
|
||||
|
@ -188,7 +167,6 @@ DEBUG: predicate pruning for shardId 102
|
|||
|
||||
EXPLAIN SELECT count(*) FROM composite_partitioned_table
|
||||
WHERE composite_column < '(b,5,c)'::composite_type;
|
||||
DEBUG: predicate pruning for shardId 105
|
||||
QUERY PLAN
|
||||
-----------------------------------------------------------------------
|
||||
Aggregate (cost=0.00..0.00 rows=0 width=0)
|
||||
|
|
|
@ -126,7 +126,6 @@ DEBUG: Plan is router executable
|
|||
-- single-shard tests
|
||||
-- test simple select for a single row
|
||||
SELECT * FROM articles_hash WHERE author_id = 10 AND id = 50;
|
||||
DEBUG: predicate pruning for shardId 840001
|
||||
DEBUG: Creating router plan
|
||||
DEBUG: Plan is router executable
|
||||
id | author_id | title | word_count
|
||||
|
@ -136,7 +135,6 @@ DEBUG: Plan is router executable
|
|||
|
||||
-- get all titles by a single author
|
||||
SELECT title FROM articles_hash WHERE author_id = 10;
|
||||
DEBUG: predicate pruning for shardId 840001
|
||||
DEBUG: Creating router plan
|
||||
DEBUG: Plan is router executable
|
||||
title
|
||||
|
@ -152,7 +150,6 @@ DEBUG: Plan is router executable
|
|||
SELECT title, word_count FROM articles_hash
|
||||
WHERE author_id = 10
|
||||
ORDER BY word_count DESC NULLS LAST;
|
||||
DEBUG: predicate pruning for shardId 840001
|
||||
DEBUG: Creating router plan
|
||||
DEBUG: Plan is router executable
|
||||
title | word_count
|
||||
|
@ -169,7 +166,6 @@ SELECT title, id FROM articles_hash
|
|||
WHERE author_id = 5
|
||||
ORDER BY id
|
||||
LIMIT 2;
|
||||
DEBUG: predicate pruning for shardId 840001
|
||||
DEBUG: Creating router plan
|
||||
DEBUG: Plan is router executable
|
||||
title | id
|
||||
|
@ -183,7 +179,6 @@ DEBUG: Plan is router executable
|
|||
SELECT title, author_id FROM articles_hash
|
||||
WHERE author_id = 7 OR author_id = 8
|
||||
ORDER BY author_id ASC, id;
|
||||
DEBUG: predicate pruning for shardId 840001
|
||||
DEBUG: Creating router plan
|
||||
DEBUG: Plan is router executable
|
||||
title | author_id
|
||||
|
@ -203,7 +198,6 @@ DEBUG: Plan is router executable
|
|||
-- same query is router executable with no order by
|
||||
SELECT title, author_id FROM articles_hash
|
||||
WHERE author_id = 7 OR author_id = 8;
|
||||
DEBUG: predicate pruning for shardId 840001
|
||||
DEBUG: Creating router plan
|
||||
DEBUG: Plan is router executable
|
||||
title | author_id
|
||||
|
@ -227,7 +221,6 @@ SELECT author_id, sum(word_count) AS corpus_size FROM articles_hash
|
|||
GROUP BY author_id
|
||||
HAVING sum(word_count) > 1000
|
||||
ORDER BY sum(word_count) DESC;
|
||||
DEBUG: predicate pruning for shardId 840001
|
||||
DEBUG: Creating router plan
|
||||
DEBUG: Plan is router executable
|
||||
author_id | corpus_size
|
||||
|
@ -244,7 +237,6 @@ SELECT author_id, sum(word_count) AS corpus_size FROM articles_hash
|
|||
GROUP BY author_id
|
||||
HAVING sum(word_count) > 1000
|
||||
ORDER BY sum(word_count) DESC;
|
||||
DEBUG: predicate pruning for shardId 840001
|
||||
DEBUG: Creating router plan
|
||||
DEBUG: Plan is router executable
|
||||
author_id | corpus_size
|
||||
|
@ -286,7 +278,6 @@ HINT: Consider rewriting the expression with OR/AND clauses.
|
|||
-- queries with CTEs are supported
|
||||
WITH first_author AS ( SELECT id FROM articles_hash WHERE author_id = 1)
|
||||
SELECT * FROM first_author;
|
||||
DEBUG: predicate pruning for shardId 840001
|
||||
DEBUG: Creating router plan
|
||||
DEBUG: Plan is router executable
|
||||
id
|
||||
|
@ -301,7 +292,6 @@ DEBUG: Plan is router executable
|
|||
-- queries with CTEs are supported even if CTE is not referenced inside query
|
||||
WITH first_author AS ( SELECT id FROM articles_hash WHERE author_id = 1)
|
||||
SELECT title FROM articles_hash WHERE author_id = 1;
|
||||
DEBUG: predicate pruning for shardId 840001
|
||||
DEBUG: Creating router plan
|
||||
DEBUG: Plan is router executable
|
||||
title
|
||||
|
@ -317,8 +307,6 @@ DEBUG: Plan is router executable
|
|||
WITH id_author AS ( SELECT id, author_id FROM articles_hash WHERE author_id = 1),
|
||||
id_title AS (SELECT id, title from articles_hash WHERE author_id = 1)
|
||||
SELECT * FROM id_author, id_title WHERE id_author.id = id_title.id;
|
||||
DEBUG: predicate pruning for shardId 840001
|
||||
DEBUG: predicate pruning for shardId 840001
|
||||
DEBUG: Creating router plan
|
||||
DEBUG: Plan is router executable
|
||||
id | author_id | id | title
|
||||
|
@ -333,8 +321,6 @@ DEBUG: Plan is router executable
|
|||
WITH id_author AS ( SELECT id, author_id FROM articles_hash WHERE author_id = 1),
|
||||
id_title AS (SELECT id, title from articles_hash WHERE author_id = 3)
|
||||
SELECT * FROM id_author, id_title WHERE id_author.id = id_title.id;
|
||||
DEBUG: predicate pruning for shardId 840001
|
||||
DEBUG: predicate pruning for shardId 840001
|
||||
DEBUG: Creating router plan
|
||||
DEBUG: Plan is router executable
|
||||
id | author_id | id | title
|
||||
|
@ -345,8 +331,6 @@ DEBUG: Plan is router executable
|
|||
WITH id_author AS ( SELECT id, author_id FROM articles_hash WHERE author_id = 1),
|
||||
id_title AS (SELECT id, title from articles_hash WHERE author_id = 2)
|
||||
SELECT * FROM id_author, id_title WHERE id_author.id = id_title.id;
|
||||
DEBUG: predicate pruning for shardId 840001
|
||||
DEBUG: predicate pruning for shardId 840000
|
||||
ERROR: could not run distributed query with complex table expressions
|
||||
HINT: Consider using an equality filter on the distributed table's partition column.
|
||||
-- recursive CTEs are supported when filtered on partition column
|
||||
|
@ -399,12 +383,6 @@ WITH RECURSIVE hierarchy as (
|
|||
h.company_id = ce.company_id AND
|
||||
ce.company_id = 1))
|
||||
SELECT * FROM hierarchy WHERE LEVEL <= 2;
|
||||
DEBUG: predicate pruning for shardId 840005
|
||||
DEBUG: predicate pruning for shardId 840006
|
||||
DEBUG: predicate pruning for shardId 840007
|
||||
DEBUG: predicate pruning for shardId 840005
|
||||
DEBUG: predicate pruning for shardId 840006
|
||||
DEBUG: predicate pruning for shardId 840007
|
||||
DEBUG: Creating router plan
|
||||
DEBUG: Plan is router executable
|
||||
company_id | employee_id | manager_id | level
|
||||
|
@ -426,9 +404,6 @@ WITH RECURSIVE hierarchy as (
|
|||
ON (h.employee_id = ce.manager_id AND
|
||||
h.company_id = ce.company_id))
|
||||
SELECT * FROM hierarchy WHERE LEVEL <= 2;
|
||||
DEBUG: predicate pruning for shardId 840005
|
||||
DEBUG: predicate pruning for shardId 840006
|
||||
DEBUG: predicate pruning for shardId 840007
|
||||
ERROR: could not run distributed query with complex table expressions
|
||||
HINT: Consider using an equality filter on the distributed table's partition column.
|
||||
-- logically wrong query, query involves different shards
|
||||
|
@ -444,12 +419,6 @@ WITH RECURSIVE hierarchy as (
|
|||
h.company_id = ce.company_id AND
|
||||
ce.company_id = 2))
|
||||
SELECT * FROM hierarchy WHERE LEVEL <= 2;
|
||||
DEBUG: predicate pruning for shardId 840004
|
||||
DEBUG: predicate pruning for shardId 840006
|
||||
DEBUG: predicate pruning for shardId 840007
|
||||
DEBUG: predicate pruning for shardId 840004
|
||||
DEBUG: predicate pruning for shardId 840005
|
||||
DEBUG: predicate pruning for shardId 840006
|
||||
ERROR: could not run distributed query with complex table expressions
|
||||
HINT: Consider using an equality filter on the distributed table's partition column.
|
||||
-- CTE with queries other than SELECT is not supported
|
||||
|
@ -485,7 +454,6 @@ SELECT
|
|||
FROM articles_hash
|
||||
WHERE author_id = 1 or author_id = 3
|
||||
GROUP BY GROUPING SETS ((id),(subtitle));
|
||||
DEBUG: predicate pruning for shardId 840001
|
||||
DEBUG: Creating router plan
|
||||
DEBUG: Plan is router executable
|
||||
id | subtitle | count
|
||||
|
@ -520,7 +488,6 @@ ERROR: could not run distributed query with GROUPING SETS, CUBE, or ROLLUP
|
|||
HINT: Consider using an equality filter on the distributed table's partition column.
|
||||
-- queries which involve functions in FROM clause are supported if it goes to a single worker.
|
||||
SELECT * FROM articles_hash, position('om' in 'Thomas') WHERE author_id = 1;
|
||||
DEBUG: predicate pruning for shardId 840001
|
||||
DEBUG: Creating router plan
|
||||
DEBUG: Plan is router executable
|
||||
id | author_id | title | word_count | position
|
||||
|
@ -533,7 +500,6 @@ DEBUG: Plan is router executable
|
|||
(5 rows)
|
||||
|
||||
SELECT * FROM articles_hash, position('om' in 'Thomas') WHERE author_id = 1 or author_id = 3;
|
||||
DEBUG: predicate pruning for shardId 840001
|
||||
DEBUG: Creating router plan
|
||||
DEBUG: Plan is router executable
|
||||
id | author_id | title | word_count | position
|
||||
|
@ -567,8 +533,6 @@ HINT: Consider using an equality filter on the distributed table's partition co
|
|||
SELECT * FROM articles_hash
|
||||
WHERE author_id IN (SELECT author_id FROM articles_hash WHERE author_id = 2)
|
||||
ORDER BY articles_hash.id;
|
||||
DEBUG: predicate pruning for shardId 840000
|
||||
DEBUG: predicate pruning for shardId 840000
|
||||
DEBUG: Creating router plan
|
||||
DEBUG: Plan is router executable
|
||||
id | author_id | title | word_count
|
||||
|
@ -618,8 +582,6 @@ SELECT articles_hash.id,test.word_count
|
|||
FROM articles_hash, (SELECT id, word_count FROM articles_hash) AS test
|
||||
WHERE test.id = articles_hash.id and articles_hash.author_id = 1
|
||||
ORDER BY articles_hash.id;
|
||||
DEBUG: predicate pruning for shardId 840001
|
||||
DEBUG: predicate pruning for shardId 840001
|
||||
DEBUG: join prunable for task partitionId 0 and 1
|
||||
DEBUG: join prunable for task partitionId 0 and 2
|
||||
DEBUG: join prunable for task partitionId 0 and 3
|
||||
|
@ -659,7 +621,6 @@ HINT: Consider using an equality filter on the distributed table's partition co
|
|||
SELECT *
|
||||
FROM articles_hash
|
||||
WHERE author_id = 1;
|
||||
DEBUG: predicate pruning for shardId 840001
|
||||
DEBUG: Creating router plan
|
||||
DEBUG: Plan is router executable
|
||||
id | author_id | title | word_count
|
||||
|
@ -675,7 +636,6 @@ DEBUG: Plan is router executable
|
|||
SELECT *
|
||||
FROM articles_hash
|
||||
WHERE author_id = 1 OR author_id = 17;
|
||||
DEBUG: predicate pruning for shardId 840001
|
||||
DEBUG: Creating router plan
|
||||
DEBUG: Plan is router executable
|
||||
id | author_id | title | word_count
|
||||
|
@ -705,7 +665,6 @@ SELECT *
|
|||
SELECT id as article_id, word_count * id as random_value
|
||||
FROM articles_hash
|
||||
WHERE author_id = 1;
|
||||
DEBUG: predicate pruning for shardId 840001
|
||||
DEBUG: Creating router plan
|
||||
DEBUG: Plan is router executable
|
||||
article_id | random_value
|
||||
|
@ -722,8 +681,6 @@ SELECT a.author_id as first_author, b.word_count as second_word_count
|
|||
FROM articles_hash a, articles_hash b
|
||||
WHERE a.author_id = 10 and a.author_id = b.author_id
|
||||
LIMIT 3;
|
||||
DEBUG: predicate pruning for shardId 840001
|
||||
DEBUG: predicate pruning for shardId 840001
|
||||
DEBUG: Creating router plan
|
||||
DEBUG: Plan is router executable
|
||||
first_author | second_word_count
|
||||
|
@ -739,7 +696,6 @@ SELECT a.author_id as first_author, b.word_count as second_word_count
|
|||
FROM articles_hash a, articles_single_shard_hash b
|
||||
WHERE a.author_id = 10 and a.author_id = b.author_id
|
||||
LIMIT 3;
|
||||
DEBUG: predicate pruning for shardId 840001
|
||||
DEBUG: Creating router plan
|
||||
DEBUG: Plan is router executable
|
||||
first_author | second_word_count
|
||||
|
@ -758,7 +714,6 @@ SELECT a.author_id as first_author, b.word_count as second_word_count
|
|||
FROM articles_hash a, single_shard b
|
||||
WHERE a.author_id = 2 and a.author_id = b.author_id
|
||||
LIMIT 3;
|
||||
DEBUG: predicate pruning for shardId 840000
|
||||
DEBUG: Found no worker with all shard placements
|
||||
ERROR: could not run distributed query with complex table expressions
|
||||
HINT: Consider using an equality filter on the distributed table's partition column.
|
||||
|
@ -767,7 +722,6 @@ SELECT *
|
|||
FROM articles_hash
|
||||
WHERE author_id = 1
|
||||
LIMIT 3;
|
||||
DEBUG: predicate pruning for shardId 840001
|
||||
DEBUG: Creating router plan
|
||||
DEBUG: Plan is router executable
|
||||
id | author_id | title | word_count
|
||||
|
@ -783,7 +737,6 @@ SELECT *
|
|||
WHERE author_id = 1
|
||||
LIMIT 2
|
||||
OFFSET 1;
|
||||
DEBUG: predicate pruning for shardId 840001
|
||||
DEBUG: Creating router plan
|
||||
DEBUG: Plan is router executable
|
||||
id | author_id | title | word_count
|
||||
|
@ -799,7 +752,6 @@ SELECT *
|
|||
ORDER BY id desc
|
||||
LIMIT 2
|
||||
OFFSET 1;
|
||||
DEBUG: predicate pruning for shardId 840001
|
||||
DEBUG: Creating router plan
|
||||
DEBUG: Plan is router executable
|
||||
id | author_id | title | word_count
|
||||
|
@ -815,7 +767,6 @@ SELECT id
|
|||
WHERE author_id = 1
|
||||
GROUP BY id
|
||||
ORDER BY id;
|
||||
DEBUG: predicate pruning for shardId 840001
|
||||
DEBUG: Creating router plan
|
||||
DEBUG: Plan is router executable
|
||||
id
|
||||
|
@ -832,7 +783,6 @@ SELECT DISTINCT id
|
|||
FROM articles_hash
|
||||
WHERE author_id = 1
|
||||
ORDER BY id;
|
||||
DEBUG: predicate pruning for shardId 840001
|
||||
DEBUG: Creating router plan
|
||||
DEBUG: Plan is router executable
|
||||
id
|
||||
|
@ -848,7 +798,6 @@ DEBUG: Plan is router executable
|
|||
SELECT avg(word_count)
|
||||
FROM articles_hash
|
||||
WHERE author_id = 2;
|
||||
DEBUG: predicate pruning for shardId 840000
|
||||
DEBUG: Creating router plan
|
||||
DEBUG: Plan is router executable
|
||||
avg
|
||||
|
@ -861,7 +810,6 @@ SELECT max(word_count) as max, min(word_count) as min,
|
|||
sum(word_count) as sum, count(word_count) as cnt
|
||||
FROM articles_hash
|
||||
WHERE author_id = 2;
|
||||
DEBUG: predicate pruning for shardId 840000
|
||||
DEBUG: Creating router plan
|
||||
DEBUG: Plan is router executable
|
||||
max | min | sum | cnt
|
||||
|
@ -874,7 +822,6 @@ SELECT max(word_count)
|
|||
FROM articles_hash
|
||||
WHERE author_id = 1
|
||||
GROUP BY author_id;
|
||||
DEBUG: predicate pruning for shardId 840001
|
||||
DEBUG: Creating router plan
|
||||
DEBUG: Plan is router executable
|
||||
max
|
||||
|
@ -887,8 +834,6 @@ DEBUG: Plan is router executable
|
|||
(SELECT * FROM articles_hash WHERE author_id = 1)
|
||||
UNION
|
||||
(SELECT * FROM articles_hash WHERE author_id = 3);
|
||||
DEBUG: predicate pruning for shardId 840001
|
||||
DEBUG: predicate pruning for shardId 840001
|
||||
DEBUG: Creating router plan
|
||||
DEBUG: Plan is router executable
|
||||
id | author_id | title | word_count
|
||||
|
@ -909,8 +854,6 @@ SELECT * FROM (
|
|||
(SELECT * FROM articles_hash WHERE author_id = 1)
|
||||
UNION
|
||||
(SELECT * FROM articles_hash WHERE author_id = 3)) uu;
|
||||
DEBUG: predicate pruning for shardId 840001
|
||||
DEBUG: predicate pruning for shardId 840001
|
||||
DEBUG: Creating router plan
|
||||
DEBUG: Plan is router executable
|
||||
id | author_id | title | word_count
|
||||
|
@ -930,8 +873,6 @@ DEBUG: Plan is router executable
|
|||
(SELECT LEFT(title, 1) FROM articles_hash WHERE author_id = 1)
|
||||
UNION
|
||||
(SELECT LEFT(title, 1) FROM articles_hash WHERE author_id = 3);
|
||||
DEBUG: predicate pruning for shardId 840001
|
||||
DEBUG: predicate pruning for shardId 840001
|
||||
DEBUG: Creating router plan
|
||||
DEBUG: Plan is router executable
|
||||
left
|
||||
|
@ -942,8 +883,6 @@ DEBUG: Plan is router executable
|
|||
(SELECT LEFT(title, 1) FROM articles_hash WHERE author_id = 1)
|
||||
INTERSECT
|
||||
(SELECT LEFT(title, 1) FROM articles_hash WHERE author_id = 3);
|
||||
DEBUG: predicate pruning for shardId 840001
|
||||
DEBUG: predicate pruning for shardId 840001
|
||||
DEBUG: Creating router plan
|
||||
DEBUG: Plan is router executable
|
||||
left
|
||||
|
@ -954,8 +893,6 @@ DEBUG: Plan is router executable
|
|||
(SELECT LEFT(title, 2) FROM articles_hash WHERE author_id = 1)
|
||||
EXCEPT
|
||||
(SELECT LEFT(title, 2) FROM articles_hash WHERE author_id = 3);
|
||||
DEBUG: predicate pruning for shardId 840001
|
||||
DEBUG: predicate pruning for shardId 840001
|
||||
DEBUG: Creating router plan
|
||||
DEBUG: Plan is router executable
|
||||
left
|
||||
|
@ -1019,7 +956,6 @@ SET client_min_messages to 'DEBUG2';
|
|||
SELECT *
|
||||
FROM articles_hash
|
||||
WHERE author_id = 1 and author_id >= 1;
|
||||
DEBUG: predicate pruning for shardId 840001
|
||||
DEBUG: Creating router plan
|
||||
DEBUG: Plan is router executable
|
||||
id | author_id | title | word_count
|
||||
|
@ -1049,7 +985,6 @@ SELECT *
|
|||
SELECT *
|
||||
FROM articles_hash
|
||||
WHERE author_id = 1 and (id = 1 or id = 41);
|
||||
DEBUG: predicate pruning for shardId 840001
|
||||
DEBUG: Creating router plan
|
||||
DEBUG: Plan is router executable
|
||||
id | author_id | title | word_count
|
||||
|
@ -1062,7 +997,6 @@ DEBUG: Plan is router executable
|
|||
SELECT *
|
||||
FROM articles_hash
|
||||
WHERE author_id = 1 and (id = random()::int * 0);
|
||||
DEBUG: predicate pruning for shardId 840001
|
||||
DEBUG: Creating router plan
|
||||
DEBUG: Plan is router executable
|
||||
id | author_id | title | word_count
|
||||
|
@ -1100,7 +1034,6 @@ SELECT *
|
|||
SELECT *
|
||||
FROM articles_hash
|
||||
WHERE author_id = abs(-1);
|
||||
DEBUG: predicate pruning for shardId 840001
|
||||
DEBUG: Creating router plan
|
||||
DEBUG: Plan is router executable
|
||||
id | author_id | title | word_count
|
||||
|
@ -1142,7 +1075,6 @@ SELECT *
|
|||
SELECT *
|
||||
FROM articles_hash
|
||||
WHERE author_id = 1 and (id = abs(id - 2));
|
||||
DEBUG: predicate pruning for shardId 840001
|
||||
DEBUG: Creating router plan
|
||||
DEBUG: Plan is router executable
|
||||
id | author_id | title | word_count
|
||||
|
@ -1167,7 +1099,6 @@ SELECT *
|
|||
SELECT *
|
||||
FROM articles_hash
|
||||
WHERE (author_id = 1) = true;
|
||||
DEBUG: predicate pruning for shardId 840001
|
||||
DEBUG: Creating router plan
|
||||
DEBUG: Plan is router executable
|
||||
id | author_id | title | word_count
|
||||
|
@ -1183,7 +1114,6 @@ DEBUG: Plan is router executable
|
|||
SELECT *
|
||||
FROM articles_hash
|
||||
WHERE (author_id = 1) and id between 0 and 20;
|
||||
DEBUG: predicate pruning for shardId 840001
|
||||
DEBUG: Creating router plan
|
||||
DEBUG: Plan is router executable
|
||||
id | author_id | title | word_count
|
||||
|
@ -1196,7 +1126,6 @@ DEBUG: Plan is router executable
|
|||
SELECT *
|
||||
FROM articles_hash
|
||||
WHERE (author_id = 1) and (id = 1 or id = 31) and title like '%s';
|
||||
DEBUG: predicate pruning for shardId 840001
|
||||
DEBUG: Creating router plan
|
||||
DEBUG: Plan is router executable
|
||||
id | author_id | title | word_count
|
||||
|
@ -1209,7 +1138,6 @@ DEBUG: Plan is router executable
|
|||
SELECT *
|
||||
FROM articles_hash
|
||||
WHERE (id = 1 or id = 31) and title like '%s' and (author_id = 1);
|
||||
DEBUG: predicate pruning for shardId 840001
|
||||
DEBUG: Creating router plan
|
||||
DEBUG: Plan is router executable
|
||||
id | author_id | title | word_count
|
||||
|
@ -1222,7 +1150,6 @@ DEBUG: Plan is router executable
|
|||
SELECT *
|
||||
FROM articles_hash
|
||||
WHERE (title like '%s' or title like 'a%') and (author_id = 1);
|
||||
DEBUG: predicate pruning for shardId 840001
|
||||
DEBUG: Creating router plan
|
||||
DEBUG: Plan is router executable
|
||||
id | author_id | title | word_count
|
||||
|
@ -1238,7 +1165,6 @@ DEBUG: Plan is router executable
|
|||
SELECT *
|
||||
FROM articles_hash
|
||||
WHERE (title like '%s' or title like 'a%') and (author_id = 1) and (word_count < 3000 or word_count > 8000);
|
||||
DEBUG: predicate pruning for shardId 840001
|
||||
DEBUG: Creating router plan
|
||||
DEBUG: Plan is router executable
|
||||
id | author_id | title | word_count
|
||||
|
@ -1252,7 +1178,6 @@ DEBUG: Plan is router executable
|
|||
SELECT LAG(title, 1) over (ORDER BY word_count) prev, title, word_count
|
||||
FROM articles_hash
|
||||
WHERE author_id = 5;
|
||||
DEBUG: predicate pruning for shardId 840001
|
||||
DEBUG: Creating router plan
|
||||
DEBUG: Plan is router executable
|
||||
prev | title | word_count
|
||||
|
@ -1268,7 +1193,6 @@ SELECT LAG(title, 1) over (ORDER BY word_count) prev, title, word_count
|
|||
FROM articles_hash
|
||||
WHERE author_id = 5
|
||||
ORDER BY word_count DESC;
|
||||
DEBUG: predicate pruning for shardId 840001
|
||||
DEBUG: Creating router plan
|
||||
DEBUG: Plan is router executable
|
||||
prev | title | word_count
|
||||
|
@ -1283,7 +1207,6 @@ DEBUG: Plan is router executable
|
|||
SELECT id, MIN(id) over (order by word_count)
|
||||
FROM articles_hash
|
||||
WHERE author_id = 1;
|
||||
DEBUG: predicate pruning for shardId 840001
|
||||
DEBUG: Creating router plan
|
||||
DEBUG: Plan is router executable
|
||||
id | min
|
||||
|
@ -1298,7 +1221,6 @@ DEBUG: Plan is router executable
|
|||
SELECT id, word_count, AVG(word_count) over (order by word_count)
|
||||
FROM articles_hash
|
||||
WHERE author_id = 1;
|
||||
DEBUG: predicate pruning for shardId 840001
|
||||
DEBUG: Creating router plan
|
||||
DEBUG: Plan is router executable
|
||||
id | word_count | avg
|
||||
|
@ -1313,7 +1235,6 @@ DEBUG: Plan is router executable
|
|||
SELECT word_count, rank() OVER (PARTITION BY author_id ORDER BY word_count)
|
||||
FROM articles_hash
|
||||
WHERE author_id = 1;
|
||||
DEBUG: predicate pruning for shardId 840001
|
||||
DEBUG: Creating router plan
|
||||
DEBUG: Plan is router executable
|
||||
word_count | rank
|
||||
|
@ -1404,7 +1325,6 @@ DEBUG: Plan is router executable
|
|||
SELECT a.author_id as first_author, b.word_count as second_word_count
|
||||
FROM articles_hash a, articles_single_shard_hash b
|
||||
WHERE a.author_id = 10 and a.author_id = b.author_id and int4eq(1, 1);
|
||||
DEBUG: predicate pruning for shardId 840001
|
||||
DEBUG: Creating router plan
|
||||
DEBUG: Plan is router executable
|
||||
first_author | second_word_count
|
||||
|
@ -1471,7 +1391,6 @@ DEBUG: Plan is router executable
|
|||
(SELECT * FROM articles_hash WHERE author_id = 1)
|
||||
UNION
|
||||
(SELECT * FROM articles_hash WHERE author_id = 2 and 1=0);
|
||||
DEBUG: predicate pruning for shardId 840001
|
||||
DEBUG: Creating router plan
|
||||
DEBUG: Plan is router executable
|
||||
id | author_id | title | word_count
|
||||
|
@ -1486,7 +1405,6 @@ DEBUG: Plan is router executable
|
|||
(SELECT * FROM articles_hash WHERE author_id = 1)
|
||||
EXCEPT
|
||||
(SELECT * FROM articles_hash WHERE author_id = 2 and 1=0);
|
||||
DEBUG: predicate pruning for shardId 840001
|
||||
DEBUG: Creating router plan
|
||||
DEBUG: Plan is router executable
|
||||
id | author_id | title | word_count
|
||||
|
@ -1501,7 +1419,6 @@ DEBUG: Plan is router executable
|
|||
(SELECT * FROM articles_hash WHERE author_id = 1)
|
||||
INTERSECT
|
||||
(SELECT * FROM articles_hash WHERE author_id = 2 and 1=0);
|
||||
DEBUG: predicate pruning for shardId 840001
|
||||
DEBUG: Creating router plan
|
||||
DEBUG: Plan is router executable
|
||||
id | author_id | title | word_count
|
||||
|
@ -1512,7 +1429,6 @@ DEBUG: Plan is router executable
|
|||
WITH id_author AS ( SELECT id, author_id FROM articles_hash WHERE author_id = 1),
|
||||
id_title AS (SELECT id, title from articles_hash WHERE author_id = 1 and 1=0)
|
||||
SELECT * FROM id_author, id_title WHERE id_author.id = id_title.id;
|
||||
DEBUG: predicate pruning for shardId 840001
|
||||
DEBUG: Creating router plan
|
||||
DEBUG: Plan is router executable
|
||||
id | author_id | id | title
|
||||
|
@ -1522,8 +1438,6 @@ DEBUG: Plan is router executable
|
|||
WITH id_author AS ( SELECT id, author_id FROM articles_hash WHERE author_id = 1),
|
||||
id_title AS (SELECT id, title from articles_hash WHERE author_id = 1)
|
||||
SELECT * FROM id_author, id_title WHERE id_author.id = id_title.id and 1=0;
|
||||
DEBUG: predicate pruning for shardId 840001
|
||||
DEBUG: predicate pruning for shardId 840001
|
||||
DEBUG: Creating router plan
|
||||
DEBUG: Plan is router executable
|
||||
id | author_id | id | title
|
||||
|
@ -1541,12 +1455,6 @@ WITH RECURSIVE hierarchy as (
|
|||
h.company_id = ce.company_id AND
|
||||
ce.company_id = 1))
|
||||
SELECT * FROM hierarchy WHERE LEVEL <= 2 and 1=0;
|
||||
DEBUG: predicate pruning for shardId 840005
|
||||
DEBUG: predicate pruning for shardId 840006
|
||||
DEBUG: predicate pruning for shardId 840007
|
||||
DEBUG: predicate pruning for shardId 840005
|
||||
DEBUG: predicate pruning for shardId 840006
|
||||
DEBUG: predicate pruning for shardId 840007
|
||||
DEBUG: Creating router plan
|
||||
DEBUG: Plan is router executable
|
||||
company_id | employee_id | manager_id | level
|
||||
|
@ -1564,9 +1472,6 @@ WITH RECURSIVE hierarchy as (
|
|||
h.company_id = ce.company_id AND
|
||||
ce.company_id = 1 AND 1=0))
|
||||
SELECT * FROM hierarchy WHERE LEVEL <= 2;
|
||||
DEBUG: predicate pruning for shardId 840005
|
||||
DEBUG: predicate pruning for shardId 840006
|
||||
DEBUG: predicate pruning for shardId 840007
|
||||
DEBUG: Creating router plan
|
||||
DEBUG: Plan is router executable
|
||||
company_id | employee_id | manager_id | level
|
||||
|
@ -1585,9 +1490,6 @@ WITH RECURSIVE hierarchy as (
|
|||
h.company_id = ce.company_id AND
|
||||
ce.company_id = 1))
|
||||
SELECT * FROM hierarchy WHERE LEVEL <= 2;
|
||||
DEBUG: predicate pruning for shardId 840005
|
||||
DEBUG: predicate pruning for shardId 840006
|
||||
DEBUG: predicate pruning for shardId 840007
|
||||
DEBUG: Creating router plan
|
||||
DEBUG: Plan is router executable
|
||||
company_id | employee_id | manager_id | level
|
||||
|
@ -1665,9 +1567,6 @@ SELECT master_create_empty_shard('articles_range') as shard_id \gset
|
|||
UPDATE pg_dist_shard SET shardminvalue = 31, shardmaxvalue=40 WHERE shardid = :shard_id;
|
||||
-- single shard select queries are router plannable
|
||||
SELECT * FROM articles_range where author_id = 1;
|
||||
DEBUG: predicate pruning for shardId 840013
|
||||
DEBUG: predicate pruning for shardId 840014
|
||||
DEBUG: predicate pruning for shardId 840015
|
||||
DEBUG: Creating router plan
|
||||
DEBUG: Plan is router executable
|
||||
id | author_id | title | word_count
|
||||
|
@ -1675,9 +1574,6 @@ DEBUG: Plan is router executable
|
|||
(0 rows)
|
||||
|
||||
SELECT * FROM articles_range where author_id = 1 or author_id = 5;
|
||||
DEBUG: predicate pruning for shardId 840013
|
||||
DEBUG: predicate pruning for shardId 840014
|
||||
DEBUG: predicate pruning for shardId 840015
|
||||
DEBUG: Creating router plan
|
||||
DEBUG: Plan is router executable
|
||||
id | author_id | title | word_count
|
||||
|
@ -1695,12 +1591,6 @@ DEBUG: Plan is router executable
|
|||
-- single shard joins on range partitioned table are router plannable
|
||||
SELECT * FROM articles_range ar join authors_range au on (ar.author_id = au.id)
|
||||
WHERE ar.author_id = 1;
|
||||
DEBUG: predicate pruning for shardId 840013
|
||||
DEBUG: predicate pruning for shardId 840014
|
||||
DEBUG: predicate pruning for shardId 840015
|
||||
DEBUG: predicate pruning for shardId 840009
|
||||
DEBUG: predicate pruning for shardId 840010
|
||||
DEBUG: predicate pruning for shardId 840011
|
||||
DEBUG: Creating router plan
|
||||
DEBUG: Plan is router executable
|
||||
id | author_id | title | word_count | name | id
|
||||
|
@ -1719,10 +1609,6 @@ DEBUG: Plan is router executable
|
|||
-- multi-shard join is not router plannable
|
||||
SELECT * FROM articles_range ar join authors_range au on (ar.author_id = au.id)
|
||||
WHERE ar.author_id = 35;
|
||||
DEBUG: predicate pruning for shardId 840012
|
||||
DEBUG: predicate pruning for shardId 840013
|
||||
DEBUG: predicate pruning for shardId 840012
|
||||
DEBUG: predicate pruning for shardId 840013
|
||||
DEBUG: join prunable for intervals [21,40] and [1,10]
|
||||
DEBUG: join prunable for intervals [31,40] and [1,10]
|
||||
DEBUG: join prunable for intervals [31,40] and [11,30]
|
||||
|
@ -1748,12 +1634,6 @@ DEBUG: join prunable for intervals [31,40] and [11,30]
|
|||
-- bogus query, join on non-partition column, but router plannable due to filters
|
||||
SELECT * FROM articles_range ar join authors_range au on (ar.id = au.id)
|
||||
WHERE ar.author_id = 1 and au.id < 10;
|
||||
DEBUG: predicate pruning for shardId 840013
|
||||
DEBUG: predicate pruning for shardId 840014
|
||||
DEBUG: predicate pruning for shardId 840015
|
||||
DEBUG: predicate pruning for shardId 840009
|
||||
DEBUG: predicate pruning for shardId 840010
|
||||
DEBUG: predicate pruning for shardId 840011
|
||||
DEBUG: Creating router plan
|
||||
DEBUG: Plan is router executable
|
||||
id | author_id | title | word_count | name | id
|
||||
|
@ -1766,10 +1646,6 @@ DEBUG: Plan is router executable
|
|||
-- router plannable
|
||||
SELECT * FROM articles_hash ar join authors_range au on (ar.author_id = au.id)
|
||||
WHERE ar.author_id = 2;
|
||||
DEBUG: predicate pruning for shardId 840000
|
||||
DEBUG: predicate pruning for shardId 840009
|
||||
DEBUG: predicate pruning for shardId 840010
|
||||
DEBUG: predicate pruning for shardId 840011
|
||||
DEBUG: Creating router plan
|
||||
DEBUG: Plan is router executable
|
||||
id | author_id | title | word_count | name | id
|
||||
|
@ -1779,12 +1655,7 @@ DEBUG: Plan is router executable
|
|||
-- not router plannable
|
||||
SELECT * FROM articles_hash ar join authors_range au on (ar.author_id = au.id)
|
||||
WHERE ar.author_id = 3;
|
||||
DEBUG: predicate pruning for shardId 840001
|
||||
DEBUG: predicate pruning for shardId 840009
|
||||
DEBUG: predicate pruning for shardId 840010
|
||||
DEBUG: predicate pruning for shardId 840011
|
||||
DEBUG: Found no worker with all shard placements
|
||||
DEBUG: predicate pruning for shardId 840001
|
||||
DEBUG: join prunable for intervals [1,10] and [11,30]
|
||||
DEBUG: join prunable for intervals [1,10] and [21,40]
|
||||
DEBUG: join prunable for intervals [1,10] and [31,40]
|
||||
|
@ -1814,9 +1685,6 @@ HINT: Set citus.task_executor_type to "task-tracker".
|
|||
-- join between a range partitioned table and reference table is router plannable
|
||||
SELECT * FROM articles_range ar join authors_reference au on (ar.author_id = au.id)
|
||||
WHERE ar.author_id = 1;
|
||||
DEBUG: predicate pruning for shardId 840013
|
||||
DEBUG: predicate pruning for shardId 840014
|
||||
DEBUG: predicate pruning for shardId 840015
|
||||
DEBUG: Creating router plan
|
||||
DEBUG: Plan is router executable
|
||||
id | author_id | title | word_count | name | id
|
||||
|
@ -1826,9 +1694,6 @@ DEBUG: Plan is router executable
|
|||
-- still hits a single shard and router plannable
|
||||
SELECT * FROM articles_range ar join authors_reference au on (ar.author_id = au.id)
|
||||
WHERE ar.author_id = 1 or ar.author_id = 5;
|
||||
DEBUG: predicate pruning for shardId 840013
|
||||
DEBUG: predicate pruning for shardId 840014
|
||||
DEBUG: predicate pruning for shardId 840015
|
||||
DEBUG: Creating router plan
|
||||
DEBUG: Plan is router executable
|
||||
id | author_id | title | word_count | name | id
|
||||
|
@ -1838,10 +1703,6 @@ DEBUG: Plan is router executable
|
|||
-- it is not router plannable if hit multiple shards
|
||||
SELECT * FROM articles_range ar join authors_reference au on (ar.author_id = au.id)
|
||||
WHERE ar.author_id = 1 or ar.author_id = 15;
|
||||
DEBUG: predicate pruning for shardId 840014
|
||||
DEBUG: predicate pruning for shardId 840015
|
||||
DEBUG: predicate pruning for shardId 840014
|
||||
DEBUG: predicate pruning for shardId 840015
|
||||
id | author_id | title | word_count | name | id
|
||||
----+-----------+-------+------------+------+----
|
||||
(0 rows)
|
||||
|
@ -1907,7 +1768,6 @@ SELECT author_id FROM articles_hash
|
|||
ORDER BY
|
||||
author_id
|
||||
LIMIT 1;
|
||||
DEBUG: predicate pruning for shardId 840001
|
||||
DEBUG: Creating router plan
|
||||
DEBUG: Plan is router executable
|
||||
WARNING: relation "public.articles_hash" does not exist
|
||||
|
@ -1945,7 +1805,6 @@ SELECT * FROM articles_hash
|
|||
ORDER BY
|
||||
author_id, id
|
||||
LIMIT 5;
|
||||
DEBUG: predicate pruning for shardId 840001
|
||||
DEBUG: Creating router plan
|
||||
DEBUG: Plan is router executable
|
||||
WARNING: relation "public.articles_hash" does not exist
|
||||
|
@ -1969,7 +1828,6 @@ SELECT
|
|||
articles_hash
|
||||
WHERE
|
||||
author_id = 5;
|
||||
DEBUG: predicate pruning for shardId 840001
|
||||
DEBUG: Creating router plan
|
||||
DEBUG: Plan is router executable
|
||||
c
|
||||
|
@ -2011,7 +1869,6 @@ SELECT *
|
|||
FROM articles_hash
|
||||
WHERE author_id = 1
|
||||
ORDER BY id;
|
||||
DEBUG: predicate pruning for shardId 840001
|
||||
DEBUG: Creating router plan
|
||||
DEBUG: Plan is router executable
|
||||
id | author_id | title | word_count
|
||||
|
@ -2031,7 +1888,6 @@ SELECT *
|
|||
FROM articles_hash
|
||||
WHERE author_id = 1
|
||||
ORDER BY id;
|
||||
DEBUG: predicate pruning for shardId 840001
|
||||
DEBUG: Creating router plan
|
||||
DEBUG: Plan is router executable
|
||||
id | author_id | title | word_count
|
||||
|
@ -2051,7 +1907,6 @@ DECLARE test_cursor CURSOR FOR
|
|||
FROM articles_hash
|
||||
WHERE author_id = 1
|
||||
ORDER BY id;
|
||||
DEBUG: predicate pruning for shardId 840001
|
||||
DEBUG: Creating router plan
|
||||
DEBUG: Plan is router executable
|
||||
FETCH test_cursor;
|
||||
|
@ -2087,7 +1942,6 @@ COPY (
|
|||
FROM articles_hash
|
||||
WHERE author_id = 1
|
||||
ORDER BY id) TO STDOUT;
|
||||
DEBUG: predicate pruning for shardId 840001
|
||||
DEBUG: Creating router plan
|
||||
DEBUG: Plan is router executable
|
||||
1 1 arsenous 9572
|
||||
|
@ -2102,14 +1956,12 @@ CREATE TEMP TABLE temp_articles_hash as
|
|||
FROM articles_hash
|
||||
WHERE author_id = 1
|
||||
ORDER BY id;
|
||||
DEBUG: predicate pruning for shardId 840001
|
||||
DEBUG: Creating router plan
|
||||
DEBUG: Plan is router executable
|
||||
-- router plannable queries may include filter for aggragates
|
||||
SELECT count(*), count(*) FILTER (WHERE id < 3)
|
||||
FROM articles_hash
|
||||
WHERE author_id = 1;
|
||||
DEBUG: predicate pruning for shardId 840001
|
||||
DEBUG: Creating router plan
|
||||
DEBUG: Plan is router executable
|
||||
count | count
|
||||
|
@ -2132,7 +1984,6 @@ PREPARE author_1_articles as
|
|||
FROM articles_hash
|
||||
WHERE author_id = 1;
|
||||
EXECUTE author_1_articles;
|
||||
DEBUG: predicate pruning for shardId 840001
|
||||
DEBUG: Creating router plan
|
||||
DEBUG: Plan is router executable
|
||||
id | author_id | title | word_count
|
||||
|
@ -2150,7 +2001,6 @@ PREPARE author_articles(int) as
|
|||
FROM articles_hash
|
||||
WHERE author_id = $1;
|
||||
EXECUTE author_articles(1);
|
||||
DEBUG: predicate pruning for shardId 840001
|
||||
DEBUG: Creating router plan
|
||||
DEBUG: Plan is router executable
|
||||
id | author_id | title | word_count
|
||||
|
@ -2174,18 +2024,6 @@ BEGIN
|
|||
END;
|
||||
$$ LANGUAGE plpgsql;
|
||||
SELECT author_articles_max_id();
|
||||
DEBUG: predicate pruning for shardId 840001
|
||||
CONTEXT: SQL statement "SELECT MAX(id) FROM articles_hash ah
|
||||
WHERE author_id = 1"
|
||||
PL/pgSQL function author_articles_max_id() line 5 at SQL statement
|
||||
DEBUG: predicate pruning for shardId 840001
|
||||
CONTEXT: SQL statement "SELECT MAX(id) FROM articles_hash ah
|
||||
WHERE author_id = 1"
|
||||
PL/pgSQL function author_articles_max_id() line 5 at SQL statement
|
||||
DEBUG: predicate pruning for shardId 840001
|
||||
CONTEXT: SQL statement "SELECT MAX(id) FROM articles_hash ah
|
||||
WHERE author_id = 1"
|
||||
PL/pgSQL function author_articles_max_id() line 5 at SQL statement
|
||||
DEBUG: Creating router plan
|
||||
CONTEXT: SQL statement "SELECT MAX(id) FROM articles_hash ah
|
||||
WHERE author_id = 1"
|
||||
|
@ -2211,11 +2049,6 @@ BEGIN
|
|||
END;
|
||||
$$ LANGUAGE plpgsql;
|
||||
SELECT * FROM author_articles_id_word_count();
|
||||
DEBUG: predicate pruning for shardId 840001
|
||||
CONTEXT: SQL statement "SELECT ah.id, ah.word_count
|
||||
FROM articles_hash ah
|
||||
WHERE author_id = 1"
|
||||
PL/pgSQL function author_articles_id_word_count() line 4 at RETURN QUERY
|
||||
DEBUG: Creating router plan
|
||||
CONTEXT: SQL statement "SELECT ah.id, ah.word_count
|
||||
FROM articles_hash ah
|
||||
|
@ -2238,7 +2071,6 @@ PL/pgSQL function author_articles_id_word_count() line 4 at RETURN QUERY
|
|||
-- materialized views can be created for router plannable queries
|
||||
CREATE MATERIALIZED VIEW mv_articles_hash_empty AS
|
||||
SELECT * FROM articles_hash WHERE author_id = 1;
|
||||
DEBUG: predicate pruning for shardId 840001
|
||||
DEBUG: Creating router plan
|
||||
DEBUG: Plan is router executable
|
||||
SELECT * FROM mv_articles_hash_empty;
|
||||
|
@ -2277,7 +2109,6 @@ SET citus.task_executor_type to 'task-tracker';
|
|||
SELECT id
|
||||
FROM articles_hash
|
||||
WHERE author_id = 1;
|
||||
DEBUG: predicate pruning for shardId 840001
|
||||
DEBUG: Creating router plan
|
||||
DEBUG: Plan is router executable
|
||||
id
|
||||
|
@ -2297,7 +2128,6 @@ DEBUG: Plan is router executable
|
|||
SELECT id
|
||||
FROM articles_hash
|
||||
WHERE author_id = 1;
|
||||
DEBUG: predicate pruning for shardId 840001
|
||||
DEBUG: Creating router plan
|
||||
DEBUG: Plan is router executable
|
||||
id
|
||||
|
|
|
@ -129,9 +129,6 @@ SELECT count(*) FROM multi_shard_modify_test;
|
|||
-- Check that shard pruning works
|
||||
SET client_min_messages TO DEBUG2;
|
||||
SELECT master_modify_multiple_shards('DELETE FROM multi_shard_modify_test WHERE t_key = 15');
|
||||
DEBUG: predicate pruning for shardId 350001
|
||||
DEBUG: predicate pruning for shardId 350002
|
||||
DEBUG: predicate pruning for shardId 350003
|
||||
master_modify_multiple_shards
|
||||
-------------------------------
|
||||
1
|
||||
|
|
|
@ -385,7 +385,6 @@ SET citus.task_executor_type TO 'real-time';
|
|||
SELECT *
|
||||
FROM articles
|
||||
WHERE author_id = 1;
|
||||
DEBUG: predicate pruning for shardId 850001
|
||||
DEBUG: Creating router plan
|
||||
DEBUG: Plan is router executable
|
||||
id | author_id | title | word_count
|
||||
|
@ -401,7 +400,6 @@ DEBUG: Plan is router executable
|
|||
SELECT *
|
||||
FROM articles
|
||||
WHERE author_id = 1 OR author_id = 17;
|
||||
DEBUG: predicate pruning for shardId 850001
|
||||
DEBUG: Creating router plan
|
||||
DEBUG: Plan is router executable
|
||||
id | author_id | title | word_count
|
||||
|
@ -430,7 +428,6 @@ SELECT *
|
|||
SELECT id as article_id, word_count * id as random_value
|
||||
FROM articles
|
||||
WHERE author_id = 1;
|
||||
DEBUG: predicate pruning for shardId 850001
|
||||
DEBUG: Creating router plan
|
||||
DEBUG: Plan is router executable
|
||||
article_id | random_value
|
||||
|
@ -448,8 +445,6 @@ SELECT a.author_id as first_author, b.word_count as second_word_count
|
|||
FROM articles a, articles b
|
||||
WHERE a.author_id = 10 and a.author_id = b.author_id
|
||||
LIMIT 3;
|
||||
DEBUG: predicate pruning for shardId 850001
|
||||
DEBUG: predicate pruning for shardId 850001
|
||||
DEBUG: Creating router plan
|
||||
DEBUG: Plan is router executable
|
||||
first_author | second_word_count
|
||||
|
@ -465,7 +460,6 @@ SELECT a.author_id as first_author, b.word_count as second_word_count
|
|||
FROM articles a, articles_single_shard b
|
||||
WHERE a.author_id = 10 and a.author_id = b.author_id
|
||||
LIMIT 3;
|
||||
DEBUG: predicate pruning for shardId 850001
|
||||
DEBUG: Creating router plan
|
||||
DEBUG: Plan is router executable
|
||||
first_author | second_word_count
|
||||
|
@ -480,7 +474,6 @@ SELECT *
|
|||
FROM articles
|
||||
WHERE author_id = 1
|
||||
LIMIT 2;
|
||||
DEBUG: predicate pruning for shardId 850001
|
||||
DEBUG: Creating router plan
|
||||
DEBUG: Plan is router executable
|
||||
id | author_id | title | word_count
|
||||
|
@ -497,7 +490,6 @@ SELECT id
|
|||
WHERE author_id = 1
|
||||
GROUP BY id
|
||||
ORDER BY id;
|
||||
DEBUG: predicate pruning for shardId 850001
|
||||
DEBUG: Creating router plan
|
||||
DEBUG: Plan is router executable
|
||||
id
|
||||
|
@ -518,7 +510,6 @@ DEBUG: Plan is router executable
|
|||
SELECT avg(word_count)
|
||||
FROM articles
|
||||
WHERE author_id = 2;
|
||||
DEBUG: predicate pruning for shardId 850000
|
||||
DEBUG: Creating router plan
|
||||
DEBUG: Plan is router executable
|
||||
avg
|
||||
|
@ -532,7 +523,6 @@ SELECT max(word_count) as max, min(word_count) as min,
|
|||
sum(word_count) as sum, count(word_count) as cnt
|
||||
FROM articles
|
||||
WHERE author_id = 2;
|
||||
DEBUG: predicate pruning for shardId 850000
|
||||
DEBUG: Creating router plan
|
||||
DEBUG: Plan is router executable
|
||||
max | min | sum | cnt
|
||||
|
@ -544,8 +534,6 @@ DEBUG: Plan is router executable
|
|||
SELECT *
|
||||
FROM articles a, articles b
|
||||
WHERE a.id = b.id AND a.author_id = 1;
|
||||
DEBUG: predicate pruning for shardId 850001
|
||||
DEBUG: predicate pruning for shardId 850001
|
||||
DEBUG: join prunable for task partitionId 0 and 1
|
||||
DEBUG: join prunable for task partitionId 0 and 2
|
||||
DEBUG: join prunable for task partitionId 0 and 3
|
||||
|
|
|
@ -376,9 +376,6 @@ SET client_min_messages TO DEBUG2;
|
|||
SELECT * FROM
|
||||
(SELECT count(*) FROM subquery_pruning_varchar_test_table WHERE a = 'onder' GROUP BY a)
|
||||
AS foo;
|
||||
DEBUG: predicate pruning for shardId 270005
|
||||
DEBUG: predicate pruning for shardId 270006
|
||||
DEBUG: predicate pruning for shardId 270008
|
||||
count
|
||||
-------
|
||||
(0 rows)
|
||||
|
@ -386,9 +383,6 @@ DEBUG: predicate pruning for shardId 270008
|
|||
SELECT * FROM
|
||||
(SELECT count(*) FROM subquery_pruning_varchar_test_table WHERE 'eren' = a GROUP BY a)
|
||||
AS foo;
|
||||
DEBUG: predicate pruning for shardId 270005
|
||||
DEBUG: predicate pruning for shardId 270007
|
||||
DEBUG: predicate pruning for shardId 270008
|
||||
count
|
||||
-------
|
||||
(0 rows)
|
||||
|
|
|
@ -376,9 +376,6 @@ SET client_min_messages TO DEBUG2;
|
|||
SELECT * FROM
|
||||
(SELECT count(*) FROM subquery_pruning_varchar_test_table WHERE a = 'onder' GROUP BY a)
|
||||
AS foo;
|
||||
DEBUG: predicate pruning for shardId 270005
|
||||
DEBUG: predicate pruning for shardId 270006
|
||||
DEBUG: predicate pruning for shardId 270008
|
||||
count
|
||||
-------
|
||||
(0 rows)
|
||||
|
@ -386,9 +383,6 @@ DEBUG: predicate pruning for shardId 270008
|
|||
SELECT * FROM
|
||||
(SELECT count(*) FROM subquery_pruning_varchar_test_table WHERE 'eren' = a GROUP BY a)
|
||||
AS foo;
|
||||
DEBUG: predicate pruning for shardId 270005
|
||||
DEBUG: predicate pruning for shardId 270007
|
||||
DEBUG: predicate pruning for shardId 270008
|
||||
count
|
||||
-------
|
||||
(0 rows)
|
||||
|
|
Loading…
Reference in New Issue