Hi all. I have a doubt, i am firing the below quer...
# troubleshooting
h
Hi all. I have a doubt, i am firing the below query -
explain plan for (select max(duration_millis) from backend_entity_view where $segmentName='backend_entity_view__3__375__20220720T0955Z' and regexp_like(backend_name, 'perf'))
and segment
backend_entity_view__3__375__20220720T0955Z
has
backend_name.fst_index.size=497
(FST index is present). However I couldn’t see it in explain plan.
Copy code
BROKER_REDUCE(limit:10)	0	-1
COMBINE_AGGREGATE	1	0
AGGREGATE(aggregations:max(duration_millis))	2	1
TRANSFORM_PASSTHROUGH(duration_millis)	3	2
PROJECT(duration_millis)	4	3
FILTER_EMPTY	5	4
results without explain plan
with explain plan
r
this is because the explain plan feature chooses a random segment, so given that the filter explicitly selects a segment, it will usually be a trivially empty filter. This should probably be fixed on master, but if it isn't, and a user filters on a segment, then the plan should utilise that info.
s
Explain plan has since been enhanced to include more detailed output. cc: @Sonam Mandal
h
Got it. Thanks folks