https://pinot.apache.org/ logo
#getting-started
Title
# getting-started
h

Harish Bohara

05/05/2022, 7:05 AM
One question - select count(*) from table where pipeline=‘TRANSACTIONAL’ and eventTime > ‘2022-05-04 221253.791’ -> this is giving count 10-20K But if i use following to check the plan: explain plan for select count(*) from table where pipeline=‘TRANSACTIONAL’ and eventTime > ‘2022-05-04 221253.791’
m

Mark Needham

05/05/2022, 8:53 AM
@Amrish Lal any ideas?
h

Harish Bohara

05/05/2022, 12:29 PM
Verison 0.10.0
m

Mayank

05/05/2022, 2:32 PM
I couldn’t understand the question from your message @Harish Bohara
m

Mark Needham

05/05/2022, 2:33 PM
I think it's the next message with the screenshot. Like why does it say 'no matching segment'
when if you run the query you get a result
m

Mayank

05/05/2022, 2:34 PM
Oh, thread view fooled me
m

Mark Needham

05/05/2022, 2:34 PM
yeh sorry - I replied on a thread to the wrong message
only realised after I pressed enter
👍 1
h

Harish Bohara

05/05/2022, 4:21 PM
Yes when I run the query I get results. However if I try to check the plan it shows "no matching segments "
m

Mayank

05/05/2022, 4:24 PM
I think it means number (not No)
That should be fixed
Looking at the code, seems it is really NO matching segments and not number. @Amrish Lal this seems incorrect, could you please take a look?
s

Sidd

05/05/2022, 6:37 PM
Can I see the output of EXPLAIN PLAN ?
a

Amrish Lal

05/05/2022, 6:42 PM
I am wondering if this is caused by the fact that we pick a random segment on a random server to generate EXPLAIN PLAN output. Do they consistently get the same output if they run the EXPLAIN PLAN query multiple times?
Richard recently opened an issue on this which has some more details.
@Mayank Yes,
NO_MATCHING_SEGMENT
is really no matching segments on the particular server from which we got EXPLAIN PLAN results.
m

Mayank

05/05/2022, 6:59 PM
@Amrish Lal Yep I saw that, I was asking why that is returned in this case, as it seems incorrect,
a

Amrish Lal

05/05/2022, 7:01 PM
Without knowing more, I can only assume that they have multiple servers with multiple segments on each server and the server that we randomly picked to run EXPLAIN PLAN on did not have any matching segments. Thats why I am wondering if they see some variation in EXPLAIN PLAN output if the query is run multiple times.
r

Richard Startin

05/05/2022, 8:10 PM
the problem with this approach is it bypasses pruning
so it will claim that something pinot would never do will happen, and if you have enough segments pruned before the query evaluates you have to get really lucky to find a segment that could be used to generate a realistic plan
1