Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Learn more about multi-stage query engine and how to troubleshoot issues.
LogicalFilter(condition=[>($5, 2)])
LogicalTableScan(table=[[default, userAttributes]])Describes the aggregate relation operator in the multi-stage query engine.
SELECT
/*+ aggOptions(num_groups_limit='10000000') */
col1, count(*)
FROM table GROUP BY col1SELECT
/*+ aggOptions(is_partitioned_by_group_by_keys='true') */
a.col3, a.col1, SUM(b.col3)
FROM a JOIN b ON a.col3 = b.col3
GROUP BY a.col3, a.col1SELECT
/*+ aggOptions(is_skip_leaf_stage_group_by='true') */
a.col1, SUM(a.col3)
FROM a
WHERE a.col3 >= 0 AND a.col2 = 'a'
GROUP BY a.col1SELECT
/*+ aggOptions(max_initial_result_holder_capacity='10') */
a.col1, SUM(a.col3)
FROM a
WHERE a.col3 >= 0 AND a.col2 = 'a'
GROUP BY a.col1LogicalAggregate(group=[{6}], agg#0=[COUNT()], agg#1=[MAX($5)])
LogicalTableScan(table=[[default, userAttributes]])LogicalAggregate(group=[{6}], agg#0=[COUNT()], agg#1=[MAX($5)])
LogicalTableScan(table=[[default, userAttributes]])PinotLogicalExchange(distribution=[hash[0, 1]])
LogicalProject(groupUUID=[$3], userUUID=[$4])
LogicalTableScan(table=[[default, userGroups]])Describes the hash join relation operator in the multi-stage query engine.
Describes the union relation operator in the multi-stage query engine.
INTERSECTALLUNIONLogicalJoin(condition=[=($0, $1)], joinType=[inner])
PinotLogicalExchange(distribution=[hash[0]])
LogicalProject(userUUID=[$6])
LogicalTableScan(table=[[default, userAttributes]])
PinotLogicalExchange(distribution=[hash[0]])
LogicalProject(userUUID=[$4])
LogicalTableScan(table=[[default, userGroups]])select largeTable.col1, smallTable.col2
from largeTable
cross join smallTableselect largeTable.col1, smallTable.col2
from smallTable
cross join largeTableSELECT
/*+ windowOptions(option1='value1', option2='value2') */
col1, SUM(intCol) OVER() as sum FROM tableselect userUUID
from (select userUUID from userAttributes)
UNION ALL
(select userUUID from userGroups)LogicalUnion(all=[true])
PinotLogicalExchange(distribution=[hash[0]])
LogicalProject(userUUID=[$6])
LogicalTableScan(table=[[default, userAttributes]])
PinotLogicalExchange(distribution=[hash[0]])
LogicalProject(userUUID=[$4])
LogicalTableScan(table=[[default, userGroups]])explain plan for
select userUUID
from (select userUUID from userAttributes)
UNION -- without ALL!
(select userUUID from userGroups)LogicalAggregate(group=[{0}])
PinotLogicalExchange(distribution=[hash[0]])
LogicalAggregate(group=[{0}])
LogicalUnion(all=[true])
PinotLogicalExchange(distribution=[hash[0]])
LogicalProject(userUUID=[$6])
LogicalTableScan(table=[[default, userAttributes]])
PinotLogicalExchange(distribution=[hash[0]])
LogicalProject(userUUID=[$4])
LogicalTableScan(table=[[default, userGroups]])LogicalProject(userUUID=[$6], deviceOS=[$4], EXPR$2=[SUBSTRING($4, 0, 2)])
LogicalTableScan(table=[[default, userAttributes]])Learn more about multi-stage explain plans and how to interpret them.
PinotLogicalExchangeconditionjoinTypeHashSet<Row> rightRows = new HashSet<>();
Block rightBlock = rightInput.nextBlock();
while (rightBlock is not EOS) {
rightRows.addAll(rightBlock.getRows());
rightBlock = rightInput.nextBlock();
}
Block leftBlock = leftInput.nextBlock();
while (leftBlock is not EOS) {
Block partialResultBlock = new Block();
for (Row row : leftBlock.getRows()) {
if (rightRows.add(row)) {
partialResultBlock.add(row);
}
}
emit partialResultBlock;
leftBlock = leftInput.nextBlock();
}
emit EOSHashSet<Row> rightRows = new HashSet<>();
Block rightBlock = rightInput.nextBlock();
while (rightBlock is not EOS) {
rightRows.addAll(rightBlock.getRows());
rightBlock = rightInput.nextBlock();
}
Block leftBlock = leftInput.nextBlock();
while (leftBlock is not EOS) {
Block partialResultBlock = new Block();
for (Row row : leftBlock.getRows()) {
if (rightRows.remove(row)) {
partialResultBlock.add(row);
}
}
emit partialResultBlock;
leftBlock = leftInput.nextBlock();
}
emit EOSexplain plan for
select customer.c_address, orders.o_shippriority
from customer
join orders
on customer.c_custkey = orders.o_custkey
limit 10LogicalSort(offset=[0], fetch=[10])
PinotLogicalSortExchange(distribution=[hash], collation=[[]], isSortOnSender=[false], isSortOnReceiver=[false])
LogicalSort(fetch=[10])
LogicalProject(c_address=[$0], o_shippriority=[$3])
LogicalJoin(condition=[=($1, $2)], joinType=[inner])
PinotLogicalExchange(distribution=[hash[1]])
LogicalProject(c_address=[$4], c_custkey=[$6])
LogicalTableScan(table=[[default, customer]])
PinotLogicalExchange(distribution=[hash[0]])
LogicalProject(o_custkey=[$5], o_shippriority=[$10])
LogicalTableScan(table=[[default, orders]])explain plan for
select customer.c_address, orders.o_shippriority
from customer
join orders
on customer.c_custkey = orders.o_custkey
limit 10LogicalSort(offset=[0], fetch=[10])
PinotLogicalSortExchange(distribution=[hash], collation=[[]], isSortOnSender=[false], isSortOnReceiver=[false])
LogicalSort(fetch=[10])
LogicalProject(c_address=[$0], o_shippriority=[$3])
LogicalJoin(condition=[=($1, $2)], joinType=[inner])
PinotLogicalExchange(distribution=[hash[1]])
LogicalProject(c_address=[$4], c_custkey=[$6])
LogicalTableScan(table=[[default, customer]])
PinotLogicalExchange(distribution=[hash[0]])
LogicalProject(o_custkey=[$5], o_shippriority=[$10])
LogicalTableScan(table=[[default, orders]]) PinotLogicalExchange(distribution=[hash[0]])
LogicalProject(o_custkey=[$5], o_shippriority=[$10])
LogicalTableScan(table=[[default, orders]])Describes the leaf operator in the multi-stage query engine.
LogicalSort(sort0=[$0], sort1=[$2], dir0=[ASC], dir1=[ASC], fetch=[10])
LogicalProject(userUUID=[$6], deviceOS=[$4], EXPR$2=[SUBSTRING($4, 0, 2)])
LogicalTableScan(table=[[default, userAttributes]])select
a.*
from userAttributes as a
join userGroups as g
on a.userUUID = g.userUUID
where a.deviceOS = 'windows'LogicalProject(daysSinceFirstTrip=[$0], deviceOS=[$1], totalTrips=[$2], userUUID=[$3])
LogicalJoin(condition=[=($3, $4)], joinType=[inner])
PinotLogicalExchange(distribution=[hash[3]])
LogicalProject(daysSinceFirstTrip=[$3], deviceOS=[$4], totalTrips=[$5], userUUID=[$6])
LogicalFilter(condition=[=($4, _UTF-8'windows')])
LogicalTableScan(table=[[default, userAttributes]])
PinotLogicalExchange(distribution=[hash[0]])
LogicalProject(userUUID=[$4])
LogicalTableScan(table=[[default, userGroups]])select
a.*
from (select * from userAttributes limit 10) as a
join userGroups as g
on a.userUUID = g.userUUID
where a.deviceOS = 'windows'LogicalProject(daysSinceFirstTrip=[$0], deviceOS=[$1], totalTrips=[$2], userUUID=[$3])
LogicalJoin(condition=[=($3, $4)], joinType=[inner])
PinotLogicalExchange(distribution=[hash[3]])
LogicalFilter(condition=[=($1, _UTF-8'windows')])
LogicalSort(offset=[0], fetch=[10])
PinotLogicalSortExchange(distribution=[hash], collation=[[]], isSortOnSender=[false], isSortOnReceiver=[false])
LogicalSort(fetch=[10])
LogicalProject(daysSinceFirstTrip=[$3], deviceOS=[$4], totalTrips=[$5], userUUID=[$6])
LogicalTableScan(table=[[default, userAttributes]])
PinotLogicalExchange(distribution=[hash[0]])
LogicalProject(userUUID=[$4])
LogicalTableScan(table=[[default, userGroups]])select
a.*
from (select * from userAttributes where deviceOS = 'windows' limit 10) as a
join userGroups as g
on a.userUUID = g.userUUIDLogicalProject(daysSinceFirstTrip=[$0], deviceOS=[$1], totalTrips=[$2], userUUID=[$3])
LogicalJoin(condition=[=($3, $4)], joinType=[inner])
PinotLogicalExchange(distribution=[hash[3]])
LogicalSort(offset=[0], fetch=[10])
PinotLogicalSortExchange(distribution=[hash], collation=[[]], isSortOnSender=[false], isSortOnReceiver=[false])
LogicalSort(fetch=[10])
LogicalProject(daysSinceFirstTrip=[$3], deviceOS=[$4], totalTrips=[$5], userUUID=[$6])
LogicalFilter(condition=[=($4, _UTF-8'windows')])
LogicalTableScan(table=[[default, userAttributes]])
PinotLogicalExchange(distribution=[hash[0]])
LogicalProject(userUUID=[$4])
LogicalTableScan(table=[[default, userGroups]])Learn more about multi-stage stats and how to use them to improve your queries.
SELECT playerName, teamName
FROM baseballStats_OFFLINE as playerStats
JOIN dimBaseballTeams_OFFLINE AS teams
ON playerStats.teamID = teams.teamID
LIMIT 10{
"type": "MAILBOX_RECEIVE",
"executionTimeMs": 222,
"emittedRows": 10,
"fanIn": 3,
"rawMessages": 4,
"deserializedBytes": 1688,
"upstreamWaitMs": 651,
"children": [
{
"type": "MAILBOX_SEND",
"executionTimeMs": 210,
"emittedRows": 10,
"stage": 1,
"parallelism": 3,
"fanOut": 1,
"rawMessages": 4,
"serializedBytes": 338,
"children": [
{
"type": "SORT_OR_LIMIT",
"executionTimeMs": 585,
"emittedRows": 10,
"children": [
{
"type": "MAILBOX_RECEIVE",
"executionTimeMs": 585,
"emittedRows": 10,
"fanIn": 3,
"inMemoryMessages": 4,
"rawMessages": 8,
"deserializedBytes": 1775,
"deserializationTimeMs": 1,
"upstreamWaitMs": 1480,
"children": [
{
"type": "MAILBOX_SEND",
"executionTimeMs": 397,
"emittedRows": 30,
"stage": 2,
"parallelism": 3,
"fanOut": 3,
"inMemoryMessages": 4,
"rawMessages": 8,
"serializedBytes": 1108,
"serializationTimeMs": 2,
"children": [
{
"type": "SORT_OR_LIMIT",
"executionTimeMs": 379,
"emittedRows": 30,
"children": [
{
"type": "TRANSFORM",
"executionTimeMs": 377,
"emittedRows": 5092,
"children": [
{
"type": "HASH_JOIN",
"executionTimeMs": 376,
"emittedRows": 5092,
"timeBuildingHashTableMs": 167,
"children": [
{
"type": "MAILBOX_RECEIVE",
"executionTimeMs": 206,
"emittedRows": 10000,
"fanIn": 1,
"inMemoryMessages": 4,
"rawMessages": 21,
"deserializedBytes": 649374,
"deserializationTimeMs": 3,
"downstreamWaitMs": 5,
"upstreamWaitMs": 390,
"children": [
{
"type": "MAILBOX_SEND",
"executionTimeMs": 94,
"emittedRows": 97889,
"stage": 3,
"parallelism": 1,
"fanOut": 3,
"inMemoryMessages": 4,
"rawMessages": 20,
"serializedBytes": 649076,
"serializationTimeMs": 17,
"children": [
{
"type": "LEAF",
"table": "baseballStats_OFFLINE",
"executionTimeMs": 75,
"emittedRows": 97889,
"numDocsScanned": 97889,
"numEntriesScannedPostFilter": 195778,
"numSegmentsQueried": 1,
"numSegmentsProcessed": 1,
"numSegmentsMatched": 1,
"totalDocs": 97889,
"threadCpuTimeNs": 19888000
}
]
}
]
},
{
"type": "MAILBOX_RECEIVE",
"executionTimeMs": 163,
"emittedRows": 51,
"fanIn": 1,
"inMemoryMessages": 2,
"rawMessages": 4,
"deserializedBytes": 2330,
"downstreamWaitMs": 14,
"upstreamWaitMs": 162,
"children": [
{
"type": "MAILBOX_SEND",
"executionTimeMs": 17,
"emittedRows": 51,
"stage": 4,
"parallelism": 1,
"fanOut": 3,
"inMemoryMessages": 1,
"rawMessages": 4,
"serializedBytes": 2092,
"children": [
{
"type": "LEAF",
"table": "dimBaseballTeams_OFFLINE",
"executionTimeMs": 62,
"emittedRows": 51,
"numDocsScanned": 51,
"numEntriesScannedPostFilter": 102,
"numSegmentsQueried": 1,
"numSegmentsProcessed": 1,
"numSegmentsMatched": 1,
"totalDocs": 51,
"threadCpuTimeNs": 1919000,
"systemActivitiesCpuTimeNs": 4677167
}
]
}
]
}
]
}
]
}
]
}
]
}
]
}
]
}
]
}
]
}