mirror of https://github.com/citusdata/citus.git
Merge 9d3cbfc2d4
into 5184fc1d92
commit
2a61d7c11c
|
@ -107,7 +107,8 @@ static bool RouterSelectQuery(Query *originalQuery,
|
||||||
List **relationShardList, bool replacePrunedQueryWithDummy);
|
List **relationShardList, bool replacePrunedQueryWithDummy);
|
||||||
static bool RelationPrunesToMultipleShards(List *relationShardList);
|
static bool RelationPrunesToMultipleShards(List *relationShardList);
|
||||||
static List * TargetShardIntervalsForSelect(Query *query,
|
static List * TargetShardIntervalsForSelect(Query *query,
|
||||||
RelationRestrictionContext *restrictionContext);
|
RelationRestrictionContext *restrictionContext,
|
||||||
|
bool continueOnManyShards);
|
||||||
static List * WorkersContainingAllShards(List *prunedShardIntervalsList);
|
static List * WorkersContainingAllShards(List *prunedShardIntervalsList);
|
||||||
static List * IntersectPlacementList(List *lhsPlacementList, List *rhsPlacementList);
|
static List * IntersectPlacementList(List *lhsPlacementList, List *rhsPlacementList);
|
||||||
static Job * RouterQueryJob(Query *query, Task *task, List *placementList);
|
static Job * RouterQueryJob(Query *query, Task *task, List *placementList);
|
||||||
|
@ -214,12 +215,35 @@ CreateSingleTaskRouterPlan(Query *originalQuery, Query *query,
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
ListCell *restrictionCell = NULL;
|
||||||
|
|
||||||
/* FIXME: this should probably rather be inlined into CreateSelectPlan */
|
/* FIXME: this should probably rather be inlined into CreateSelectPlan */
|
||||||
multiPlan->planningError = ErrorIfQueryHasModifyingCTE(query);
|
multiPlan->planningError = ErrorIfQueryHasModifyingCTE(query);
|
||||||
if (multiPlan->planningError)
|
if (multiPlan->planningError)
|
||||||
{
|
{
|
||||||
return multiPlan;
|
return multiPlan;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
foreach(restrictionCell, restrictionContext->relationRestrictionList)
|
||||||
|
{
|
||||||
|
RelationRestriction *relationRestriction =
|
||||||
|
(RelationRestriction *) lfirst(restrictionCell);
|
||||||
|
List *shardIntervalList = NIL;
|
||||||
|
Oid relationId = relationRestriction->relationId;
|
||||||
|
DistTableCacheEntry *cacheEntry = DistributedTableCacheEntry(relationId);
|
||||||
|
int shardIndex = 0;
|
||||||
|
int shardCount = cacheEntry->shardIntervalArrayLength;
|
||||||
|
|
||||||
|
for (shardIndex = 0; shardIndex < shardCount; shardIndex++)
|
||||||
|
{
|
||||||
|
ShardInterval *shardInterval =
|
||||||
|
cacheEntry->sortedShardIntervalArray[shardIndex];
|
||||||
|
shardIntervalList = lappend(shardIntervalList, shardInterval);
|
||||||
|
}
|
||||||
|
|
||||||
|
relationRestriction->inputShardIntervalList = shardIntervalList;
|
||||||
|
}
|
||||||
|
|
||||||
task = RouterSelectTask(originalQuery, restrictionContext, &placementList);
|
task = RouterSelectTask(originalQuery, restrictionContext, &placementList);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -263,6 +287,12 @@ CreateInsertSelectRouterPlan(Query *originalQuery,
|
||||||
DistTableCacheEntry *targetCacheEntry = DistributedTableCacheEntry(targetRelationId);
|
DistTableCacheEntry *targetCacheEntry = DistributedTableCacheEntry(targetRelationId);
|
||||||
int shardCount = targetCacheEntry->shardIntervalArrayLength;
|
int shardCount = targetCacheEntry->shardIntervalArrayLength;
|
||||||
bool allReferenceTables = restrictionContext->allReferenceTables;
|
bool allReferenceTables = restrictionContext->allReferenceTables;
|
||||||
|
ListCell *restrictionCell = NULL;
|
||||||
|
List *prunedRelationShardList = NIL;
|
||||||
|
ListCell *relationShardCell = NULL;
|
||||||
|
int prunedShardIndex = 0;
|
||||||
|
bool continueOnManyShards = true;
|
||||||
|
List *sampleRelationShardList = NIL;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Error semantics for INSERT ... SELECT queries are different than regular
|
* Error semantics for INSERT ... SELECT queries are different than regular
|
||||||
|
@ -276,6 +306,62 @@ CreateInsertSelectRouterPlan(Query *originalQuery,
|
||||||
return multiPlan;
|
return multiPlan;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* firstly set inputShardInterval to all shard intervals per relation */
|
||||||
|
foreach(restrictionCell, restrictionContext->relationRestrictionList)
|
||||||
|
{
|
||||||
|
RelationRestriction *relationRestriction =
|
||||||
|
(RelationRestriction *) lfirst(restrictionCell);
|
||||||
|
List *shardIntervalList = NIL;
|
||||||
|
Oid relationId = relationRestriction->relationId;
|
||||||
|
DistTableCacheEntry *cacheEntry = DistributedTableCacheEntry(relationId);
|
||||||
|
int shardIndex = 0;
|
||||||
|
int shardCount = cacheEntry->shardIntervalArrayLength;
|
||||||
|
|
||||||
|
for (shardIndex = 0; shardIndex < shardCount; shardIndex++)
|
||||||
|
{
|
||||||
|
ShardInterval *shardInterval =
|
||||||
|
cacheEntry->sortedShardIntervalArray[shardIndex];
|
||||||
|
shardIntervalList = lappend(shardIntervalList, shardInterval);
|
||||||
|
}
|
||||||
|
|
||||||
|
relationRestriction->inputShardIntervalList = shardIntervalList;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* do a single shard pruning on the relations and restrictions */
|
||||||
|
continueOnManyShards = true;
|
||||||
|
prunedRelationShardList = TargetShardIntervalsForSelect(subqueryRte->subquery,
|
||||||
|
restrictionContext,
|
||||||
|
continueOnManyShards);
|
||||||
|
|
||||||
|
/* now, set the input shard intervals according to the above shard pruning */
|
||||||
|
forboth(restrictionCell, restrictionContext->relationRestrictionList,
|
||||||
|
relationShardCell, prunedRelationShardList)
|
||||||
|
{
|
||||||
|
RelationRestriction *relationRestriction =
|
||||||
|
(RelationRestriction *) lfirst(restrictionCell);
|
||||||
|
List *shardIntervalList = (List *) lfirst(relationShardCell);
|
||||||
|
|
||||||
|
relationRestriction->inputShardIntervalList = shardIntervalList;
|
||||||
|
|
||||||
|
|
||||||
|
if (sampleRelationShardList == NIL)
|
||||||
|
{
|
||||||
|
if (PartitionMethod(relationRestriction->relationId) != DISTRIBUTE_BY_NONE)
|
||||||
|
{
|
||||||
|
sampleRelationShardList = shardIntervalList;
|
||||||
|
}
|
||||||
|
else if (restrictionContext->allReferenceTables)
|
||||||
|
{
|
||||||
|
sampleRelationShardList = shardIntervalList;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (list_length(sampleRelationShardList) == 0)
|
||||||
|
{
|
||||||
|
goto noTasks;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Plan select query for each shard in the target table. Do so by replacing the
|
* Plan select query for each shard in the target table. Do so by replacing the
|
||||||
* partitioning qual parameter added in multi_planner() using the current shard's
|
* partitioning qual parameter added in multi_planner() using the current shard's
|
||||||
|
@ -291,6 +377,13 @@ CreateInsertSelectRouterPlan(Query *originalQuery,
|
||||||
targetCacheEntry->sortedShardIntervalArray[shardOffset];
|
targetCacheEntry->sortedShardIntervalArray[shardOffset];
|
||||||
Task *modifyTask = NULL;
|
Task *modifyTask = NULL;
|
||||||
|
|
||||||
|
/* we're sure shard we wouldn't be pushing such queries */
|
||||||
|
if (!ShardsIntervalsEqual(targetShardInterval,
|
||||||
|
list_nth(sampleRelationShardList, prunedShardIndex)))
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
modifyTask = RouterModifyTaskForShardInterval(originalQuery, targetShardInterval,
|
modifyTask = RouterModifyTaskForShardInterval(originalQuery, targetShardInterval,
|
||||||
restrictionContext, taskIdIndex);
|
restrictionContext, taskIdIndex);
|
||||||
|
|
||||||
|
@ -302,9 +395,17 @@ CreateInsertSelectRouterPlan(Query *originalQuery,
|
||||||
sqlTaskList = lappend(sqlTaskList, modifyTask);
|
sqlTaskList = lappend(sqlTaskList, modifyTask);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
++prunedShardIndex;
|
||||||
|
if (prunedShardIndex == list_length(sampleRelationShardList))
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
++taskIdIndex;
|
++taskIdIndex;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
noTasks:
|
||||||
|
|
||||||
/* Create the worker job */
|
/* Create the worker job */
|
||||||
workerJob = CitusMakeNode(Job);
|
workerJob = CitusMakeNode(Job);
|
||||||
workerJob->taskList = sqlTaskList;
|
workerJob->taskList = sqlTaskList;
|
||||||
|
@ -2256,8 +2357,10 @@ RouterSelectQuery(Query *originalQuery, RelationRestrictionContext *restrictionC
|
||||||
List **placementList, uint64 *anchorShardId, List **relationShardList,
|
List **placementList, uint64 *anchorShardId, List **relationShardList,
|
||||||
bool replacePrunedQueryWithDummy)
|
bool replacePrunedQueryWithDummy)
|
||||||
{
|
{
|
||||||
|
bool continueOnManyShards = false;
|
||||||
List *prunedRelationShardList = TargetShardIntervalsForSelect(originalQuery,
|
List *prunedRelationShardList = TargetShardIntervalsForSelect(originalQuery,
|
||||||
restrictionContext);
|
restrictionContext,
|
||||||
|
continueOnManyShards);
|
||||||
uint64 shardId = INVALID_SHARD_ID;
|
uint64 shardId = INVALID_SHARD_ID;
|
||||||
CmdType commandType PG_USED_FOR_ASSERTS_ONLY = originalQuery->commandType;
|
CmdType commandType PG_USED_FOR_ASSERTS_ONLY = originalQuery->commandType;
|
||||||
ListCell *prunedRelationShardListCell = NULL;
|
ListCell *prunedRelationShardListCell = NULL;
|
||||||
|
@ -2379,7 +2482,8 @@ RouterSelectQuery(Query *originalQuery, RelationRestrictionContext *restrictionC
|
||||||
*/
|
*/
|
||||||
static List *
|
static List *
|
||||||
TargetShardIntervalsForSelect(Query *query,
|
TargetShardIntervalsForSelect(Query *query,
|
||||||
RelationRestrictionContext *restrictionContext)
|
RelationRestrictionContext *restrictionContext,
|
||||||
|
bool continueOnManyShards)
|
||||||
{
|
{
|
||||||
List *prunedRelationShardList = NIL;
|
List *prunedRelationShardList = NIL;
|
||||||
ListCell *restrictionCell = NULL;
|
ListCell *restrictionCell = NULL;
|
||||||
|
@ -2398,10 +2502,10 @@ TargetShardIntervalsForSelect(Query *query,
|
||||||
List *baseRestrictionList = relationRestriction->relOptInfo->baserestrictinfo;
|
List *baseRestrictionList = relationRestriction->relOptInfo->baserestrictinfo;
|
||||||
List *restrictClauseList = get_all_actual_clauses(baseRestrictionList);
|
List *restrictClauseList = get_all_actual_clauses(baseRestrictionList);
|
||||||
List *prunedShardList = NIL;
|
List *prunedShardList = NIL;
|
||||||
int shardIndex = 0;
|
|
||||||
List *joinInfoList = relationRestriction->relOptInfo->joininfo;
|
List *joinInfoList = relationRestriction->relOptInfo->joininfo;
|
||||||
List *pseudoRestrictionList = extract_actual_clauses(joinInfoList, true);
|
List *pseudoRestrictionList = extract_actual_clauses(joinInfoList, true);
|
||||||
bool whereFalseQuery = false;
|
bool whereFalseQuery = false;
|
||||||
|
List *inputShardInterval = relationRestriction->inputShardIntervalList;
|
||||||
|
|
||||||
relationRestriction->prunedShardIntervalList = NIL;
|
relationRestriction->prunedShardIntervalList = NIL;
|
||||||
|
|
||||||
|
@ -2414,18 +2518,9 @@ TargetShardIntervalsForSelect(Query *query,
|
||||||
whereFalseQuery = ContainsFalseClause(pseudoRestrictionList);
|
whereFalseQuery = ContainsFalseClause(pseudoRestrictionList);
|
||||||
if (!whereFalseQuery && shardCount > 0)
|
if (!whereFalseQuery && shardCount > 0)
|
||||||
{
|
{
|
||||||
List *shardIntervalList = NIL;
|
|
||||||
|
|
||||||
for (shardIndex = 0; shardIndex < shardCount; shardIndex++)
|
|
||||||
{
|
|
||||||
ShardInterval *shardInterval =
|
|
||||||
cacheEntry->sortedShardIntervalArray[shardIndex];
|
|
||||||
shardIntervalList = lappend(shardIntervalList, shardInterval);
|
|
||||||
}
|
|
||||||
|
|
||||||
prunedShardList = PruneShardList(relationId, tableId,
|
prunedShardList = PruneShardList(relationId, tableId,
|
||||||
restrictClauseList,
|
restrictClauseList,
|
||||||
shardIntervalList);
|
inputShardInterval);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Quick bail out. The query can not be router plannable if one
|
* Quick bail out. The query can not be router plannable if one
|
||||||
|
@ -2433,7 +2528,7 @@ TargetShardIntervalsForSelect(Query *query,
|
||||||
* shard left is okay at this point. It will be handled at a later
|
* shard left is okay at this point. It will be handled at a later
|
||||||
* stage.
|
* stage.
|
||||||
*/
|
*/
|
||||||
if (list_length(prunedShardList) > 1)
|
if (!continueOnManyShards && list_length(prunedShardList) > 1)
|
||||||
{
|
{
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
@ -2929,7 +3024,10 @@ CopyRelationRestrictionContext(RelationRestrictionContext *oldContext)
|
||||||
/* not copyable, but readonly */
|
/* not copyable, but readonly */
|
||||||
newRestriction->plannerInfo = oldRestriction->plannerInfo;
|
newRestriction->plannerInfo = oldRestriction->plannerInfo;
|
||||||
newRestriction->prunedShardIntervalList =
|
newRestriction->prunedShardIntervalList =
|
||||||
copyObject(oldRestriction->prunedShardIntervalList);
|
list_copy(oldRestriction->prunedShardIntervalList);
|
||||||
|
|
||||||
|
newRestriction->inputShardIntervalList =
|
||||||
|
list_copy(oldRestriction->inputShardIntervalList);
|
||||||
|
|
||||||
newContext->relationRestrictionList =
|
newContext->relationRestrictionList =
|
||||||
lappend(newContext->relationRestrictionList, newRestriction);
|
lappend(newContext->relationRestrictionList, newRestriction);
|
||||||
|
|
|
@ -38,8 +38,6 @@
|
||||||
/* local function forward declarations */
|
/* local function forward declarations */
|
||||||
static void MarkTablesColocated(Oid sourceRelationId, Oid targetRelationId);
|
static void MarkTablesColocated(Oid sourceRelationId, Oid targetRelationId);
|
||||||
static void ErrorIfShardPlacementsNotColocated(Oid leftRelationId, Oid rightRelationId);
|
static void ErrorIfShardPlacementsNotColocated(Oid leftRelationId, Oid rightRelationId);
|
||||||
static bool ShardsIntervalsEqual(ShardInterval *leftShardInterval,
|
|
||||||
ShardInterval *rightShardInterval);
|
|
||||||
static bool HashPartitionedShardIntervalsEqual(ShardInterval *leftShardInterval,
|
static bool HashPartitionedShardIntervalsEqual(ShardInterval *leftShardInterval,
|
||||||
ShardInterval *rightShardInterval);
|
ShardInterval *rightShardInterval);
|
||||||
static int CompareShardPlacementsByNode(const void *leftElement,
|
static int CompareShardPlacementsByNode(const void *leftElement,
|
||||||
|
@ -296,7 +294,7 @@ ErrorIfShardPlacementsNotColocated(Oid leftRelationId, Oid rightRelationId)
|
||||||
* and shard min/max values). Thus, always return true for shards of reference
|
* and shard min/max values). Thus, always return true for shards of reference
|
||||||
* tables.
|
* tables.
|
||||||
*/
|
*/
|
||||||
static bool
|
extern bool
|
||||||
ShardsIntervalsEqual(ShardInterval *leftShardInterval, ShardInterval *rightShardInterval)
|
ShardsIntervalsEqual(ShardInterval *leftShardInterval, ShardInterval *rightShardInterval)
|
||||||
{
|
{
|
||||||
char leftIntervalPartitionMethod = PartitionMethod(leftShardInterval->relationId);
|
char leftIntervalPartitionMethod = PartitionMethod(leftShardInterval->relationId);
|
||||||
|
|
|
@ -33,5 +33,7 @@ extern void CheckReplicationModel(Oid sourceRelationId, Oid targetRelationId);
|
||||||
extern void CheckDistributionColumnType(Oid sourceRelationId, Oid targetRelationId);
|
extern void CheckDistributionColumnType(Oid sourceRelationId, Oid targetRelationId);
|
||||||
|
|
||||||
extern void DeleteColocationGroupIfNoTablesBelong(uint32 colocationId);
|
extern void DeleteColocationGroupIfNoTablesBelong(uint32 colocationId);
|
||||||
|
extern bool ShardsIntervalsEqual(ShardInterval *leftShardInterval,
|
||||||
|
ShardInterval *rightShardInterval);
|
||||||
|
|
||||||
#endif /* COLOCATION_UTILS_H_ */
|
#endif /* COLOCATION_UTILS_H_ */
|
||||||
|
|
|
@ -38,6 +38,7 @@ typedef struct RelationRestriction
|
||||||
RelOptInfo *relOptInfo;
|
RelOptInfo *relOptInfo;
|
||||||
PlannerInfo *plannerInfo;
|
PlannerInfo *plannerInfo;
|
||||||
List *prunedShardIntervalList;
|
List *prunedShardIntervalList;
|
||||||
|
List *inputShardIntervalList;
|
||||||
} RelationRestriction;
|
} RelationRestriction;
|
||||||
|
|
||||||
typedef struct RelationShard
|
typedef struct RelationShard
|
||||||
|
|
|
@ -198,24 +198,9 @@ DEBUG: StartTransactionCommand
|
||||||
DEBUG: StartTransaction
|
DEBUG: StartTransaction
|
||||||
DEBUG: name: unnamed; blockState: DEFAULT; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
|
DEBUG: name: unnamed; blockState: DEFAULT; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
|
||||||
DEBUG: predicate pruning for shardId 13300000
|
DEBUG: predicate pruning for shardId 13300000
|
||||||
DEBUG: predicate pruning for shardId 13300001
|
|
||||||
DEBUG: predicate pruning for shardId 13300002
|
|
||||||
DEBUG: predicate pruning for shardId 13300003
|
|
||||||
DEBUG: Skipping target shard interval 13300004 since SELECT query for it pruned away
|
|
||||||
DEBUG: predicate pruning for shardId 13300000
|
|
||||||
DEBUG: predicate pruning for shardId 13300002
|
DEBUG: predicate pruning for shardId 13300002
|
||||||
DEBUG: predicate pruning for shardId 13300003
|
DEBUG: predicate pruning for shardId 13300003
|
||||||
DEBUG: distributed statement: INSERT INTO public.raw_events_second_13300005 AS citus_table_alias (user_id, "time") SELECT user_id, "time" FROM public.raw_events_first_13300001 raw_events_first WHERE ((user_id = 7) AND ((hashint4(user_id) >= '-1073741824'::integer) AND (hashint4(user_id) <= '-1'::integer)))
|
DEBUG: distributed statement: INSERT INTO public.raw_events_second_13300005 AS citus_table_alias (user_id, "time") SELECT user_id, "time" FROM public.raw_events_first_13300001 raw_events_first WHERE ((user_id = 7) AND ((hashint4(user_id) >= '-1073741824'::integer) AND (hashint4(user_id) <= '-1'::integer)))
|
||||||
DEBUG: predicate pruning for shardId 13300000
|
|
||||||
DEBUG: predicate pruning for shardId 13300001
|
|
||||||
DEBUG: predicate pruning for shardId 13300002
|
|
||||||
DEBUG: predicate pruning for shardId 13300003
|
|
||||||
DEBUG: Skipping target shard interval 13300006 since SELECT query for it pruned away
|
|
||||||
DEBUG: predicate pruning for shardId 13300000
|
|
||||||
DEBUG: predicate pruning for shardId 13300001
|
|
||||||
DEBUG: predicate pruning for shardId 13300002
|
|
||||||
DEBUG: predicate pruning for shardId 13300003
|
|
||||||
DEBUG: Skipping target shard interval 13300007 since SELECT query for it pruned away
|
|
||||||
DEBUG: ProcessQuery
|
DEBUG: ProcessQuery
|
||||||
DEBUG: Plan is router executable
|
DEBUG: Plan is router executable
|
||||||
DEBUG: CommitTransactionCommand
|
DEBUG: CommitTransactionCommand
|
||||||
|
@ -248,21 +233,6 @@ DEBUG: predicate pruning for shardId 13300001
|
||||||
DEBUG: predicate pruning for shardId 13300002
|
DEBUG: predicate pruning for shardId 13300002
|
||||||
DEBUG: predicate pruning for shardId 13300003
|
DEBUG: predicate pruning for shardId 13300003
|
||||||
DEBUG: distributed statement: INSERT INTO public.raw_events_second_13300004 AS citus_table_alias (user_id, "time", value_1, value_2, value_3, value_4) SELECT user_id, "time", value_1, value_2, value_3, value_4 FROM public.raw_events_first_13300000 raw_events_first WHERE ((user_id = 8) AND ((hashint4(user_id) >= '-2147483648'::integer) AND (hashint4(user_id) <= '-1073741825'::integer)))
|
DEBUG: distributed statement: INSERT INTO public.raw_events_second_13300004 AS citus_table_alias (user_id, "time", value_1, value_2, value_3, value_4) SELECT user_id, "time", value_1, value_2, value_3, value_4 FROM public.raw_events_first_13300000 raw_events_first WHERE ((user_id = 8) AND ((hashint4(user_id) >= '-2147483648'::integer) AND (hashint4(user_id) <= '-1073741825'::integer)))
|
||||||
DEBUG: predicate pruning for shardId 13300000
|
|
||||||
DEBUG: predicate pruning for shardId 13300001
|
|
||||||
DEBUG: predicate pruning for shardId 13300002
|
|
||||||
DEBUG: predicate pruning for shardId 13300003
|
|
||||||
DEBUG: Skipping target shard interval 13300005 since SELECT query for it pruned away
|
|
||||||
DEBUG: predicate pruning for shardId 13300000
|
|
||||||
DEBUG: predicate pruning for shardId 13300001
|
|
||||||
DEBUG: predicate pruning for shardId 13300002
|
|
||||||
DEBUG: predicate pruning for shardId 13300003
|
|
||||||
DEBUG: Skipping target shard interval 13300006 since SELECT query for it pruned away
|
|
||||||
DEBUG: predicate pruning for shardId 13300000
|
|
||||||
DEBUG: predicate pruning for shardId 13300001
|
|
||||||
DEBUG: predicate pruning for shardId 13300002
|
|
||||||
DEBUG: predicate pruning for shardId 13300003
|
|
||||||
DEBUG: Skipping target shard interval 13300007 since SELECT query for it pruned away
|
|
||||||
DEBUG: ProcessQuery
|
DEBUG: ProcessQuery
|
||||||
DEBUG: Plan is router executable
|
DEBUG: Plan is router executable
|
||||||
DEBUG: CommitTransactionCommand
|
DEBUG: CommitTransactionCommand
|
||||||
|
@ -279,10 +249,6 @@ WHERE
|
||||||
DEBUG: StartTransactionCommand
|
DEBUG: StartTransactionCommand
|
||||||
DEBUG: StartTransaction
|
DEBUG: StartTransaction
|
||||||
DEBUG: name: unnamed; blockState: DEFAULT; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
|
DEBUG: name: unnamed; blockState: DEFAULT; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
|
||||||
DEBUG: Skipping target shard interval 13300004 since SELECT query for it pruned away
|
|
||||||
DEBUG: Skipping target shard interval 13300005 since SELECT query for it pruned away
|
|
||||||
DEBUG: Skipping target shard interval 13300006 since SELECT query for it pruned away
|
|
||||||
DEBUG: Skipping target shard interval 13300007 since SELECT query for it pruned away
|
|
||||||
DEBUG: ProcessQuery
|
DEBUG: ProcessQuery
|
||||||
DEBUG: Plan is router executable
|
DEBUG: Plan is router executable
|
||||||
DEBUG: CommitTransactionCommand
|
DEBUG: CommitTransactionCommand
|
||||||
|
@ -299,10 +265,6 @@ WHERE
|
||||||
DEBUG: StartTransactionCommand
|
DEBUG: StartTransactionCommand
|
||||||
DEBUG: StartTransaction
|
DEBUG: StartTransaction
|
||||||
DEBUG: name: unnamed; blockState: DEFAULT; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
|
DEBUG: name: unnamed; blockState: DEFAULT; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
|
||||||
DEBUG: Skipping target shard interval 13300004 since SELECT query for it pruned away
|
|
||||||
DEBUG: Skipping target shard interval 13300005 since SELECT query for it pruned away
|
|
||||||
DEBUG: Skipping target shard interval 13300006 since SELECT query for it pruned away
|
|
||||||
DEBUG: Skipping target shard interval 13300007 since SELECT query for it pruned away
|
|
||||||
DEBUG: ProcessQuery
|
DEBUG: ProcessQuery
|
||||||
DEBUG: Plan is router executable
|
DEBUG: Plan is router executable
|
||||||
DEBUG: CommitTransactionCommand
|
DEBUG: CommitTransactionCommand
|
||||||
|
@ -371,22 +333,10 @@ DEBUG: StartTransactionCommand
|
||||||
DEBUG: StartTransaction
|
DEBUG: StartTransaction
|
||||||
DEBUG: name: unnamed; blockState: DEFAULT; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
|
DEBUG: name: unnamed; blockState: DEFAULT; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
|
||||||
DEBUG: predicate pruning for shardId 13300000
|
DEBUG: predicate pruning for shardId 13300000
|
||||||
DEBUG: predicate pruning for shardId 13300001
|
|
||||||
DEBUG: predicate pruning for shardId 13300002
|
|
||||||
DEBUG: predicate pruning for shardId 13300003
|
|
||||||
DEBUG: Skipping target shard interval 13300004 since SELECT query for it pruned away
|
|
||||||
DEBUG: predicate pruning for shardId 13300000
|
|
||||||
DEBUG: predicate pruning for shardId 13300002
|
DEBUG: predicate pruning for shardId 13300002
|
||||||
DEBUG: predicate pruning for shardId 13300003
|
DEBUG: predicate pruning for shardId 13300003
|
||||||
DEBUG: distributed statement: INSERT INTO public.raw_events_second_13300005 AS citus_table_alias (user_id, value_1, value_3) SELECT user_id, value_1, value_3 FROM public.raw_events_first_13300001 raw_events_first WHERE (((user_id = 9) OR (user_id = 16)) AND ((hashint4(user_id) >= '-1073741824'::integer) AND (hashint4(user_id) <= '-1'::integer))) RETURNING citus_table_alias.user_id, citus_table_alias."time", citus_table_alias.value_1, citus_table_alias.value_2, citus_table_alias.value_3, citus_table_alias.value_4
|
DEBUG: distributed statement: INSERT INTO public.raw_events_second_13300005 AS citus_table_alias (user_id, value_1, value_3) SELECT user_id, value_1, value_3 FROM public.raw_events_first_13300001 raw_events_first WHERE (((user_id = 9) OR (user_id = 16)) AND ((hashint4(user_id) >= '-1073741824'::integer) AND (hashint4(user_id) <= '-1'::integer))) RETURNING citus_table_alias.user_id, citus_table_alias."time", citus_table_alias.value_1, citus_table_alias.value_2, citus_table_alias.value_3, citus_table_alias.value_4
|
||||||
DEBUG: predicate pruning for shardId 13300000
|
|
||||||
DEBUG: predicate pruning for shardId 13300001
|
DEBUG: predicate pruning for shardId 13300001
|
||||||
DEBUG: predicate pruning for shardId 13300002
|
|
||||||
DEBUG: predicate pruning for shardId 13300003
|
|
||||||
DEBUG: Skipping target shard interval 13300006 since SELECT query for it pruned away
|
|
||||||
DEBUG: predicate pruning for shardId 13300000
|
|
||||||
DEBUG: predicate pruning for shardId 13300001
|
|
||||||
DEBUG: predicate pruning for shardId 13300002
|
|
||||||
DEBUG: distributed statement: INSERT INTO public.raw_events_second_13300007 AS citus_table_alias (user_id, value_1, value_3) SELECT user_id, value_1, value_3 FROM public.raw_events_first_13300003 raw_events_first WHERE (((user_id = 9) OR (user_id = 16)) AND ((hashint4(user_id) >= 1073741824) AND (hashint4(user_id) <= 2147483647))) RETURNING citus_table_alias.user_id, citus_table_alias."time", citus_table_alias.value_1, citus_table_alias.value_2, citus_table_alias.value_3, citus_table_alias.value_4
|
DEBUG: distributed statement: INSERT INTO public.raw_events_second_13300007 AS citus_table_alias (user_id, value_1, value_3) SELECT user_id, value_1, value_3 FROM public.raw_events_first_13300003 raw_events_first WHERE (((user_id = 9) OR (user_id = 16)) AND ((hashint4(user_id) >= 1073741824) AND (hashint4(user_id) <= 2147483647))) RETURNING citus_table_alias.user_id, citus_table_alias."time", citus_table_alias.value_1, citus_table_alias.value_2, citus_table_alias.value_3, citus_table_alias.value_4
|
||||||
DEBUG: ProcessQuery
|
DEBUG: ProcessQuery
|
||||||
DEBUG: Plan is router executable
|
DEBUG: Plan is router executable
|
||||||
|
@ -722,27 +672,6 @@ DEBUG: predicate pruning for shardId 13300002
|
||||||
DEBUG: predicate pruning for shardId 13300004
|
DEBUG: predicate pruning for shardId 13300004
|
||||||
DEBUG: predicate pruning for shardId 13300005
|
DEBUG: predicate pruning for shardId 13300005
|
||||||
DEBUG: predicate pruning for shardId 13300006
|
DEBUG: predicate pruning for shardId 13300006
|
||||||
DEBUG: distributed statement: INSERT INTO public.raw_events_second_13300004 AS citus_table_alias (user_id) SELECT user_id FROM public.raw_events_first_13300003 raw_events_first WHERE ((user_id IN (SELECT raw_events_second.user_id FROM public.raw_events_second_13300007 raw_events_second WHERE (raw_events_second.user_id = 2))) AND ((hashint4(user_id) >= '-2147483648'::integer) AND (hashint4(user_id) <= '-1073741825'::integer)))
|
|
||||||
DEBUG: predicate pruning for shardId 13300000
|
|
||||||
DEBUG: predicate pruning for shardId 13300001
|
|
||||||
DEBUG: predicate pruning for shardId 13300002
|
|
||||||
DEBUG: predicate pruning for shardId 13300004
|
|
||||||
DEBUG: predicate pruning for shardId 13300005
|
|
||||||
DEBUG: predicate pruning for shardId 13300006
|
|
||||||
DEBUG: distributed statement: INSERT INTO public.raw_events_second_13300005 AS citus_table_alias (user_id) SELECT user_id FROM public.raw_events_first_13300003 raw_events_first WHERE ((user_id IN (SELECT raw_events_second.user_id FROM public.raw_events_second_13300007 raw_events_second WHERE (raw_events_second.user_id = 2))) AND ((hashint4(user_id) >= '-1073741824'::integer) AND (hashint4(user_id) <= '-1'::integer)))
|
|
||||||
DEBUG: predicate pruning for shardId 13300000
|
|
||||||
DEBUG: predicate pruning for shardId 13300001
|
|
||||||
DEBUG: predicate pruning for shardId 13300002
|
|
||||||
DEBUG: predicate pruning for shardId 13300004
|
|
||||||
DEBUG: predicate pruning for shardId 13300005
|
|
||||||
DEBUG: predicate pruning for shardId 13300006
|
|
||||||
DEBUG: distributed statement: INSERT INTO public.raw_events_second_13300006 AS citus_table_alias (user_id) SELECT user_id FROM public.raw_events_first_13300003 raw_events_first WHERE ((user_id IN (SELECT raw_events_second.user_id FROM public.raw_events_second_13300007 raw_events_second WHERE (raw_events_second.user_id = 2))) AND ((hashint4(user_id) >= 0) AND (hashint4(user_id) <= 1073741823)))
|
|
||||||
DEBUG: predicate pruning for shardId 13300000
|
|
||||||
DEBUG: predicate pruning for shardId 13300001
|
|
||||||
DEBUG: predicate pruning for shardId 13300002
|
|
||||||
DEBUG: predicate pruning for shardId 13300004
|
|
||||||
DEBUG: predicate pruning for shardId 13300005
|
|
||||||
DEBUG: predicate pruning for shardId 13300006
|
|
||||||
DEBUG: distributed statement: INSERT INTO public.raw_events_second_13300007 AS citus_table_alias (user_id) SELECT user_id FROM public.raw_events_first_13300003 raw_events_first WHERE ((user_id IN (SELECT raw_events_second.user_id FROM public.raw_events_second_13300007 raw_events_second WHERE (raw_events_second.user_id = 2))) AND ((hashint4(user_id) >= 1073741824) AND (hashint4(user_id) <= 2147483647)))
|
DEBUG: distributed statement: INSERT INTO public.raw_events_second_13300007 AS citus_table_alias (user_id) SELECT user_id FROM public.raw_events_first_13300003 raw_events_first WHERE ((user_id IN (SELECT raw_events_second.user_id FROM public.raw_events_second_13300007 raw_events_second WHERE (raw_events_second.user_id = 2))) AND ((hashint4(user_id) >= 1073741824) AND (hashint4(user_id) <= 2147483647)))
|
||||||
DEBUG: ProcessQuery
|
DEBUG: ProcessQuery
|
||||||
DEBUG: Plan is router executable
|
DEBUG: Plan is router executable
|
||||||
|
@ -1555,21 +1484,6 @@ DEBUG: predicate pruning for shardId 13300005
|
||||||
DEBUG: predicate pruning for shardId 13300006
|
DEBUG: predicate pruning for shardId 13300006
|
||||||
DEBUG: predicate pruning for shardId 13300007
|
DEBUG: predicate pruning for shardId 13300007
|
||||||
DEBUG: distributed statement: INSERT INTO public.raw_events_first_13300000 AS citus_table_alias (user_id, "time", value_1, value_2, value_3, value_4) SELECT user_id, "time", value_1, value_2, value_3, value_4 FROM public.raw_events_second_13300004 raw_events_second WHERE ((user_id = 5) AND ((hashint4(user_id) >= '-2147483648'::integer) AND (hashint4(user_id) <= '-1073741825'::integer)))
|
DEBUG: distributed statement: INSERT INTO public.raw_events_first_13300000 AS citus_table_alias (user_id, "time", value_1, value_2, value_3, value_4) SELECT user_id, "time", value_1, value_2, value_3, value_4 FROM public.raw_events_second_13300004 raw_events_second WHERE ((user_id = 5) AND ((hashint4(user_id) >= '-2147483648'::integer) AND (hashint4(user_id) <= '-1073741825'::integer)))
|
||||||
DEBUG: predicate pruning for shardId 13300004
|
|
||||||
DEBUG: predicate pruning for shardId 13300005
|
|
||||||
DEBUG: predicate pruning for shardId 13300006
|
|
||||||
DEBUG: predicate pruning for shardId 13300007
|
|
||||||
DEBUG: Skipping target shard interval 13300001 since SELECT query for it pruned away
|
|
||||||
DEBUG: predicate pruning for shardId 13300004
|
|
||||||
DEBUG: predicate pruning for shardId 13300005
|
|
||||||
DEBUG: predicate pruning for shardId 13300006
|
|
||||||
DEBUG: predicate pruning for shardId 13300007
|
|
||||||
DEBUG: Skipping target shard interval 13300002 since SELECT query for it pruned away
|
|
||||||
DEBUG: predicate pruning for shardId 13300004
|
|
||||||
DEBUG: predicate pruning for shardId 13300005
|
|
||||||
DEBUG: predicate pruning for shardId 13300006
|
|
||||||
DEBUG: predicate pruning for shardId 13300007
|
|
||||||
DEBUG: Skipping target shard interval 13300003 since SELECT query for it pruned away
|
|
||||||
DEBUG: ProcessQuery
|
DEBUG: ProcessQuery
|
||||||
DEBUG: Plan is router executable
|
DEBUG: Plan is router executable
|
||||||
DEBUG: CommitTransactionCommand
|
DEBUG: CommitTransactionCommand
|
||||||
|
@ -1614,23 +1528,8 @@ DEBUG: StartTransaction
|
||||||
DEBUG: name: unnamed; blockState: DEFAULT; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
|
DEBUG: name: unnamed; blockState: DEFAULT; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
|
||||||
DEBUG: predicate pruning for shardId 13300004
|
DEBUG: predicate pruning for shardId 13300004
|
||||||
DEBUG: predicate pruning for shardId 13300005
|
DEBUG: predicate pruning for shardId 13300005
|
||||||
DEBUG: predicate pruning for shardId 13300006
|
|
||||||
DEBUG: predicate pruning for shardId 13300007
|
|
||||||
DEBUG: Skipping target shard interval 13300000 since SELECT query for it pruned away
|
|
||||||
DEBUG: predicate pruning for shardId 13300004
|
|
||||||
DEBUG: predicate pruning for shardId 13300005
|
|
||||||
DEBUG: predicate pruning for shardId 13300006
|
|
||||||
DEBUG: predicate pruning for shardId 13300007
|
|
||||||
DEBUG: Skipping target shard interval 13300001 since SELECT query for it pruned away
|
|
||||||
DEBUG: predicate pruning for shardId 13300004
|
|
||||||
DEBUG: predicate pruning for shardId 13300005
|
|
||||||
DEBUG: predicate pruning for shardId 13300007
|
DEBUG: predicate pruning for shardId 13300007
|
||||||
DEBUG: distributed statement: INSERT INTO public.raw_events_first_13300002 AS citus_table_alias (user_id, "time", value_1, value_2, value_3, value_4) SELECT user_id, "time", value_1, value_2, value_3, value_4 FROM public.raw_events_second_13300006 raw_events_second WHERE ((user_id = 6) AND ((hashint4(user_id) >= 0) AND (hashint4(user_id) <= 1073741823)))
|
DEBUG: distributed statement: INSERT INTO public.raw_events_first_13300002 AS citus_table_alias (user_id, "time", value_1, value_2, value_3, value_4) SELECT user_id, "time", value_1, value_2, value_3, value_4 FROM public.raw_events_second_13300006 raw_events_second WHERE ((user_id = 6) AND ((hashint4(user_id) >= 0) AND (hashint4(user_id) <= 1073741823)))
|
||||||
DEBUG: predicate pruning for shardId 13300004
|
|
||||||
DEBUG: predicate pruning for shardId 13300005
|
|
||||||
DEBUG: predicate pruning for shardId 13300006
|
|
||||||
DEBUG: predicate pruning for shardId 13300007
|
|
||||||
DEBUG: Skipping target shard interval 13300003 since SELECT query for it pruned away
|
|
||||||
DEBUG: ProcessQuery
|
DEBUG: ProcessQuery
|
||||||
DEBUG: Plan is router executable
|
DEBUG: Plan is router executable
|
||||||
DEBUG: CommitTransactionCommand
|
DEBUG: CommitTransactionCommand
|
||||||
|
@ -1695,21 +1594,6 @@ DEBUG: predicate pruning for shardId 13300005
|
||||||
DEBUG: predicate pruning for shardId 13300006
|
DEBUG: predicate pruning for shardId 13300006
|
||||||
DEBUG: predicate pruning for shardId 13300007
|
DEBUG: predicate pruning for shardId 13300007
|
||||||
DEBUG: distributed statement: INSERT INTO public.raw_events_first_13300000 AS citus_table_alias (user_id, "time", value_1, value_2, value_3, value_4) SELECT user_id, "time", value_1, value_2, value_3, value_4 FROM public.raw_events_second_13300004 raw_events_second WHERE ((user_id = 5) AND ((hashint4(user_id) >= '-2147483648'::integer) AND (hashint4(user_id) <= '-1073741825'::integer)))
|
DEBUG: distributed statement: INSERT INTO public.raw_events_first_13300000 AS citus_table_alias (user_id, "time", value_1, value_2, value_3, value_4) SELECT user_id, "time", value_1, value_2, value_3, value_4 FROM public.raw_events_second_13300004 raw_events_second WHERE ((user_id = 5) AND ((hashint4(user_id) >= '-2147483648'::integer) AND (hashint4(user_id) <= '-1073741825'::integer)))
|
||||||
DEBUG: predicate pruning for shardId 13300004
|
|
||||||
DEBUG: predicate pruning for shardId 13300005
|
|
||||||
DEBUG: predicate pruning for shardId 13300006
|
|
||||||
DEBUG: predicate pruning for shardId 13300007
|
|
||||||
DEBUG: Skipping target shard interval 13300001 since SELECT query for it pruned away
|
|
||||||
DEBUG: predicate pruning for shardId 13300004
|
|
||||||
DEBUG: predicate pruning for shardId 13300005
|
|
||||||
DEBUG: predicate pruning for shardId 13300006
|
|
||||||
DEBUG: predicate pruning for shardId 13300007
|
|
||||||
DEBUG: Skipping target shard interval 13300002 since SELECT query for it pruned away
|
|
||||||
DEBUG: predicate pruning for shardId 13300004
|
|
||||||
DEBUG: predicate pruning for shardId 13300005
|
|
||||||
DEBUG: predicate pruning for shardId 13300006
|
|
||||||
DEBUG: predicate pruning for shardId 13300007
|
|
||||||
DEBUG: Skipping target shard interval 13300003 since SELECT query for it pruned away
|
|
||||||
DEBUG: ProcessQuery
|
DEBUG: ProcessQuery
|
||||||
DEBUG: Plan is router executable
|
DEBUG: Plan is router executable
|
||||||
DEBUG: CommitTransactionCommand
|
DEBUG: CommitTransactionCommand
|
||||||
|
|
Loading…
Reference in New Issue