-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Speed up read dimension fields in TS #128283
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Pinging @elastic/es-storage-engine (Team:StorageEngine) |
martijnvg
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, nice optimization!
|
|
||
| void readValues(int segment, int docID) throws IOException { | ||
| segments[segment].read(docID, builders); | ||
| void readValues(int segment, int docID, boolean nonDimensionFieldsOnly) throws IOException { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: consider adding a comment here to highlight the optimizatino, i.e. dimensions need to be fetched only once per tsid, as opposed to metrics.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, added in e8d2a87
|
Thanks friends! |
When reading dimension fields in the TS command, we can skip reading values while the
tsidremains unchanged to improve performance. I benchmarked this change with the following query:The total query time was reduced from 51ms to 39ms, with processing time in the time-series source operator reduced from 26ms to 17ms.