Hi, does pinot by default create sorted forward in...
# pinot-dev
k
Hi, does pinot by default create sorted forward index on a column of type datetime?
m
Hi, no this is not the case.
Are you seeing any issues, or just curious? Trying to get the question behind the question.
k
Just curious to know
Also the intent is whether adding such a index will improve the query performance? Considering these values will be unique in all the rows. I was considering sorted forward index on raw values.
j
Currently we treat datetime column the same as regular columns except for retention management. Also, sorted index is always dictionary encoded, and cannot be applied directly to raw values
If the values are sorted within the segment, Pinot will detect that and generate sorted index automatically
k
My datetime field is sorted in a Kafka partition. So will pinot automatically create sorted index for it?
Also is there a way to verify if the index was created?
m
For real-time ingrstuons, sorted index generation happens within Pinot. You can look at the index metadata api via swagger to check if the segment is sorted
k
Okay. Thank you.
Tried using /segments/{tableName}/{segmentName}/metadata . Didn't get the index info. Is there any other api I should be using?
m
Oh my bad, that gives the ZK metadata probably. Do you have access to the segment directory?
If so, there's a metadata.properties file in there that should tell you the indexing info
k
Are we referring to this metadata?
m
Yes
k
Okay are there any other indexes created by default?
m
No indexes are not created by default.