One question - select count(*) from table where pi...
# getting-started
h
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
@Amrish Lal any ideas?
h
Verison 0.10.0
m
I couldn’t understand the question from your message @Harish Bohara
m
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
Oh, thread view fooled me
m
yeh sorry - I replied on a thread to the wrong message
only realised after I pressed enter
👍 1
h
Yes when I run the query I get results. However if I try to check the plan it shows "no matching segments "
m
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
Can I see the output of EXPLAIN PLAN ?
a
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
@Amrish Lal Yep I saw that, I was asking why that is returned in this case, as it seems incorrect,
a
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
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