mirror of https://github.com/citusdata/citus.git
Cache sorted shard interval
parent
73c41210c5
commit
fbc2ca7468
|
@ -46,6 +46,9 @@ static uint64 * AllocateUint64(uint64 value);
|
|||
* LoadShardIntervalList returns a list of shard intervals related for a given
|
||||
* distributed table. The function returns an empty list if no shards can be
|
||||
* found for the given relation.
|
||||
* Since LoadShardIntervalList relies on sortedShardIntervalArray, it returns
|
||||
* a shard interval list whose elements are sorted on shardminvalue. Shard intervals
|
||||
* with uninitialized shard min/max values are placed in the end of the list.
|
||||
*/
|
||||
List *
|
||||
LoadShardIntervalList(Oid relationId)
|
||||
|
@ -59,7 +62,7 @@ LoadShardIntervalList(Oid relationId)
|
|||
ShardInterval *newShardInterval = NULL;
|
||||
newShardInterval = (ShardInterval *) palloc0(sizeof(ShardInterval));
|
||||
|
||||
CopyShardInterval(&cacheEntry->shardIntervalArray[i], newShardInterval);
|
||||
CopyShardInterval(&cacheEntry->sortedShardIntervalArray[i], newShardInterval);
|
||||
|
||||
shardList = lappend(shardList, newShardInterval);
|
||||
}
|
||||
|
@ -71,6 +74,9 @@ LoadShardIntervalList(Oid relationId)
|
|||
/*
|
||||
* LoadShardList reads list of shards for given relationId from pg_dist_shard,
|
||||
* and returns the list of found shardIds.
|
||||
* Since LoadShardList relies on sortedShardIntervalArray, it returns a shard
|
||||
* list whose elements are sorted on shardminvalue. Shards with uninitialized
|
||||
* shard min/max values are placed in the end of the list.
|
||||
*/
|
||||
List *
|
||||
LoadShardList(Oid relationId)
|
||||
|
@ -81,7 +87,7 @@ LoadShardList(Oid relationId)
|
|||
|
||||
for (i = 0; i < cacheEntry->shardIntervalArrayLength; i++)
|
||||
{
|
||||
ShardInterval *currentShardInterval = &cacheEntry->shardIntervalArray[i];
|
||||
ShardInterval *currentShardInterval = &cacheEntry->sortedShardIntervalArray[i];
|
||||
uint64 *shardIdPointer = AllocateUint64(currentShardInterval->shardId);
|
||||
|
||||
shardList = lappend(shardList, shardIdPointer);
|
||||
|
|
|
@ -56,7 +56,6 @@ static List * MergeShardIntervals(List *leftShardIntervalList,
|
|||
List *rightShardIntervalList, JoinType joinType);
|
||||
static bool ShardIntervalsMatch(List *leftShardIntervalList,
|
||||
List *rightShardIntervalList);
|
||||
static List * LoadSortedShardIntervalList(Oid relationId);
|
||||
static List * JoinOrderForTable(TableEntry *firstTable, List *tableEntryList,
|
||||
List *joinClauseList);
|
||||
static List * BestJoinOrder(List *candidateJoinOrders);
|
||||
|
@ -123,6 +122,20 @@ FixedJoinOrderList(FromExpr *fromExpr, List *tableEntryList)
|
|||
List *joinedTableList = NIL;
|
||||
JoinOrderNode *firstJoinNode = NULL;
|
||||
JoinOrderNode *currentJoinNode = NULL;
|
||||
ListCell *tableEntryCell = NULL;
|
||||
|
||||
foreach(tableEntryCell, tableEntryList)
|
||||
{
|
||||
TableEntry *rangeTableEntry = (TableEntry *) lfirst(tableEntryCell);
|
||||
|
||||
if (HasUninitializedShardInterval(rangeTableEntry->relationId))
|
||||
{
|
||||
ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
|
||||
errmsg("cannot perform distributed planning on this query"),
|
||||
errdetail("Shards of relations in outer join queries must "
|
||||
"have shard min/max values.")));
|
||||
}
|
||||
}
|
||||
|
||||
/* get the FROM section as a flattened list of JoinExpr nodes */
|
||||
joinList = JoinExprList(fromExpr);
|
||||
|
@ -159,8 +172,8 @@ FixedJoinOrderList(FromExpr *fromExpr, List *tableEntryList)
|
|||
joinClauseList = list_concat(joinClauseList, joinWhereClauseList);
|
||||
}
|
||||
|
||||
/* get the list of shards to check broadcast/local join possibility */
|
||||
candidateShardList = LoadSortedShardIntervalList(nextTable->relationId);
|
||||
/* get the sorted list of shards to check broadcast/local join possibility */
|
||||
candidateShardList = LoadShardIntervalList(nextTable->relationId);
|
||||
|
||||
/* find the best join rule type */
|
||||
nextJoinNode = EvaluateJoinRules(joinedTableList, currentJoinNode,
|
||||
|
@ -268,8 +281,7 @@ CreateFirstJoinOrderNode(FromExpr *fromExpr, List *tableEntryList)
|
|||
firstPartitionColumn,
|
||||
firstPartitionMethod);
|
||||
|
||||
firstJoinNode->shardIntervalList =
|
||||
LoadSortedShardIntervalList(firstTable->relationId);
|
||||
firstJoinNode->shardIntervalList = LoadShardIntervalList(firstTable->relationId);
|
||||
|
||||
return firstJoinNode;
|
||||
}
|
||||
|
@ -462,40 +474,6 @@ MergeShardIntervals(List *leftShardIntervalList, List *rightShardIntervalList,
|
|||
}
|
||||
|
||||
|
||||
/*
|
||||
* LoadSortedShardIntervalList loads a list of shard intervals from the metadata
|
||||
* and sorts the list by the minimum value of the intervals.
|
||||
*/
|
||||
static List *
|
||||
LoadSortedShardIntervalList(Oid relationId)
|
||||
{
|
||||
List *shardIntervalList = NIL;
|
||||
int shardCount = 0;
|
||||
int intervalIndex = 0;
|
||||
ShardInterval **sortedShardIntervalArray = NULL;
|
||||
List *sortedShardIntervalList = NIL;
|
||||
|
||||
shardIntervalList = LoadShardIntervalList(relationId);
|
||||
|
||||
shardCount = list_length(shardIntervalList);
|
||||
if (shardCount <= 1)
|
||||
{
|
||||
return shardIntervalList;
|
||||
}
|
||||
|
||||
sortedShardIntervalArray = SortedShardIntervalArray(shardIntervalList);
|
||||
|
||||
for (intervalIndex = 0; intervalIndex < shardCount; intervalIndex++)
|
||||
{
|
||||
ShardInterval *shardInterval = sortedShardIntervalArray[intervalIndex];
|
||||
|
||||
sortedShardIntervalList = lappend(sortedShardIntervalList, shardInterval);
|
||||
}
|
||||
|
||||
return sortedShardIntervalList;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* JoinOnColumns determines whether two columns are joined by a given join clause
|
||||
* list.
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
#include "catalog/pg_type.h"
|
||||
#include "commands/extension.h"
|
||||
#include "distributed/citus_nodes.h"
|
||||
#include "distributed/metadata_cache.h"
|
||||
#include "distributed/multi_logical_optimizer.h"
|
||||
#include "distributed/multi_logical_planner.h"
|
||||
#include "distributed/multi_physical_planner.h"
|
||||
|
@ -137,7 +138,7 @@ static bool SupportedLateralQuery(Query *parentQuery, Query *lateralQuery);
|
|||
static bool JoinOnPartitionColumn(Query *query);
|
||||
static void ErrorIfUnsupportedShardDistribution(Query *query);
|
||||
static List * RelationIdList(Query *query);
|
||||
static bool CoPartitionedTables(List *firstShardList, List *secondShardList);
|
||||
static bool CoPartitionedTables(Oid firstRelationId, Oid secondRelationId);
|
||||
static bool ShardIntervalsEqual(ShardInterval *firstInterval,
|
||||
ShardInterval *secondInterval);
|
||||
static void ErrorIfUnsupportedFilters(Query *subquery);
|
||||
|
@ -3382,7 +3383,7 @@ JoinOnPartitionColumn(Query *query)
|
|||
static void
|
||||
ErrorIfUnsupportedShardDistribution(Query *query)
|
||||
{
|
||||
List *firstShardIntervalList = NIL;
|
||||
Oid firstTableRelationId = InvalidOid;
|
||||
List *relationIdList = RelationIdList(query);
|
||||
ListCell *relationIdCell = NULL;
|
||||
uint32 relationIndex = 0;
|
||||
|
@ -3421,21 +3422,21 @@ ErrorIfUnsupportedShardDistribution(Query *query)
|
|||
foreach(relationIdCell, relationIdList)
|
||||
{
|
||||
Oid relationId = lfirst_oid(relationIdCell);
|
||||
List *currentShardIntervalList = LoadShardIntervalList(relationId);
|
||||
bool coPartitionedTables = false;
|
||||
Oid currentRelationId = relationId;
|
||||
|
||||
/* get shard list of first relation and continue for the next relation */
|
||||
if (relationIndex == 0)
|
||||
{
|
||||
firstShardIntervalList = currentShardIntervalList;
|
||||
firstTableRelationId = relationId;
|
||||
relationIndex++;
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
/* check if this table has 1-1 shard partitioning with first table */
|
||||
coPartitionedTables = CoPartitionedTables(firstShardIntervalList,
|
||||
currentShardIntervalList);
|
||||
coPartitionedTables = CoPartitionedTables(firstTableRelationId,
|
||||
currentRelationId);
|
||||
if (!coPartitionedTables)
|
||||
{
|
||||
ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
|
||||
|
@ -3474,21 +3475,22 @@ RelationIdList(Query *query)
|
|||
|
||||
|
||||
/*
|
||||
* CoPartitionedTables checks if given shard lists have 1-to-1 shard partitioning.
|
||||
* It first sorts both list according to shard interval minimum values. Then it
|
||||
* compares every shard interval in order and if any pair of shard intervals are
|
||||
* not equal it returns false.
|
||||
* CoPartitionedTables checks if given two distributed tables have 1-to-1 shard
|
||||
* partitioning. It uses shard interval array that are sorted on interval minimum
|
||||
* values. Then it compares every shard interval in order and if any pair of
|
||||
* shard intervals are not equal it returns false.
|
||||
*/
|
||||
static bool
|
||||
CoPartitionedTables(List *firstShardList, List *secondShardList)
|
||||
CoPartitionedTables(Oid firstRelationId, Oid secondRelationId)
|
||||
{
|
||||
bool coPartitionedTables = true;
|
||||
uint32 intervalIndex = 0;
|
||||
ShardInterval **sortedFirstIntervalArray = NULL;
|
||||
ShardInterval **sortedSecondIntervalArray = NULL;
|
||||
|
||||
uint32 firstListShardCount = list_length(firstShardList);
|
||||
uint32 secondListShardCount = list_length(secondShardList);
|
||||
DistTableCacheEntry *firstTableCache = DistributedTableCacheEntry(firstRelationId);
|
||||
DistTableCacheEntry *secondTableCache = DistributedTableCacheEntry(secondRelationId);
|
||||
ShardInterval *sortedFirstIntervalArray = firstTableCache->sortedShardIntervalArray;
|
||||
ShardInterval *sortedSecondIntervalArray = secondTableCache->sortedShardIntervalArray;
|
||||
uint32 firstListShardCount = firstTableCache->shardIntervalArrayLength;
|
||||
uint32 secondListShardCount = secondTableCache->shardIntervalArrayLength;
|
||||
|
||||
if (firstListShardCount != secondListShardCount)
|
||||
{
|
||||
|
@ -3501,13 +3503,10 @@ CoPartitionedTables(List *firstShardList, List *secondShardList)
|
|||
return true;
|
||||
}
|
||||
|
||||
sortedFirstIntervalArray = SortedShardIntervalArray(firstShardList);
|
||||
sortedSecondIntervalArray = SortedShardIntervalArray(secondShardList);
|
||||
|
||||
for (intervalIndex = 0; intervalIndex < firstListShardCount; intervalIndex++)
|
||||
{
|
||||
ShardInterval *firstInterval = sortedFirstIntervalArray[intervalIndex];
|
||||
ShardInterval *secondInterval = sortedSecondIntervalArray[intervalIndex];
|
||||
ShardInterval *firstInterval = &sortedFirstIntervalArray[intervalIndex];
|
||||
ShardInterval *secondInterval = &sortedSecondIntervalArray[intervalIndex];
|
||||
|
||||
bool shardIntervalsEqual = ShardIntervalsEqual(firstInterval, secondInterval);
|
||||
if (!shardIntervalsEqual)
|
||||
|
|
|
@ -110,8 +110,9 @@ static MapMergeJob * BuildMapMergeJob(Query *jobQuery, List *dependedJobList,
|
|||
Oid baseRelationId,
|
||||
BoundaryNodeJobType boundaryNodeJobType);
|
||||
static uint32 HashPartitionCount(void);
|
||||
static int CompareShardIntervals(const void *leftElement, const void *rightElement,
|
||||
FmgrInfo *typeCompareFunction);
|
||||
static int CompareShardIntervalPointers(const void *leftElement,
|
||||
const void *rightElement,
|
||||
FmgrInfo *typeCompareFunction);
|
||||
static ArrayType * SplitPointObject(ShardInterval **shardIntervalArray,
|
||||
uint32 shardIntervalCount);
|
||||
|
||||
|
@ -1759,6 +1760,13 @@ HashPartitionCount(void)
|
|||
* SortedShardIntervalArray returns a sorted array of shard intervals for shards
|
||||
* in the given shard list. The array elements are sorted in in ascending order
|
||||
* according to shard interval's minimum value.
|
||||
*
|
||||
* The sortedShardIntervalArray that this function returns differs from the
|
||||
* sortedShardIntervalArray in the metadata cache in two ways. First, this
|
||||
* function errors out in case there exists any shard intervals without min/max
|
||||
* values. Second, this function sorts the input shardIntervalList, i.e., not the
|
||||
* whole shard intervals that correspond to a single distributed table as in it's
|
||||
* in the cache.
|
||||
*/
|
||||
ShardInterval **
|
||||
SortedShardIntervalArray(List *shardIntervalList)
|
||||
|
@ -1800,18 +1808,19 @@ SortedShardIntervalArray(List *shardIntervalList)
|
|||
|
||||
/* sort shard intervals by their minimum values in ascending order */
|
||||
qsort_arg(shardIntervalArray, shardIntervalCount, sizeof(ShardInterval *),
|
||||
(qsort_arg_comparator) CompareShardIntervals, (void *) typeCompareFunction);
|
||||
(qsort_arg_comparator) CompareShardIntervalPointers,
|
||||
(void *) typeCompareFunction);
|
||||
|
||||
return shardIntervalArray;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* CompareShardIntervals acts as a helper function to compare two shard interval
|
||||
* CompareShardIntervalPointers acts as a helper function to compare two shard interval
|
||||
* pointers by their minimum values, using the value's type comparison function.
|
||||
*/
|
||||
static int
|
||||
CompareShardIntervals(const void *leftElement, const void *rightElement,
|
||||
CompareShardIntervalPointers(const void *leftElement, const void *rightElement,
|
||||
FmgrInfo *typeCompareFunction)
|
||||
{
|
||||
ShardInterval **leftShardInterval = (ShardInterval **) leftElement;
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
#include "access/genam.h"
|
||||
#include "access/heapam.h"
|
||||
#include "access/htup_details.h"
|
||||
#include "access/nbtree.h"
|
||||
#include "catalog/indexing.h"
|
||||
#include "catalog/pg_namespace.h"
|
||||
#include "catalog/pg_type.h"
|
||||
|
@ -19,8 +20,10 @@
|
|||
#include "commands/trigger.h"
|
||||
#include "distributed/master_metadata_utility.h"
|
||||
#include "distributed/metadata_cache.h"
|
||||
#include "distributed/multi_physical_planner.h"
|
||||
#include "distributed/pg_dist_partition.h"
|
||||
#include "distributed/pg_dist_shard.h"
|
||||
#include "distributed/worker_protocol.h"
|
||||
#include "parser/parse_func.h"
|
||||
#include "utils/builtins.h"
|
||||
#include "utils/catcache.h"
|
||||
|
@ -45,6 +48,8 @@ static ScanKeyData DistShardScanKey[1];
|
|||
|
||||
/* local function forward declarations */
|
||||
static DistTableCacheEntry * LookupDistTableCacheEntry(Oid relationId);
|
||||
static int CompareShardIntervals(const void *leftElement, const void *rightElement,
|
||||
FmgrInfo *typeCompareFunction);
|
||||
static void InitializeDistTableCache(void);
|
||||
static void ResetDistTableCacheEntry(DistTableCacheEntry *cacheEntry);
|
||||
static void InvalidateDistRelationCacheCallback(Datum argument, Oid relationId);
|
||||
|
@ -88,6 +93,42 @@ IsDistributedTable(Oid relationId)
|
|||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* HasUninitializedShardInterval returns true if the distributed relation has
|
||||
* at least one shard interval whose min/max value has not been set.
|
||||
*/
|
||||
bool
|
||||
HasUninitializedShardInterval(Oid relationId)
|
||||
{
|
||||
DistTableCacheEntry *cacheEntry = LookupDistTableCacheEntry(relationId);
|
||||
ShardInterval *sortedShardIntervalArray = NULL;
|
||||
ShardInterval *lastShardInterval = NULL;
|
||||
int shardIntervalCount = 0;
|
||||
bool hasUninitializedShardInterval = false;
|
||||
|
||||
/* only distributed tables could have shard intervals */
|
||||
Assert(cacheEntry->isDistributedTable);
|
||||
|
||||
sortedShardIntervalArray = cacheEntry->sortedShardIntervalArray;
|
||||
shardIntervalCount = cacheEntry->shardIntervalArrayLength;
|
||||
|
||||
if (shardIntervalCount > 0)
|
||||
{
|
||||
lastShardInterval = &sortedShardIntervalArray[shardIntervalCount - 1];
|
||||
|
||||
/* Since the shard interval array is sorted, and uninitialized ones stored
|
||||
* in the end of the array, checking the last element is enough.
|
||||
*/
|
||||
if (!lastShardInterval->minValueExists || !lastShardInterval->maxValueExists)
|
||||
{
|
||||
hasUninitializedShardInterval = true;
|
||||
}
|
||||
}
|
||||
return hasUninitializedShardInterval;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* LoadShardInterval reads shard metadata for given shardId from pg_dist_shard,
|
||||
* and converts min/max values in these metadata to their properly typed datum
|
||||
|
@ -191,6 +232,7 @@ LookupDistTableCacheEntry(Oid relationId)
|
|||
List *distShardTupleList = NIL;
|
||||
int shardIntervalArrayLength = 0;
|
||||
ShardInterval *shardIntervalArray = NULL;
|
||||
ShardInterval *sortedShardIntervalArray = NULL;
|
||||
void *hashKey = (void *) &relationId;
|
||||
|
||||
if (DistTableCacheHash == NULL)
|
||||
|
@ -268,6 +310,23 @@ LookupDistTableCacheEntry(Oid relationId)
|
|||
heap_close(distShardRelation, AccessShareLock);
|
||||
}
|
||||
|
||||
/* sort the interval array */
|
||||
if (shardIntervalArrayLength > 0)
|
||||
{
|
||||
ShardInterval *shardInterval = &shardIntervalArray[0];
|
||||
Oid typeId = shardInterval->valueTypeId;
|
||||
FmgrInfo *typeCompareFunction = GetFunctionInfo(typeId, BTREE_AM_OID,
|
||||
BTORDER_PROC);
|
||||
|
||||
/* if a shard doesn't have min/max values, it's placed in the end of the array */
|
||||
qsort_arg(shardIntervalArray, shardIntervalArrayLength, sizeof(ShardInterval),
|
||||
(qsort_arg_comparator) CompareShardIntervals,
|
||||
(void *) typeCompareFunction);
|
||||
|
||||
sortedShardIntervalArray = shardIntervalArray;
|
||||
}
|
||||
|
||||
|
||||
cacheEntry = hash_search(DistTableCacheHash, hashKey, HASH_ENTER, NULL);
|
||||
|
||||
/* zero out entry, but not the key part */
|
||||
|
@ -286,13 +345,61 @@ LookupDistTableCacheEntry(Oid relationId)
|
|||
cacheEntry->partitionKeyString = partitionKeyString;
|
||||
cacheEntry->partitionMethod = partitionMethod;
|
||||
cacheEntry->shardIntervalArrayLength = shardIntervalArrayLength;
|
||||
cacheEntry->shardIntervalArray = shardIntervalArray;
|
||||
cacheEntry->sortedShardIntervalArray = sortedShardIntervalArray;
|
||||
}
|
||||
|
||||
return cacheEntry;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* CompareShardIntervals acts as a helper function to compare two shard intervals
|
||||
* by their minimum values, using the value's type comparison function.
|
||||
*
|
||||
* If a shard interval does not have min/max value, it's treated as being greater
|
||||
* than the other.
|
||||
*/
|
||||
static int
|
||||
CompareShardIntervals(const void *leftElement, const void *rightElement,
|
||||
FmgrInfo *typeCompareFunction)
|
||||
{
|
||||
ShardInterval leftShardInterval = *((ShardInterval *) leftElement);
|
||||
ShardInterval rightShardInterval = *((ShardInterval *) rightElement);
|
||||
Datum leftDatum = 0;
|
||||
Datum rightDatum = 0;
|
||||
int comparisonResult = 0;
|
||||
|
||||
/*
|
||||
* Left element should be treated as the largest element in case it doesn't
|
||||
* have min/max values.
|
||||
*/
|
||||
if (!leftShardInterval.minValueExists && !leftShardInterval.maxValueExists)
|
||||
{
|
||||
comparisonResult = 1;
|
||||
return comparisonResult;
|
||||
}
|
||||
|
||||
/*
|
||||
* Roght element should be treated as the largest element in case it doesn't
|
||||
* have min/max values.
|
||||
*/
|
||||
if (!rightShardInterval.minValueExists && !rightShardInterval.maxValueExists)
|
||||
{
|
||||
comparisonResult = -1;
|
||||
return comparisonResult;
|
||||
}
|
||||
|
||||
/* if both shard interval have min/max values, calculate the comparison result */
|
||||
leftDatum = leftShardInterval.minValue;
|
||||
rightDatum = rightShardInterval.minValue;
|
||||
|
||||
Datum comparisonDatum = CompareCall2(typeCompareFunction, leftDatum, rightDatum);
|
||||
comparisonResult = DatumGetInt32(comparisonDatum);
|
||||
|
||||
return comparisonResult;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* CitusHasBeenLoaded returns true if the citus extension has been created
|
||||
* in the current database and the extension script has been executed. Otherwise,
|
||||
|
@ -621,7 +728,7 @@ ResetDistTableCacheEntry(DistTableCacheEntry *cacheEntry)
|
|||
|
||||
for (i = 0; i < cacheEntry->shardIntervalArrayLength; i++)
|
||||
{
|
||||
ShardInterval *shardInterval = &cacheEntry->shardIntervalArray[i];
|
||||
ShardInterval *shardInterval = &cacheEntry->sortedShardIntervalArray[i];
|
||||
bool valueByVal = shardInterval->valueByVal;
|
||||
|
||||
if (!valueByVal)
|
||||
|
@ -638,8 +745,8 @@ ResetDistTableCacheEntry(DistTableCacheEntry *cacheEntry)
|
|||
}
|
||||
}
|
||||
|
||||
pfree(cacheEntry->shardIntervalArray);
|
||||
cacheEntry->shardIntervalArray = NULL;
|
||||
pfree(cacheEntry->sortedShardIntervalArray);
|
||||
cacheEntry->sortedShardIntervalArray = NULL;
|
||||
cacheEntry->shardIntervalArrayLength = 0;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -38,11 +38,12 @@ typedef struct
|
|||
|
||||
/* pg_dist_shard metadata (variable-length ShardInterval array) for this table */
|
||||
int shardIntervalArrayLength;
|
||||
ShardInterval *shardIntervalArray;
|
||||
ShardInterval *sortedShardIntervalArray;
|
||||
} DistTableCacheEntry;
|
||||
|
||||
|
||||
extern bool IsDistributedTable(Oid relationId);
|
||||
extern bool HasUninitializedShardInterval(Oid relationId);
|
||||
extern ShardInterval * LoadShardInterval(uint64 shardId);
|
||||
extern DistTableCacheEntry * DistributedTableCacheEntry(Oid distributedRelationId);
|
||||
extern void CitusInvalidateRelcacheByRelid(Oid relationId);
|
||||
|
|
|
@ -87,7 +87,7 @@ VALUES
|
|||
SELECT load_shard_id_array('events_hash');
|
||||
load_shard_id_array
|
||||
---------------------
|
||||
{4,3,2,1}
|
||||
{1,2,3,4}
|
||||
(1 row)
|
||||
|
||||
-- should see array with first shard range
|
||||
|
|
|
@ -73,25 +73,25 @@ DEBUG: predicate pruning for shardId 111
|
|||
(1 row)
|
||||
|
||||
EXPLAIN SELECT count(*) FROM orders_hash_partitioned WHERE o_orderkey = 2;
|
||||
DEBUG: predicate pruning for shardId 113
|
||||
DEBUG: predicate pruning for shardId 112
|
||||
DEBUG: predicate pruning for shardId 110
|
||||
DEBUG: predicate pruning for shardId 113
|
||||
QUERY PLAN
|
||||
----------------------------------------------------------------------
|
||||
explain statements for distributed queries are currently unsupported
|
||||
(1 row)
|
||||
|
||||
EXPLAIN SELECT count(*) FROM orders_hash_partitioned WHERE o_orderkey = 3;
|
||||
DEBUG: predicate pruning for shardId 111
|
||||
DEBUG: predicate pruning for shardId 110
|
||||
DEBUG: predicate pruning for shardId 111
|
||||
QUERY PLAN
|
||||
----------------------------------------------------------------------
|
||||
explain statements for distributed queries are currently unsupported
|
||||
(1 row)
|
||||
|
||||
EXPLAIN SELECT count(*) FROM orders_hash_partitioned WHERE o_orderkey = 4;
|
||||
DEBUG: predicate pruning for shardId 111
|
||||
DEBUG: predicate pruning for shardId 110
|
||||
DEBUG: predicate pruning for shardId 111
|
||||
QUERY PLAN
|
||||
----------------------------------------------------------------------
|
||||
explain statements for distributed queries are currently unsupported
|
||||
|
@ -99,8 +99,8 @@ DEBUG: predicate pruning for shardId 110
|
|||
|
||||
EXPLAIN SELECT count(*) FROM orders_hash_partitioned WHERE o_orderkey is NULL;
|
||||
DEBUG: predicate pruning for shardId 112
|
||||
DEBUG: predicate pruning for shardId 111
|
||||
DEBUG: predicate pruning for shardId 110
|
||||
DEBUG: predicate pruning for shardId 111
|
||||
QUERY PLAN
|
||||
----------------------------------------------------------------------
|
||||
explain statements for distributed queries are currently unsupported
|
||||
|
@ -231,14 +231,14 @@ DEBUG: predicate pruning for shardId 111
|
|||
EXPLAIN SELECT count(*)
|
||||
FROM orders_hash_partitioned orders1, orders_hash_partitioned orders2
|
||||
WHERE orders1.o_orderkey = orders2.o_orderkey;
|
||||
DEBUG: join prunable for intervals [-1011077333,0] and [1134484726,1134484726]
|
||||
DEBUG: join prunable for intervals [-1011077333,0] and [-1905060026,-1905060026]
|
||||
DEBUG: join prunable for intervals [-1905060026,-28094569] and [1134484726,1134484726]
|
||||
DEBUG: join prunable for intervals [1134484726,1134484726] and [-1011077333,0]
|
||||
DEBUG: join prunable for intervals [1134484726,1134484726] and [-1905060026,-28094569]
|
||||
DEBUG: join prunable for intervals [1134484726,1134484726] and [-1905060026,-1905060026]
|
||||
DEBUG: join prunable for intervals [-1905060026,-1905060026] and [-1011077333,0]
|
||||
DEBUG: join prunable for intervals [-1905060026,-1905060026] and [1134484726,1134484726]
|
||||
DEBUG: join prunable for intervals [-1011077333,0] and [-1905060026,-1905060026]
|
||||
DEBUG: join prunable for intervals [-1011077333,0] and [1134484726,1134484726]
|
||||
DEBUG: join prunable for intervals [1134484726,1134484726] and [-1905060026,-28094569]
|
||||
DEBUG: join prunable for intervals [1134484726,1134484726] and [-1905060026,-1905060026]
|
||||
DEBUG: join prunable for intervals [1134484726,1134484726] and [-1011077333,0]
|
||||
QUERY PLAN
|
||||
----------------------------------------------------------------------
|
||||
explain statements for distributed queries are currently unsupported
|
||||
|
@ -252,8 +252,8 @@ EXPLAIN SELECT count(*)
|
|||
DEBUG: predicate pruning for shardId 113
|
||||
DEBUG: predicate pruning for shardId 111
|
||||
DEBUG: predicate pruning for shardId 112
|
||||
DEBUG: predicate pruning for shardId 111
|
||||
DEBUG: predicate pruning for shardId 110
|
||||
DEBUG: predicate pruning for shardId 111
|
||||
DEBUG: join prunable for intervals [-1905060026,-1905060026] and [-1011077333,0]
|
||||
QUERY PLAN
|
||||
----------------------------------------------------------------------
|
||||
|
|
|
@ -135,15 +135,15 @@ ERROR: creating unique indexes on append-partitioned tables is currently unsupp
|
|||
-- Verify that we error out in case of postgres errors on supported statement
|
||||
-- types.
|
||||
CREATE INDEX lineitem_orderkey_index ON lineitem (l_orderkey);
|
||||
WARNING: could not receive query results from localhost:57638
|
||||
DETAIL: Client error: relation "lineitem_orderkey_index_102014" already exists
|
||||
WARNING: could not receive query results from localhost:57637
|
||||
DETAIL: Client error: relation "lineitem_orderkey_index_102009" already exists
|
||||
ERROR: could not execute DDL command on worker node shards
|
||||
CREATE INDEX try_index ON lineitem USING gist (l_orderkey);
|
||||
WARNING: could not receive query results from localhost:57638
|
||||
WARNING: could not receive query results from localhost:57637
|
||||
DETAIL: Client error: data type bigint has no default operator class for access method "gist"
|
||||
ERROR: could not execute DDL command on worker node shards
|
||||
CREATE INDEX try_index ON lineitem (non_existent_column);
|
||||
WARNING: could not receive query results from localhost:57638
|
||||
WARNING: could not receive query results from localhost:57637
|
||||
DETAIL: Client error: column "non_existent_column" does not exist
|
||||
ERROR: could not execute DDL command on worker node shards
|
||||
-- Verify that none of failed indexes got created on the master node
|
||||
|
|
|
@ -8,34 +8,34 @@ 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;
|
||||
LOG: join order: [ "lineitem" ][ local partition join "lineitem" ]
|
||||
DEBUG: join prunable for intervals [13921,14947] and [11554,13920]
|
||||
DEBUG: join prunable for intervals [13921,14947] and [8997,11554]
|
||||
DEBUG: join prunable for intervals [13921,14947] and [4965,5986]
|
||||
DEBUG: join prunable for intervals [13921,14947] and [2497,4964]
|
||||
DEBUG: join prunable for intervals [13921,14947] and [1,2496]
|
||||
DEBUG: join prunable for intervals [11554,13920] and [13921,14947]
|
||||
DEBUG: join prunable for intervals [11554,13920] and [4965,5986]
|
||||
DEBUG: join prunable for intervals [11554,13920] and [2497,4964]
|
||||
DEBUG: join prunable for intervals [11554,13920] and [1,2496]
|
||||
DEBUG: join prunable for intervals [8997,11554] and [13921,14947]
|
||||
DEBUG: join prunable for intervals [8997,11554] and [4965,5986]
|
||||
DEBUG: join prunable for intervals [8997,11554] and [2497,4964]
|
||||
DEBUG: join prunable for intervals [8997,11554] and [1,2496]
|
||||
DEBUG: join prunable for intervals [4965,5986] and [13921,14947]
|
||||
DEBUG: join prunable for intervals [4965,5986] and [11554,13920]
|
||||
DEBUG: join prunable for intervals [4965,5986] and [8997,11554]
|
||||
DEBUG: join prunable for intervals [4965,5986] and [2497,4964]
|
||||
DEBUG: join prunable for intervals [4965,5986] and [1,2496]
|
||||
DEBUG: join prunable for intervals [2497,4964] and [13921,14947]
|
||||
DEBUG: join prunable for intervals [2497,4964] and [11554,13920]
|
||||
DEBUG: join prunable for intervals [2497,4964] and [8997,11554]
|
||||
DEBUG: join prunable for intervals [2497,4964] and [4965,5986]
|
||||
DEBUG: join prunable for intervals [2497,4964] and [1,2496]
|
||||
DEBUG: join prunable for intervals [1,2496] and [13921,14947]
|
||||
DEBUG: join prunable for intervals [1,2496] and [11554,13920]
|
||||
DEBUG: join prunable for intervals [1,2496] and [8997,11554]
|
||||
DEBUG: join prunable for intervals [1,2496] and [4965,5986]
|
||||
DEBUG: join prunable for intervals [1,2496] and [2497,4964]
|
||||
DEBUG: join prunable for intervals [1,2496] and [4965,5986]
|
||||
DEBUG: join prunable for intervals [1,2496] and [8997,11554]
|
||||
DEBUG: join prunable for intervals [1,2496] and [11554,13920]
|
||||
DEBUG: join prunable for intervals [1,2496] and [13921,14947]
|
||||
DEBUG: join prunable for intervals [2497,4964] and [1,2496]
|
||||
DEBUG: join prunable for intervals [2497,4964] and [4965,5986]
|
||||
DEBUG: join prunable for intervals [2497,4964] and [8997,11554]
|
||||
DEBUG: join prunable for intervals [2497,4964] and [11554,13920]
|
||||
DEBUG: join prunable for intervals [2497,4964] and [13921,14947]
|
||||
DEBUG: join prunable for intervals [4965,5986] and [1,2496]
|
||||
DEBUG: join prunable for intervals [4965,5986] and [2497,4964]
|
||||
DEBUG: join prunable for intervals [4965,5986] and [8997,11554]
|
||||
DEBUG: join prunable for intervals [4965,5986] and [11554,13920]
|
||||
DEBUG: join prunable for intervals [4965,5986] and [13921,14947]
|
||||
DEBUG: join prunable for intervals [8997,11554] and [1,2496]
|
||||
DEBUG: join prunable for intervals [8997,11554] and [2497,4964]
|
||||
DEBUG: join prunable for intervals [8997,11554] and [4965,5986]
|
||||
DEBUG: join prunable for intervals [8997,11554] and [13921,14947]
|
||||
DEBUG: join prunable for intervals [11554,13920] and [1,2496]
|
||||
DEBUG: join prunable for intervals [11554,13920] and [2497,4964]
|
||||
DEBUG: join prunable for intervals [11554,13920] and [4965,5986]
|
||||
DEBUG: join prunable for intervals [11554,13920] and [13921,14947]
|
||||
DEBUG: join prunable for intervals [13921,14947] and [1,2496]
|
||||
DEBUG: join prunable for intervals [13921,14947] and [2497,4964]
|
||||
DEBUG: join prunable for intervals [13921,14947] and [4965,5986]
|
||||
DEBUG: join prunable for intervals [13921,14947] and [8997,11554]
|
||||
DEBUG: join prunable for intervals [13921,14947] and [11554,13920]
|
||||
QUERY PLAN
|
||||
----------------------------------------------------------------------
|
||||
explain statements for distributed queries are currently unsupported
|
||||
|
|
|
@ -9,12 +9,12 @@ SET client_min_messages TO DEBUG2;
|
|||
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 [13921,14947] and [1,5986]
|
||||
DEBUG: join prunable for intervals [11554,13920] and [1,5986]
|
||||
DEBUG: join prunable for intervals [8997,11554] and [1,5986]
|
||||
DEBUG: join prunable for intervals [4965,5986] and [8997,14946]
|
||||
DEBUG: join prunable for intervals [2497,4964] and [8997,14946]
|
||||
DEBUG: join prunable for intervals [1,2496] and [8997,14946]
|
||||
DEBUG: join prunable for intervals [2497,4964] and [8997,14946]
|
||||
DEBUG: join prunable for intervals [4965,5986] and [8997,14946]
|
||||
DEBUG: join prunable for intervals [8997,11554] and [1,5986]
|
||||
DEBUG: join prunable for intervals [11554,13920] and [1,5986]
|
||||
DEBUG: join prunable for intervals [13921,14947] and [1,5986]
|
||||
sum | avg
|
||||
-------+--------------------
|
||||
36086 | 3.0076679446574429
|
||||
|
@ -22,12 +22,12 @@ DEBUG: join prunable for intervals [1,2496] and [8997,14946]
|
|||
|
||||
SELECT sum(l_linenumber), avg(l_linenumber) FROM lineitem, orders
|
||||
WHERE l_orderkey = o_orderkey AND l_orderkey > 9030;
|
||||
DEBUG: predicate pruning for shardId 102011
|
||||
DEBUG: predicate pruning for shardId 102010
|
||||
DEBUG: predicate pruning for shardId 102009
|
||||
DEBUG: join prunable for intervals [13921,14947] and [1,5986]
|
||||
DEBUG: join prunable for intervals [11554,13920] and [1,5986]
|
||||
DEBUG: predicate pruning for shardId 102010
|
||||
DEBUG: predicate pruning for shardId 102011
|
||||
DEBUG: join prunable for intervals [8997,11554] and [1,5986]
|
||||
DEBUG: join prunable for intervals [11554,13920] and [1,5986]
|
||||
DEBUG: join prunable for intervals [13921,14947] and [1,5986]
|
||||
sum | avg
|
||||
-------+--------------------
|
||||
17996 | 3.0194630872483221
|
||||
|
@ -37,12 +37,12 @@ DEBUG: join prunable for intervals [8997,11554] 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 102014
|
||||
DEBUG: predicate pruning for shardId 102013
|
||||
DEBUG: predicate pruning for shardId 102012
|
||||
DEBUG: predicate pruning for shardId 102011
|
||||
DEBUG: predicate pruning for shardId 102010
|
||||
DEBUG: predicate pruning for shardId 102009
|
||||
DEBUG: predicate pruning for shardId 102010
|
||||
DEBUG: predicate pruning for shardId 102011
|
||||
DEBUG: predicate pruning for shardId 102012
|
||||
DEBUG: predicate pruning for shardId 102013
|
||||
DEBUG: predicate pruning for shardId 102014
|
||||
sum | avg
|
||||
-----+-----
|
||||
|
|
||||
|
@ -53,13 +53,13 @@ DEBUG: predicate pruning for shardId 102009
|
|||
-- 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 102011
|
||||
DEBUG: predicate pruning for shardId 102010
|
||||
DEBUG: predicate pruning for shardId 102009
|
||||
DEBUG: predicate pruning for shardId 102010
|
||||
DEBUG: predicate pruning for shardId 102011
|
||||
DEBUG: predicate pruning for shardId 102016
|
||||
DEBUG: join prunable for intervals [13921,14947] and [1,5986]
|
||||
DEBUG: join prunable for intervals [11554,13920] and [1,5986]
|
||||
DEBUG: join prunable for intervals [8997,11554] and [1,5986]
|
||||
DEBUG: join prunable for intervals [11554,13920] and [1,5986]
|
||||
DEBUG: join prunable for intervals [13921,14947] and [1,5986]
|
||||
sum | avg
|
||||
-----+-----
|
||||
|
|
||||
|
@ -72,8 +72,8 @@ DEBUG: join prunable for intervals [8997,11554] and [1,5986]
|
|||
EXPLAIN SELECT count(*)
|
||||
FROM array_partitioned_table table1, array_partitioned_table table2
|
||||
WHERE table1.array_column = table2.array_column;
|
||||
DEBUG: join prunable for intervals [{BA1000U2AMO4ZGX,BZZXSP27F21T6},{CA1000U2AMO4ZGX,CZZXSP27F21T6}] and [{},{AZZXSP27F21T6,AZZXSP27F21T6}]
|
||||
DEBUG: join prunable for intervals [{},{AZZXSP27F21T6,AZZXSP27F21T6}] and [{BA1000U2AMO4ZGX,BZZXSP27F21T6},{CA1000U2AMO4ZGX,CZZXSP27F21T6}]
|
||||
DEBUG: join prunable for intervals [{BA1000U2AMO4ZGX,BZZXSP27F21T6},{CA1000U2AMO4ZGX,CZZXSP27F21T6}] and [{},{AZZXSP27F21T6,AZZXSP27F21T6}]
|
||||
QUERY PLAN
|
||||
----------------------------------------------------------------------
|
||||
explain statements for distributed queries are currently unsupported
|
||||
|
@ -82,8 +82,8 @@ DEBUG: join prunable for intervals [{},{AZZXSP27F21T6,AZZXSP27F21T6}] and [{BA1
|
|||
EXPLAIN SELECT count(*)
|
||||
FROM composite_partitioned_table table1, composite_partitioned_table table2
|
||||
WHERE table1.composite_column = table2.composite_column;
|
||||
DEBUG: join prunable for intervals [(c,5,d),(d,6,e)] and [(a,3,b),(b,4,c)]
|
||||
DEBUG: join prunable for intervals [(a,3,b),(b,4,c)] and [(c,5,d),(d,6,e)]
|
||||
DEBUG: join prunable for intervals [(c,5,d),(d,6,e)] and [(a,3,b),(b,4,c)]
|
||||
QUERY PLAN
|
||||
----------------------------------------------------------------------
|
||||
explain statements for distributed queries are currently unsupported
|
||||
|
|
|
@ -45,30 +45,30 @@ ORDER BY
|
|||
LIMIT 30;
|
||||
DEBUG: StartTransactionCommand
|
||||
DEBUG: push down of limit count: 30
|
||||
DEBUG: join prunable for intervals [13921,14947] and [1,5986]
|
||||
DEBUG: join prunable for intervals [11554,13920] and [1,5986]
|
||||
DEBUG: join prunable for intervals [8997,11554] and [1,5986]
|
||||
DEBUG: join prunable for intervals [4965,5986] and [8997,14946]
|
||||
DEBUG: join prunable for intervals [2497,4964] and [8997,14946]
|
||||
DEBUG: join prunable for intervals [1,2496] and [8997,14946]
|
||||
DEBUG: join prunable for intervals [2497,4964] and [8997,14946]
|
||||
DEBUG: join prunable for intervals [4965,5986] and [8997,14946]
|
||||
DEBUG: join prunable for intervals [8997,11554] and [1,5986]
|
||||
DEBUG: join prunable for intervals [11554,13920] and [1,5986]
|
||||
DEBUG: join prunable for intervals [13921,14947] and [1,5986]
|
||||
DEBUG: generated sql query for job 1250 and task 3
|
||||
DETAIL: query string: "SELECT lineitem.l_partkey, orders.o_orderkey, lineitem.l_quantity, lineitem.l_extendedprice, orders.o_custkey FROM (lineitem_102014 lineitem JOIN orders_102016 orders ON ((lineitem.l_orderkey = orders.o_orderkey))) WHERE (orders.o_totalprice > '10'::numeric)"
|
||||
DEBUG: generated sql query for job 1250 and task 6
|
||||
DETAIL: query string: "SELECT lineitem.l_partkey, orders.o_orderkey, lineitem.l_quantity, lineitem.l_extendedprice, orders.o_custkey FROM (lineitem_102013 lineitem JOIN orders_102016 orders ON ((lineitem.l_orderkey = orders.o_orderkey))) WHERE (orders.o_totalprice > '10'::numeric)"
|
||||
DEBUG: generated sql query for job 1250 and task 9
|
||||
DETAIL: query string: "SELECT lineitem.l_partkey, orders.o_orderkey, lineitem.l_quantity, lineitem.l_extendedprice, orders.o_custkey FROM (lineitem_102012 lineitem JOIN orders_102016 orders ON ((lineitem.l_orderkey = orders.o_orderkey))) WHERE (orders.o_totalprice > '10'::numeric)"
|
||||
DEBUG: generated sql query for job 1250 and task 12
|
||||
DETAIL: query string: "SELECT lineitem.l_partkey, orders.o_orderkey, lineitem.l_quantity, lineitem.l_extendedprice, orders.o_custkey FROM (lineitem_102011 lineitem JOIN orders_102015 orders ON ((lineitem.l_orderkey = orders.o_orderkey))) WHERE (orders.o_totalprice > '10'::numeric)"
|
||||
DEBUG: generated sql query for job 1250 and task 15
|
||||
DETAIL: query string: "SELECT lineitem.l_partkey, orders.o_orderkey, lineitem.l_quantity, lineitem.l_extendedprice, orders.o_custkey FROM (lineitem_102010 lineitem JOIN orders_102015 orders ON ((lineitem.l_orderkey = orders.o_orderkey))) WHERE (orders.o_totalprice > '10'::numeric)"
|
||||
DEBUG: generated sql query for job 1250 and task 18
|
||||
DETAIL: query string: "SELECT lineitem.l_partkey, orders.o_orderkey, lineitem.l_quantity, lineitem.l_extendedprice, orders.o_custkey FROM (lineitem_102009 lineitem JOIN orders_102015 orders ON ((lineitem.l_orderkey = orders.o_orderkey))) WHERE (orders.o_totalprice > '10'::numeric)"
|
||||
DEBUG: assigned task 15 to node localhost:57637
|
||||
DEBUG: assigned task 18 to node localhost:57638
|
||||
DEBUG: assigned task 9 to node localhost:57637
|
||||
DEBUG: assigned task 12 to node localhost:57638
|
||||
DEBUG: assigned task 3 to node localhost:57637
|
||||
DEBUG: assigned task 6 to node localhost:57638
|
||||
DEBUG: generated sql query for job 1250 and task 6
|
||||
DETAIL: query string: "SELECT lineitem.l_partkey, orders.o_orderkey, lineitem.l_quantity, lineitem.l_extendedprice, orders.o_custkey FROM (lineitem_102010 lineitem JOIN orders_102015 orders ON ((lineitem.l_orderkey = orders.o_orderkey))) WHERE (orders.o_totalprice > '10'::numeric)"
|
||||
DEBUG: generated sql query for job 1250 and task 9
|
||||
DETAIL: query string: "SELECT lineitem.l_partkey, orders.o_orderkey, lineitem.l_quantity, lineitem.l_extendedprice, orders.o_custkey FROM (lineitem_102011 lineitem JOIN orders_102015 orders ON ((lineitem.l_orderkey = orders.o_orderkey))) WHERE (orders.o_totalprice > '10'::numeric)"
|
||||
DEBUG: generated sql query for job 1250 and task 12
|
||||
DETAIL: query string: "SELECT lineitem.l_partkey, orders.o_orderkey, lineitem.l_quantity, lineitem.l_extendedprice, orders.o_custkey FROM (lineitem_102012 lineitem JOIN orders_102016 orders ON ((lineitem.l_orderkey = orders.o_orderkey))) WHERE (orders.o_totalprice > '10'::numeric)"
|
||||
DEBUG: generated sql query for job 1250 and task 15
|
||||
DETAIL: query string: "SELECT lineitem.l_partkey, orders.o_orderkey, lineitem.l_quantity, lineitem.l_extendedprice, orders.o_custkey FROM (lineitem_102013 lineitem JOIN orders_102016 orders ON ((lineitem.l_orderkey = orders.o_orderkey))) WHERE (orders.o_totalprice > '10'::numeric)"
|
||||
DEBUG: generated sql query for job 1250 and task 18
|
||||
DETAIL: query string: "SELECT lineitem.l_partkey, orders.o_orderkey, lineitem.l_quantity, lineitem.l_extendedprice, orders.o_custkey FROM (lineitem_102014 lineitem JOIN orders_102016 orders ON ((lineitem.l_orderkey = orders.o_orderkey))) WHERE (orders.o_totalprice > '10'::numeric)"
|
||||
DEBUG: assigned task 6 to node localhost:57637
|
||||
DEBUG: assigned task 3 to node localhost:57638
|
||||
DEBUG: assigned task 12 to node localhost:57637
|
||||
DEBUG: assigned task 9 to node localhost:57638
|
||||
DEBUG: assigned task 18 to node localhost:57637
|
||||
DEBUG: assigned task 15 to node localhost:57638
|
||||
DEBUG: join prunable for intervals [1,1000] and [6001,7000]
|
||||
DEBUG: join prunable for intervals [6001,7000] and [1,1000]
|
||||
DEBUG: generated sql query for job 1251 and task 3
|
||||
|
@ -83,10 +83,10 @@ DEBUG: assigned task 3 to node localhost:57637
|
|||
DEBUG: assigned task 6 to node localhost:57638
|
||||
DEBUG: join prunable for intervals [1,1000] and [1001,2000]
|
||||
DEBUG: join prunable for intervals [1,1000] and [6001,7000]
|
||||
DEBUG: join prunable for intervals [1001,2000] and [6001,7000]
|
||||
DEBUG: join prunable for intervals [1001,2000] and [1,1000]
|
||||
DEBUG: join prunable for intervals [6001,7000] and [1001,2000]
|
||||
DEBUG: join prunable for intervals [1001,2000] and [6001,7000]
|
||||
DEBUG: join prunable for intervals [6001,7000] and [1,1000]
|
||||
DEBUG: join prunable for intervals [6001,7000] and [1001,2000]
|
||||
DEBUG: generated sql query for job 1252 and task 3
|
||||
DETAIL: query string: "SELECT "pg_merge_job_1251.task_000007".intermediate_column_1251_0 AS l_partkey, "pg_merge_job_1251.task_000007".intermediate_column_1251_1 AS o_orderkey, count(*) AS count FROM (pg_merge_job_1251.task_000007 "pg_merge_job_1251.task_000007" JOIN customer_102017 customer ON ((customer.c_custkey = "pg_merge_job_1251.task_000007".intermediate_column_1251_4))) WHERE ((("pg_merge_job_1251.task_000007".intermediate_column_1251_2 > 5.0) OR ("pg_merge_job_1251.task_000007".intermediate_column_1251_3 > 1200.0)) AND (customer.c_acctbal < 5000.0)) GROUP BY "pg_merge_job_1251.task_000007".intermediate_column_1251_0, "pg_merge_job_1251.task_000007".intermediate_column_1251_1 ORDER BY "pg_merge_job_1251.task_000007".intermediate_column_1251_0, "pg_merge_job_1251.task_000007".intermediate_column_1251_1, "pg_merge_job_1251.task_000007".intermediate_column_1251_0, "pg_merge_job_1251.task_000007".intermediate_column_1251_1 LIMIT '30'::bigint"
|
||||
DEBUG: generated sql query for job 1252 and task 6
|
||||
|
@ -156,29 +156,29 @@ ORDER BY
|
|||
l_partkey, o_orderkey;
|
||||
DEBUG: StartTransactionCommand
|
||||
DEBUG: generated sql query for job 1253 and task 2
|
||||
DETAIL: query string: "SELECT l_partkey, l_suppkey FROM lineitem_102014 lineitem WHERE (l_quantity < 5.0)"
|
||||
DEBUG: generated sql query for job 1253 and task 4
|
||||
DETAIL: query string: "SELECT l_partkey, l_suppkey FROM lineitem_102013 lineitem WHERE (l_quantity < 5.0)"
|
||||
DEBUG: generated sql query for job 1253 and task 6
|
||||
DETAIL: query string: "SELECT l_partkey, l_suppkey FROM lineitem_102012 lineitem WHERE (l_quantity < 5.0)"
|
||||
DEBUG: generated sql query for job 1253 and task 8
|
||||
DETAIL: query string: "SELECT l_partkey, l_suppkey FROM lineitem_102011 lineitem WHERE (l_quantity < 5.0)"
|
||||
DEBUG: generated sql query for job 1253 and task 10
|
||||
DETAIL: query string: "SELECT l_partkey, l_suppkey FROM lineitem_102010 lineitem WHERE (l_quantity < 5.0)"
|
||||
DEBUG: generated sql query for job 1253 and task 12
|
||||
DETAIL: query string: "SELECT l_partkey, l_suppkey FROM lineitem_102009 lineitem WHERE (l_quantity < 5.0)"
|
||||
DEBUG: assigned task 10 to node localhost:57637
|
||||
DEBUG: assigned task 12 to node localhost:57638
|
||||
DEBUG: assigned task 6 to node localhost:57637
|
||||
DEBUG: assigned task 8 to node localhost:57638
|
||||
DEBUG: assigned task 2 to node localhost:57637
|
||||
DEBUG: assigned task 4 to node localhost:57638
|
||||
DEBUG: generated sql query for job 1253 and task 4
|
||||
DETAIL: query string: "SELECT l_partkey, l_suppkey FROM lineitem_102010 lineitem WHERE (l_quantity < 5.0)"
|
||||
DEBUG: generated sql query for job 1253 and task 6
|
||||
DETAIL: query string: "SELECT l_partkey, l_suppkey FROM lineitem_102011 lineitem WHERE (l_quantity < 5.0)"
|
||||
DEBUG: generated sql query for job 1253 and task 8
|
||||
DETAIL: query string: "SELECT l_partkey, l_suppkey FROM lineitem_102012 lineitem WHERE (l_quantity < 5.0)"
|
||||
DEBUG: generated sql query for job 1253 and task 10
|
||||
DETAIL: query string: "SELECT l_partkey, l_suppkey FROM lineitem_102013 lineitem WHERE (l_quantity < 5.0)"
|
||||
DEBUG: generated sql query for job 1253 and task 12
|
||||
DETAIL: query string: "SELECT l_partkey, l_suppkey FROM lineitem_102014 lineitem WHERE (l_quantity < 5.0)"
|
||||
DEBUG: assigned task 4 to node localhost:57637
|
||||
DEBUG: assigned task 2 to node localhost:57638
|
||||
DEBUG: assigned task 8 to node localhost:57637
|
||||
DEBUG: assigned task 6 to node localhost:57638
|
||||
DEBUG: assigned task 12 to node localhost:57637
|
||||
DEBUG: assigned task 10 to node localhost:57638
|
||||
DEBUG: generated sql query for job 1254 and task 2
|
||||
DETAIL: query string: "SELECT o_orderkey, o_shippriority FROM orders_102016 orders WHERE (o_totalprice <> 4.0)"
|
||||
DEBUG: generated sql query for job 1254 and task 4
|
||||
DETAIL: query string: "SELECT o_orderkey, o_shippriority FROM orders_102015 orders WHERE (o_totalprice <> 4.0)"
|
||||
DEBUG: assigned task 2 to node localhost:57637
|
||||
DEBUG: assigned task 4 to node localhost:57638
|
||||
DEBUG: generated sql query for job 1254 and task 4
|
||||
DETAIL: query string: "SELECT o_orderkey, o_shippriority FROM orders_102016 orders WHERE (o_totalprice <> 4.0)"
|
||||
DEBUG: assigned task 4 to node localhost:57637
|
||||
DEBUG: assigned task 2 to node localhost:57638
|
||||
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
|
||||
|
|
|
@ -45,30 +45,30 @@ ORDER BY
|
|||
LIMIT 30;
|
||||
DEBUG: StartTransactionCommand
|
||||
DEBUG: push down of limit count: 30
|
||||
DEBUG: join prunable for intervals [13921,14947] and [1,5986]
|
||||
DEBUG: join prunable for intervals [11554,13920] and [1,5986]
|
||||
DEBUG: join prunable for intervals [8997,11554] and [1,5986]
|
||||
DEBUG: join prunable for intervals [4965,5986] and [8997,14946]
|
||||
DEBUG: join prunable for intervals [2497,4964] and [8997,14946]
|
||||
DEBUG: join prunable for intervals [1,2496] and [8997,14946]
|
||||
DEBUG: join prunable for intervals [2497,4964] and [8997,14946]
|
||||
DEBUG: join prunable for intervals [4965,5986] and [8997,14946]
|
||||
DEBUG: join prunable for intervals [8997,11554] and [1,5986]
|
||||
DEBUG: join prunable for intervals [11554,13920] and [1,5986]
|
||||
DEBUG: join prunable for intervals [13921,14947] and [1,5986]
|
||||
DEBUG: generated sql query for job 1250 and task 3
|
||||
DETAIL: query string: "SELECT lineitem.l_partkey, orders.o_orderkey, lineitem.l_quantity, lineitem.l_extendedprice, orders.o_custkey FROM (lineitem_102014 lineitem JOIN orders_102016 orders ON ((lineitem.l_orderkey = orders.o_orderkey))) WHERE (orders.o_totalprice > 10::numeric)"
|
||||
DEBUG: generated sql query for job 1250 and task 6
|
||||
DETAIL: query string: "SELECT lineitem.l_partkey, orders.o_orderkey, lineitem.l_quantity, lineitem.l_extendedprice, orders.o_custkey FROM (lineitem_102013 lineitem JOIN orders_102016 orders ON ((lineitem.l_orderkey = orders.o_orderkey))) WHERE (orders.o_totalprice > 10::numeric)"
|
||||
DEBUG: generated sql query for job 1250 and task 9
|
||||
DETAIL: query string: "SELECT lineitem.l_partkey, orders.o_orderkey, lineitem.l_quantity, lineitem.l_extendedprice, orders.o_custkey FROM (lineitem_102012 lineitem JOIN orders_102016 orders ON ((lineitem.l_orderkey = orders.o_orderkey))) WHERE (orders.o_totalprice > 10::numeric)"
|
||||
DEBUG: generated sql query for job 1250 and task 12
|
||||
DETAIL: query string: "SELECT lineitem.l_partkey, orders.o_orderkey, lineitem.l_quantity, lineitem.l_extendedprice, orders.o_custkey FROM (lineitem_102011 lineitem JOIN orders_102015 orders ON ((lineitem.l_orderkey = orders.o_orderkey))) WHERE (orders.o_totalprice > 10::numeric)"
|
||||
DEBUG: generated sql query for job 1250 and task 15
|
||||
DETAIL: query string: "SELECT lineitem.l_partkey, orders.o_orderkey, lineitem.l_quantity, lineitem.l_extendedprice, orders.o_custkey FROM (lineitem_102010 lineitem JOIN orders_102015 orders ON ((lineitem.l_orderkey = orders.o_orderkey))) WHERE (orders.o_totalprice > 10::numeric)"
|
||||
DEBUG: generated sql query for job 1250 and task 18
|
||||
DETAIL: query string: "SELECT lineitem.l_partkey, orders.o_orderkey, lineitem.l_quantity, lineitem.l_extendedprice, orders.o_custkey FROM (lineitem_102009 lineitem JOIN orders_102015 orders ON ((lineitem.l_orderkey = orders.o_orderkey))) WHERE (orders.o_totalprice > 10::numeric)"
|
||||
DEBUG: assigned task 15 to node localhost:57637
|
||||
DEBUG: assigned task 18 to node localhost:57638
|
||||
DEBUG: assigned task 9 to node localhost:57637
|
||||
DEBUG: assigned task 12 to node localhost:57638
|
||||
DEBUG: assigned task 3 to node localhost:57637
|
||||
DEBUG: assigned task 6 to node localhost:57638
|
||||
DEBUG: generated sql query for job 1250 and task 6
|
||||
DETAIL: query string: "SELECT lineitem.l_partkey, orders.o_orderkey, lineitem.l_quantity, lineitem.l_extendedprice, orders.o_custkey FROM (lineitem_102010 lineitem JOIN orders_102015 orders ON ((lineitem.l_orderkey = orders.o_orderkey))) WHERE (orders.o_totalprice > 10::numeric)"
|
||||
DEBUG: generated sql query for job 1250 and task 9
|
||||
DETAIL: query string: "SELECT lineitem.l_partkey, orders.o_orderkey, lineitem.l_quantity, lineitem.l_extendedprice, orders.o_custkey FROM (lineitem_102011 lineitem JOIN orders_102015 orders ON ((lineitem.l_orderkey = orders.o_orderkey))) WHERE (orders.o_totalprice > 10::numeric)"
|
||||
DEBUG: generated sql query for job 1250 and task 12
|
||||
DETAIL: query string: "SELECT lineitem.l_partkey, orders.o_orderkey, lineitem.l_quantity, lineitem.l_extendedprice, orders.o_custkey FROM (lineitem_102012 lineitem JOIN orders_102016 orders ON ((lineitem.l_orderkey = orders.o_orderkey))) WHERE (orders.o_totalprice > 10::numeric)"
|
||||
DEBUG: generated sql query for job 1250 and task 15
|
||||
DETAIL: query string: "SELECT lineitem.l_partkey, orders.o_orderkey, lineitem.l_quantity, lineitem.l_extendedprice, orders.o_custkey FROM (lineitem_102013 lineitem JOIN orders_102016 orders ON ((lineitem.l_orderkey = orders.o_orderkey))) WHERE (orders.o_totalprice > 10::numeric)"
|
||||
DEBUG: generated sql query for job 1250 and task 18
|
||||
DETAIL: query string: "SELECT lineitem.l_partkey, orders.o_orderkey, lineitem.l_quantity, lineitem.l_extendedprice, orders.o_custkey FROM (lineitem_102014 lineitem JOIN orders_102016 orders ON ((lineitem.l_orderkey = orders.o_orderkey))) WHERE (orders.o_totalprice > 10::numeric)"
|
||||
DEBUG: assigned task 6 to node localhost:57637
|
||||
DEBUG: assigned task 3 to node localhost:57638
|
||||
DEBUG: assigned task 12 to node localhost:57637
|
||||
DEBUG: assigned task 9 to node localhost:57638
|
||||
DEBUG: assigned task 18 to node localhost:57637
|
||||
DEBUG: assigned task 15 to node localhost:57638
|
||||
DEBUG: join prunable for intervals [1,1000] and [6001,7000]
|
||||
DEBUG: join prunable for intervals [6001,7000] and [1,1000]
|
||||
DEBUG: generated sql query for job 1251 and task 3
|
||||
|
@ -83,10 +83,10 @@ DEBUG: assigned task 3 to node localhost:57637
|
|||
DEBUG: assigned task 6 to node localhost:57638
|
||||
DEBUG: join prunable for intervals [1,1000] and [1001,2000]
|
||||
DEBUG: join prunable for intervals [1,1000] and [6001,7000]
|
||||
DEBUG: join prunable for intervals [1001,2000] and [6001,7000]
|
||||
DEBUG: join prunable for intervals [1001,2000] and [1,1000]
|
||||
DEBUG: join prunable for intervals [6001,7000] and [1001,2000]
|
||||
DEBUG: join prunable for intervals [1001,2000] and [6001,7000]
|
||||
DEBUG: join prunable for intervals [6001,7000] and [1,1000]
|
||||
DEBUG: join prunable for intervals [6001,7000] and [1001,2000]
|
||||
DEBUG: generated sql query for job 1252 and task 3
|
||||
DETAIL: query string: "SELECT "pg_merge_job_1251.task_000007".intermediate_column_1251_0 AS l_partkey, "pg_merge_job_1251.task_000007".intermediate_column_1251_1 AS o_orderkey, count(*) AS count FROM (pg_merge_job_1251.task_000007 "pg_merge_job_1251.task_000007" JOIN customer_102017 customer ON ((customer.c_custkey = "pg_merge_job_1251.task_000007".intermediate_column_1251_4))) WHERE ((("pg_merge_job_1251.task_000007".intermediate_column_1251_2 > 5.0) OR ("pg_merge_job_1251.task_000007".intermediate_column_1251_3 > 1200.0)) AND (customer.c_acctbal < 5000.0)) GROUP BY "pg_merge_job_1251.task_000007".intermediate_column_1251_0, "pg_merge_job_1251.task_000007".intermediate_column_1251_1 ORDER BY "pg_merge_job_1251.task_000007".intermediate_column_1251_0, "pg_merge_job_1251.task_000007".intermediate_column_1251_1, "pg_merge_job_1251.task_000007".intermediate_column_1251_0, "pg_merge_job_1251.task_000007".intermediate_column_1251_1 LIMIT 30::bigint"
|
||||
DEBUG: generated sql query for job 1252 and task 6
|
||||
|
@ -156,29 +156,29 @@ ORDER BY
|
|||
l_partkey, o_orderkey;
|
||||
DEBUG: StartTransactionCommand
|
||||
DEBUG: generated sql query for job 1253 and task 2
|
||||
DETAIL: query string: "SELECT l_partkey, l_suppkey FROM lineitem_102014 lineitem WHERE (l_quantity < 5.0)"
|
||||
DEBUG: generated sql query for job 1253 and task 4
|
||||
DETAIL: query string: "SELECT l_partkey, l_suppkey FROM lineitem_102013 lineitem WHERE (l_quantity < 5.0)"
|
||||
DEBUG: generated sql query for job 1253 and task 6
|
||||
DETAIL: query string: "SELECT l_partkey, l_suppkey FROM lineitem_102012 lineitem WHERE (l_quantity < 5.0)"
|
||||
DEBUG: generated sql query for job 1253 and task 8
|
||||
DETAIL: query string: "SELECT l_partkey, l_suppkey FROM lineitem_102011 lineitem WHERE (l_quantity < 5.0)"
|
||||
DEBUG: generated sql query for job 1253 and task 10
|
||||
DETAIL: query string: "SELECT l_partkey, l_suppkey FROM lineitem_102010 lineitem WHERE (l_quantity < 5.0)"
|
||||
DEBUG: generated sql query for job 1253 and task 12
|
||||
DETAIL: query string: "SELECT l_partkey, l_suppkey FROM lineitem_102009 lineitem WHERE (l_quantity < 5.0)"
|
||||
DEBUG: assigned task 10 to node localhost:57637
|
||||
DEBUG: assigned task 12 to node localhost:57638
|
||||
DEBUG: assigned task 6 to node localhost:57637
|
||||
DEBUG: assigned task 8 to node localhost:57638
|
||||
DEBUG: assigned task 2 to node localhost:57637
|
||||
DEBUG: assigned task 4 to node localhost:57638
|
||||
DEBUG: generated sql query for job 1253 and task 4
|
||||
DETAIL: query string: "SELECT l_partkey, l_suppkey FROM lineitem_102010 lineitem WHERE (l_quantity < 5.0)"
|
||||
DEBUG: generated sql query for job 1253 and task 6
|
||||
DETAIL: query string: "SELECT l_partkey, l_suppkey FROM lineitem_102011 lineitem WHERE (l_quantity < 5.0)"
|
||||
DEBUG: generated sql query for job 1253 and task 8
|
||||
DETAIL: query string: "SELECT l_partkey, l_suppkey FROM lineitem_102012 lineitem WHERE (l_quantity < 5.0)"
|
||||
DEBUG: generated sql query for job 1253 and task 10
|
||||
DETAIL: query string: "SELECT l_partkey, l_suppkey FROM lineitem_102013 lineitem WHERE (l_quantity < 5.0)"
|
||||
DEBUG: generated sql query for job 1253 and task 12
|
||||
DETAIL: query string: "SELECT l_partkey, l_suppkey FROM lineitem_102014 lineitem WHERE (l_quantity < 5.0)"
|
||||
DEBUG: assigned task 4 to node localhost:57637
|
||||
DEBUG: assigned task 2 to node localhost:57638
|
||||
DEBUG: assigned task 8 to node localhost:57637
|
||||
DEBUG: assigned task 6 to node localhost:57638
|
||||
DEBUG: assigned task 12 to node localhost:57637
|
||||
DEBUG: assigned task 10 to node localhost:57638
|
||||
DEBUG: generated sql query for job 1254 and task 2
|
||||
DETAIL: query string: "SELECT o_orderkey, o_shippriority FROM orders_102016 orders WHERE (o_totalprice <> 4.0)"
|
||||
DEBUG: generated sql query for job 1254 and task 4
|
||||
DETAIL: query string: "SELECT o_orderkey, o_shippriority FROM orders_102015 orders WHERE (o_totalprice <> 4.0)"
|
||||
DEBUG: assigned task 2 to node localhost:57637
|
||||
DEBUG: assigned task 4 to node localhost:57638
|
||||
DEBUG: generated sql query for job 1254 and task 4
|
||||
DETAIL: query string: "SELECT o_orderkey, o_shippriority FROM orders_102016 orders WHERE (o_totalprice <> 4.0)"
|
||||
DEBUG: assigned task 4 to node localhost:57637
|
||||
DEBUG: assigned task 2 to node localhost:57638
|
||||
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
|
||||
|
|
|
@ -16,10 +16,10 @@ WHERE
|
|||
o_custkey = c_custkey;
|
||||
DEBUG: join prunable for intervals [1,1000] and [1001,2000]
|
||||
DEBUG: join prunable for intervals [1,1000] and [6001,7000]
|
||||
DEBUG: join prunable for intervals [1001,2000] and [6001,7000]
|
||||
DEBUG: join prunable for intervals [1001,2000] and [1,1000]
|
||||
DEBUG: join prunable for intervals [6001,7000] and [1001,2000]
|
||||
DEBUG: join prunable for intervals [1001,2000] and [6001,7000]
|
||||
DEBUG: join prunable for intervals [6001,7000] and [1,1000]
|
||||
DEBUG: join prunable for intervals [6001,7000] and [1001,2000]
|
||||
DEBUG: pruning merge fetch taskId 1
|
||||
DETAIL: Creating dependency on merge taskId 5
|
||||
DEBUG: pruning merge fetch taskId 4
|
||||
|
@ -40,8 +40,8 @@ FROM
|
|||
WHERE
|
||||
o_custkey = c_custkey AND
|
||||
o_orderkey < 0;
|
||||
DEBUG: predicate pruning for shardId 102016
|
||||
DEBUG: predicate pruning for shardId 102015
|
||||
DEBUG: predicate pruning for shardId 102016
|
||||
count
|
||||
-------
|
||||
|
||||
|
@ -56,9 +56,9 @@ FROM
|
|||
WHERE
|
||||
o_custkey = c_custkey AND
|
||||
c_custkey < 0;
|
||||
DEBUG: predicate pruning for shardId 102017
|
||||
DEBUG: predicate pruning for shardId 102034
|
||||
DEBUG: predicate pruning for shardId 102033
|
||||
DEBUG: predicate pruning for shardId 102017
|
||||
count
|
||||
-------
|
||||
|
||||
|
@ -115,12 +115,12 @@ FROM
|
|||
WHERE
|
||||
l_partkey = c_nationkey AND
|
||||
l_orderkey < 0;
|
||||
DEBUG: predicate pruning for shardId 102014
|
||||
DEBUG: predicate pruning for shardId 102013
|
||||
DEBUG: predicate pruning for shardId 102012
|
||||
DEBUG: predicate pruning for shardId 102011
|
||||
DEBUG: predicate pruning for shardId 102010
|
||||
DEBUG: predicate pruning for shardId 102009
|
||||
DEBUG: predicate pruning for shardId 102010
|
||||
DEBUG: predicate pruning for shardId 102011
|
||||
DEBUG: predicate pruning for shardId 102012
|
||||
DEBUG: predicate pruning for shardId 102013
|
||||
DEBUG: predicate pruning for shardId 102014
|
||||
count
|
||||
-------
|
||||
|
||||
|
|
|
@ -25,14 +25,14 @@ FROM
|
|||
WHERE
|
||||
o_custkey = c_custkey;
|
||||
DEBUG: StartTransactionCommand
|
||||
DEBUG: assigned task 2 to node localhost:57637
|
||||
DEBUG: assigned task 4 to node localhost:57638
|
||||
DEBUG: assigned task 4 to node localhost:57637
|
||||
DEBUG: assigned task 2 to node localhost:57638
|
||||
DEBUG: join prunable for intervals [1,1000] and [1001,2000]
|
||||
DEBUG: join prunable for intervals [1,1000] and [6001,7000]
|
||||
DEBUG: join prunable for intervals [1001,2000] and [6001,7000]
|
||||
DEBUG: join prunable for intervals [1001,2000] and [1,1000]
|
||||
DEBUG: join prunable for intervals [6001,7000] and [1001,2000]
|
||||
DEBUG: join prunable for intervals [1001,2000] and [6001,7000]
|
||||
DEBUG: join prunable for intervals [6001,7000] and [1,1000]
|
||||
DEBUG: join prunable for intervals [6001,7000] and [1001,2000]
|
||||
DEBUG: pruning merge fetch taskId 1
|
||||
DETAIL: Creating dependency on merge taskId 5
|
||||
DEBUG: pruning merge fetch taskId 4
|
||||
|
@ -64,40 +64,40 @@ WHERE
|
|||
o_custkey = c_custkey AND
|
||||
o_orderkey = l_orderkey;
|
||||
DEBUG: StartTransactionCommand
|
||||
DEBUG: assigned task 3 to node localhost:57637
|
||||
DEBUG: assigned task 15 to node localhost:57638
|
||||
DEBUG: assigned task 6 to node localhost:57637
|
||||
DEBUG: assigned task 18 to node localhost:57638
|
||||
DEBUG: assigned task 9 to node localhost:57637
|
||||
DEBUG: assigned task 12 to node localhost:57638
|
||||
DEBUG: join prunable for intervals [1,2496] and [13921,14947]
|
||||
DEBUG: join prunable for intervals [1,2496] and [11554,13920]
|
||||
DEBUG: join prunable for intervals [1,2496] and [8997,11554]
|
||||
DEBUG: join prunable for intervals [1,2496] and [4965,5986]
|
||||
DEBUG: assigned task 3 to node localhost:57638
|
||||
DEBUG: assigned task 12 to node localhost:57637
|
||||
DEBUG: assigned task 6 to node localhost:57638
|
||||
DEBUG: assigned task 15 to node localhost:57637
|
||||
DEBUG: assigned task 18 to node localhost:57638
|
||||
DEBUG: join prunable for intervals [1,2496] and [2497,4964]
|
||||
DEBUG: join prunable for intervals [2497,4964] and [13921,14947]
|
||||
DEBUG: join prunable for intervals [2497,4964] and [11554,13920]
|
||||
DEBUG: join prunable for intervals [2497,4964] and [8997,11554]
|
||||
DEBUG: join prunable for intervals [2497,4964] and [4965,5986]
|
||||
DEBUG: join prunable for intervals [1,2496] and [4965,5986]
|
||||
DEBUG: join prunable for intervals [1,2496] and [8997,11554]
|
||||
DEBUG: join prunable for intervals [1,2496] and [11554,13920]
|
||||
DEBUG: join prunable for intervals [1,2496] and [13921,14947]
|
||||
DEBUG: join prunable for intervals [2497,4964] and [1,2496]
|
||||
DEBUG: join prunable for intervals [4965,5986] and [13921,14947]
|
||||
DEBUG: join prunable for intervals [4965,5986] and [11554,13920]
|
||||
DEBUG: join prunable for intervals [4965,5986] and [8997,11554]
|
||||
DEBUG: join prunable for intervals [4965,5986] and [2497,4964]
|
||||
DEBUG: join prunable for intervals [2497,4964] and [4965,5986]
|
||||
DEBUG: join prunable for intervals [2497,4964] and [8997,11554]
|
||||
DEBUG: join prunable for intervals [2497,4964] and [11554,13920]
|
||||
DEBUG: join prunable for intervals [2497,4964] and [13921,14947]
|
||||
DEBUG: join prunable for intervals [4965,5986] and [1,2496]
|
||||
DEBUG: join prunable for intervals [8997,11554] and [13921,14947]
|
||||
DEBUG: join prunable for intervals [8997,11554] and [4965,5986]
|
||||
DEBUG: join prunable for intervals [8997,11554] and [2497,4964]
|
||||
DEBUG: join prunable for intervals [4965,5986] and [2497,4964]
|
||||
DEBUG: join prunable for intervals [4965,5986] and [8997,11554]
|
||||
DEBUG: join prunable for intervals [4965,5986] and [11554,13920]
|
||||
DEBUG: join prunable for intervals [4965,5986] and [13921,14947]
|
||||
DEBUG: join prunable for intervals [8997,11554] and [1,2496]
|
||||
DEBUG: join prunable for intervals [11554,13920] and [13921,14947]
|
||||
DEBUG: join prunable for intervals [11554,13920] and [4965,5986]
|
||||
DEBUG: join prunable for intervals [11554,13920] and [2497,4964]
|
||||
DEBUG: join prunable for intervals [8997,11554] and [2497,4964]
|
||||
DEBUG: join prunable for intervals [8997,11554] and [4965,5986]
|
||||
DEBUG: join prunable for intervals [8997,11554] and [13921,14947]
|
||||
DEBUG: join prunable for intervals [11554,13920] and [1,2496]
|
||||
DEBUG: join prunable for intervals [13921,14947] and [11554,13920]
|
||||
DEBUG: join prunable for intervals [13921,14947] and [8997,11554]
|
||||
DEBUG: join prunable for intervals [13921,14947] and [4965,5986]
|
||||
DEBUG: join prunable for intervals [13921,14947] and [2497,4964]
|
||||
DEBUG: join prunable for intervals [11554,13920] and [2497,4964]
|
||||
DEBUG: join prunable for intervals [11554,13920] and [4965,5986]
|
||||
DEBUG: join prunable for intervals [11554,13920] and [13921,14947]
|
||||
DEBUG: join prunable for intervals [13921,14947] and [1,2496]
|
||||
DEBUG: join prunable for intervals [13921,14947] and [2497,4964]
|
||||
DEBUG: join prunable for intervals [13921,14947] and [4965,5986]
|
||||
DEBUG: join prunable for intervals [13921,14947] and [8997,11554]
|
||||
DEBUG: join prunable for intervals [13921,14947] and [11554,13920]
|
||||
DEBUG: pruning merge fetch taskId 1
|
||||
DETAIL: Creating dependency on merge taskId 19
|
||||
DEBUG: pruning merge fetch taskId 4
|
||||
|
@ -116,10 +116,10 @@ DEBUG: pruning merge fetch taskId 22
|
|||
DETAIL: Creating dependency on merge taskId 54
|
||||
DEBUG: assigned task 6 to node localhost:57637
|
||||
DEBUG: assigned task 3 to node localhost:57638
|
||||
DEBUG: assigned task 24 to node localhost:57637
|
||||
DEBUG: assigned task 9 to node localhost:57638
|
||||
DEBUG: assigned task 12 to node localhost:57637
|
||||
DEBUG: assigned task 18 to node localhost:57638
|
||||
DEBUG: assigned task 9 to node localhost:57638
|
||||
DEBUG: assigned task 18 to node localhost:57637
|
||||
DEBUG: assigned task 24 to node localhost:57638
|
||||
DEBUG: propagating assignment from merge task 40 to constrained sql task 15
|
||||
DEBUG: propagating assignment from merge task 47 to constrained sql task 21
|
||||
DEBUG: CommitTransactionCommand
|
||||
|
@ -154,15 +154,15 @@ FROM
|
|||
WHERE
|
||||
l_partkey = c_nationkey;
|
||||
DEBUG: StartTransactionCommand
|
||||
DEBUG: assigned task 10 to node localhost:57637
|
||||
DEBUG: assigned task 12 to node localhost:57638
|
||||
DEBUG: assigned task 6 to node localhost:57637
|
||||
DEBUG: assigned task 8 to node localhost:57638
|
||||
DEBUG: assigned task 2 to node localhost:57637
|
||||
DEBUG: assigned task 4 to node localhost:57638
|
||||
DEBUG: assigned task 2 to node localhost:57637
|
||||
DEBUG: assigned task 6 to node localhost:57638
|
||||
DEBUG: assigned task 4 to node localhost:57637
|
||||
DEBUG: assigned task 2 to node localhost:57638
|
||||
DEBUG: assigned task 8 to node localhost:57637
|
||||
DEBUG: assigned task 6 to node localhost:57638
|
||||
DEBUG: assigned task 12 to node localhost:57637
|
||||
DEBUG: assigned task 10 to node localhost:57638
|
||||
DEBUG: assigned task 4 to node localhost:57637
|
||||
DEBUG: assigned task 2 to node localhost:57638
|
||||
DEBUG: assigned task 6 to node localhost:57637
|
||||
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
|
||||
|
|
|
@ -20,11 +20,11 @@ SELECT shardminvalue, shardmaxvalue from pg_dist_shard WHERE shardid = 102010;
|
|||
|
||||
-- Check that partition and join pruning works when min/max values exist
|
||||
SELECT l_orderkey, l_linenumber, l_shipdate FROM lineitem WHERE l_orderkey = 9030;
|
||||
DEBUG: predicate pruning for shardId 102014
|
||||
DEBUG: predicate pruning for shardId 102013
|
||||
DEBUG: predicate pruning for shardId 102011
|
||||
DEBUG: predicate pruning for shardId 102010
|
||||
DEBUG: predicate pruning for shardId 102009
|
||||
DEBUG: predicate pruning for shardId 102010
|
||||
DEBUG: predicate pruning for shardId 102011
|
||||
DEBUG: predicate pruning for shardId 102013
|
||||
DEBUG: predicate pruning for shardId 102014
|
||||
l_orderkey | l_linenumber | l_shipdate
|
||||
------------+--------------+------------
|
||||
9030 | 1 | 09-02-1998
|
||||
|
@ -37,12 +37,12 @@ DEBUG: predicate pruning for shardId 102009
|
|||
|
||||
SELECT sum(l_linenumber), avg(l_linenumber) FROM lineitem, orders
|
||||
WHERE l_orderkey = o_orderkey;
|
||||
DEBUG: join prunable for intervals [13921,14947] and [1,5986]
|
||||
DEBUG: join prunable for intervals [11554,13920] and [1,5986]
|
||||
DEBUG: join prunable for intervals [8997,11554] and [1,5986]
|
||||
DEBUG: join prunable for intervals [4965,5986] and [8997,14946]
|
||||
DEBUG: join prunable for intervals [2497,4964] and [8997,14946]
|
||||
DEBUG: join prunable for intervals [1,2496] and [8997,14946]
|
||||
DEBUG: join prunable for intervals [2497,4964] and [8997,14946]
|
||||
DEBUG: join prunable for intervals [4965,5986] and [8997,14946]
|
||||
DEBUG: join prunable for intervals [8997,11554] and [1,5986]
|
||||
DEBUG: join prunable for intervals [11554,13920] and [1,5986]
|
||||
DEBUG: join prunable for intervals [13921,14947] and [1,5986]
|
||||
sum | avg
|
||||
-------+--------------------
|
||||
36086 | 3.0076679446574429
|
||||
|
@ -52,10 +52,10 @@ DEBUG: join prunable for intervals [1,2496] and [8997,14946]
|
|||
-- partition or join pruning for the shard with null min value.
|
||||
UPDATE pg_dist_shard SET shardminvalue = NULL WHERE shardid = 102009;
|
||||
SELECT l_orderkey, l_linenumber, l_shipdate FROM lineitem WHERE l_orderkey = 9030;
|
||||
DEBUG: predicate pruning for shardId 102014
|
||||
DEBUG: predicate pruning for shardId 102013
|
||||
DEBUG: predicate pruning for shardId 102011
|
||||
DEBUG: predicate pruning for shardId 102010
|
||||
DEBUG: predicate pruning for shardId 102011
|
||||
DEBUG: predicate pruning for shardId 102013
|
||||
DEBUG: predicate pruning for shardId 102014
|
||||
l_orderkey | l_linenumber | l_shipdate
|
||||
------------+--------------+------------
|
||||
9030 | 1 | 09-02-1998
|
||||
|
@ -68,11 +68,11 @@ DEBUG: predicate pruning for shardId 102010
|
|||
|
||||
SELECT sum(l_linenumber), avg(l_linenumber) FROM lineitem, orders
|
||||
WHERE l_orderkey = o_orderkey;
|
||||
DEBUG: join prunable for intervals [13921,14947] and [1,5986]
|
||||
DEBUG: join prunable for intervals [11554,13920] and [1,5986]
|
||||
DEBUG: join prunable for intervals [8997,11554] and [1,5986]
|
||||
DEBUG: join prunable for intervals [4965,5986] and [8997,14946]
|
||||
DEBUG: join prunable for intervals [2497,4964] and [8997,14946]
|
||||
DEBUG: join prunable for intervals [4965,5986] and [8997,14946]
|
||||
DEBUG: join prunable for intervals [8997,11554] and [1,5986]
|
||||
DEBUG: join prunable for intervals [11554,13920] and [1,5986]
|
||||
DEBUG: join prunable for intervals [13921,14947] and [1,5986]
|
||||
sum | avg
|
||||
-------+--------------------
|
||||
36086 | 3.0076679446574429
|
||||
|
@ -82,9 +82,9 @@ DEBUG: join prunable for intervals [2497,4964] and [8997,14946]
|
|||
-- don't apply partition or join pruning for this other shard either.
|
||||
UPDATE pg_dist_shard SET shardmaxvalue = NULL WHERE shardid = 102010;
|
||||
SELECT l_orderkey, l_linenumber, l_shipdate FROM lineitem WHERE l_orderkey = 9030;
|
||||
DEBUG: predicate pruning for shardId 102014
|
||||
DEBUG: predicate pruning for shardId 102013
|
||||
DEBUG: predicate pruning for shardId 102011
|
||||
DEBUG: predicate pruning for shardId 102013
|
||||
DEBUG: predicate pruning for shardId 102014
|
||||
l_orderkey | l_linenumber | l_shipdate
|
||||
------------+--------------+------------
|
||||
9030 | 1 | 09-02-1998
|
||||
|
@ -97,10 +97,10 @@ DEBUG: predicate pruning for shardId 102011
|
|||
|
||||
SELECT sum(l_linenumber), avg(l_linenumber) FROM lineitem, orders
|
||||
WHERE l_orderkey = o_orderkey;
|
||||
DEBUG: join prunable for intervals [13921,14947] and [1,5986]
|
||||
DEBUG: join prunable for intervals [11554,13920] and [1,5986]
|
||||
DEBUG: join prunable for intervals [8997,11554] and [1,5986]
|
||||
DEBUG: join prunable for intervals [4965,5986] and [8997,14946]
|
||||
DEBUG: join prunable for intervals [8997,11554] and [1,5986]
|
||||
DEBUG: join prunable for intervals [11554,13920] and [1,5986]
|
||||
DEBUG: join prunable for intervals [13921,14947] and [1,5986]
|
||||
sum | avg
|
||||
-------+--------------------
|
||||
36086 | 3.0076679446574429
|
||||
|
@ -110,10 +110,10 @@ DEBUG: join prunable for intervals [4965,5986] and [8997,14946]
|
|||
-- should apply partition and join pruning for this shard now.
|
||||
UPDATE pg_dist_shard SET shardminvalue = '0' WHERE shardid = 102009;
|
||||
SELECT l_orderkey, l_linenumber, l_shipdate FROM lineitem WHERE l_orderkey = 9030;
|
||||
DEBUG: predicate pruning for shardId 102014
|
||||
DEBUG: predicate pruning for shardId 102013
|
||||
DEBUG: predicate pruning for shardId 102011
|
||||
DEBUG: predicate pruning for shardId 102009
|
||||
DEBUG: predicate pruning for shardId 102011
|
||||
DEBUG: predicate pruning for shardId 102013
|
||||
DEBUG: predicate pruning for shardId 102014
|
||||
l_orderkey | l_linenumber | l_shipdate
|
||||
------------+--------------+------------
|
||||
9030 | 1 | 09-02-1998
|
||||
|
@ -126,11 +126,11 @@ DEBUG: predicate pruning for shardId 102009
|
|||
|
||||
SELECT sum(l_linenumber), avg(l_linenumber) FROM lineitem, orders
|
||||
WHERE l_orderkey = o_orderkey;
|
||||
DEBUG: join prunable for intervals [13921,14947] and [1,5986]
|
||||
DEBUG: join prunable for intervals [11554,13920] and [1,5986]
|
||||
DEBUG: join prunable for intervals [8997,11554] and [1,5986]
|
||||
DEBUG: join prunable for intervals [4965,5986] and [8997,14946]
|
||||
DEBUG: join prunable for intervals [0,2496] and [8997,14946]
|
||||
DEBUG: join prunable for intervals [4965,5986] and [8997,14946]
|
||||
DEBUG: join prunable for intervals [8997,11554] and [1,5986]
|
||||
DEBUG: join prunable for intervals [11554,13920] and [1,5986]
|
||||
DEBUG: join prunable for intervals [13921,14947] and [1,5986]
|
||||
sum | avg
|
||||
-------+--------------------
|
||||
36086 | 3.0076679446574429
|
||||
|
|
|
@ -5,11 +5,11 @@
|
|||
-- need to increase the logging verbosity of messages displayed on the client.
|
||||
SET client_min_messages TO DEBUG2;
|
||||
SELECT l_orderkey, l_linenumber, l_shipdate FROM lineitem WHERE l_orderkey = 9030;
|
||||
DEBUG: predicate pruning for shardId 102014
|
||||
DEBUG: predicate pruning for shardId 102013
|
||||
DEBUG: predicate pruning for shardId 102011
|
||||
DEBUG: predicate pruning for shardId 102010
|
||||
DEBUG: predicate pruning for shardId 102009
|
||||
DEBUG: predicate pruning for shardId 102010
|
||||
DEBUG: predicate pruning for shardId 102011
|
||||
DEBUG: predicate pruning for shardId 102013
|
||||
DEBUG: predicate pruning for shardId 102014
|
||||
l_orderkey | l_linenumber | l_shipdate
|
||||
------------+--------------+------------
|
||||
9030 | 1 | 09-02-1998
|
||||
|
@ -26,9 +26,9 @@ DEBUG: predicate pruning for shardId 102009
|
|||
-- 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 102011
|
||||
DEBUG: predicate pruning for shardId 102010
|
||||
DEBUG: predicate pruning for shardId 102009
|
||||
DEBUG: predicate pruning for shardId 102010
|
||||
DEBUG: predicate pruning for shardId 102011
|
||||
sum | avg
|
||||
-------+--------------------
|
||||
17999 | 3.0189533713518953
|
||||
|
@ -44,12 +44,12 @@ DEBUG: predicate pruning for shardId 102011
|
|||
|
||||
-- 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 102014
|
||||
DEBUG: predicate pruning for shardId 102013
|
||||
DEBUG: predicate pruning for shardId 102012
|
||||
DEBUG: predicate pruning for shardId 102011
|
||||
DEBUG: predicate pruning for shardId 102010
|
||||
DEBUG: predicate pruning for shardId 102009
|
||||
DEBUG: predicate pruning for shardId 102010
|
||||
DEBUG: predicate pruning for shardId 102011
|
||||
DEBUG: predicate pruning for shardId 102012
|
||||
DEBUG: predicate pruning for shardId 102013
|
||||
DEBUG: predicate pruning for shardId 102014
|
||||
sum | avg
|
||||
-----+-----
|
||||
|
|
||||
|
|
|
@ -40,7 +40,7 @@ VALUES
|
|||
SELECT prune_using_no_values('pruning');
|
||||
prune_using_no_values
|
||||
-----------------------
|
||||
{13,12,11,10}
|
||||
{10,11,12,13}
|
||||
(1 row)
|
||||
|
||||
-- with a single value, expect a single shard
|
||||
|
@ -61,7 +61,7 @@ SELECT prune_using_single_value('pruning', NULL);
|
|||
SELECT prune_using_either_value('pruning', 'tomato', 'petunia');
|
||||
prune_using_either_value
|
||||
--------------------------
|
||||
{12,11}
|
||||
{11,12}
|
||||
(1 row)
|
||||
|
||||
-- an AND clause with incompatible values returns no shards
|
||||
|
|
|
@ -260,8 +260,8 @@ ALTER TABLE IF EXISTS non_existent_table ADD COLUMN new_column INTEGER;
|
|||
NOTICE: relation "non_existent_table" does not exist, skipping
|
||||
ALTER TABLE IF EXISTS lineitem_alter ALTER COLUMN int_column2 SET DATA TYPE INTEGER;
|
||||
ALTER TABLE lineitem_alter DROP COLUMN non_existent_column;
|
||||
WARNING: could not receive query results from localhost:57637
|
||||
DETAIL: Client error: column "non_existent_column" of relation "lineitem_alter_103009" does not exist
|
||||
WARNING: could not receive query results from localhost:57638
|
||||
DETAIL: Client error: column "non_existent_column" of relation "lineitem_alter_103000" does not exist
|
||||
ERROR: could not execute DDL command on worker node shards
|
||||
ALTER TABLE lineitem_alter DROP COLUMN IF EXISTS non_existent_column;
|
||||
NOTICE: column "non_existent_column" of relation "lineitem_alter" does not exist, skipping
|
||||
|
@ -360,15 +360,15 @@ DETAIL: Only ADD|DROP COLUMN, SET|DROP NOT NULL, SET|DROP DEFAULT and TYPE subc
|
|||
-- Verify that we error out in case of postgres errors on supported statement
|
||||
-- types
|
||||
ALTER TABLE lineitem_alter ADD COLUMN new_column non_existent_type;
|
||||
WARNING: could not receive query results from localhost:57637
|
||||
WARNING: could not receive query results from localhost:57638
|
||||
DETAIL: Client error: type "non_existent_type" does not exist
|
||||
ERROR: could not execute DDL command on worker node shards
|
||||
ALTER TABLE lineitem_alter ALTER COLUMN null_column SET NOT NULL;
|
||||
WARNING: could not receive query results from localhost:57637
|
||||
WARNING: could not receive query results from localhost:57638
|
||||
DETAIL: Client error: column "null_column" contains null values
|
||||
ERROR: could not execute DDL command on worker node shards
|
||||
ALTER TABLE lineitem_alter ALTER COLUMN l_partkey SET DEFAULT 'a';
|
||||
WARNING: could not receive query results from localhost:57637
|
||||
WARNING: could not receive query results from localhost:57638
|
||||
DETAIL: Client error: invalid input syntax for integer: "a"
|
||||
ERROR: could not execute DDL command on worker node shards
|
||||
-- Verify that we error out on statements involving RENAME
|
||||
|
|
Loading…
Reference in New Issue