Hi, I have a question around broker / server pruni...
# general
Hi, I have a question around broker / server pruning. I have 2 servers and 4 segments. The mapping is: • server-0 1. metrics_OFFLINE_26835599_26835666_3 2. metrics_OFFLINE_26835733_26835799_2 • server-1 1. metrics_OFFLINE_26835799_26835866_0 2. metrics_OFFLINE_26835666_26835733_1 When i do a query like 
select device, count(device) as aggreg from metrics where eventTime > 26835599 and eventTime < 26835626 group by device order by aggreg desc limit 10
I see: • numServersQueried = 2numServersResponded = 2numSegmentsQueried = 4numSegmentsProcessed = 1numSegmentsMatched  = 1 Questions: 1. Given above query, the 
  falls within time range of a single segment - 
 . So i was expecting numServersQueried to be 1 (instead of 2). Do i need to set something up for broker pruning to take effect? 2. Similarly i was expecting numSegmentsQueried to be 1 (instead of 4). 3. I always see numSegmentsProcessed and numSegmentsMatched to be same value always. What is the difference between the two. I looked at https://docs.pinot.apache.org/users/api/querying-pinot-using-standard-sql/response-format, but it wasn’t super clear to me from reading there.
• numSegmentsQueried is equal to the number of segments broker decided to query • numSegmentsProcessed is the number of segments server decided to query after all the pruning (if any) • numSegmentsMatched are those segments where at least 1 matching row for the query was found on the servers. In your case, it happens to be in all processed segments • To reduce the number of segments queried, pruning can be used. Broker can prune on the basis of partition column if your table is partitioned and the partitioning key is used in the query with = predicate. Server can prune on the basis of time column filter. Server can also prune using bloom filter if bloom filter is created on the column you are using in the query with = filter
@Sidd Then does numSegmentsQueried imply the total number of segments?
And can broker not apply pruning based on time column. And only server can apply that pruning?
numSegmentsQueried is the number of segments broker decided to query. If there is no partitioning, this will be equal to the number of segments in the table. Broker side time column based pruning is there. Support was recently added. Not sure if it is already out in the latest release. and if there is more remaining work here.
@Jiapeng Tao may know if broker side time column pruning is available in the release and how to enable it
Thanks @Sidd. So based on above, looks like server pruning is happening, but broker pruning is not kicking in. Will wait for response from @Jiapeng Tao on how to get broker pruning to work. BTW i am running 0.6 version as of now
@jiatao ^^
The feature is merged recently, seems like release 0.6.0 did not cover it.
@Jiapeng Tao do you know when next version will be released?