Reputation: 398
I am interested in a question about elasticsearch (2.x) performance and numeric datatypes: if I can fit my field into either byte
, or short
, or integer
- what is the best option to choose in terms of performance: indexing, query and aggregation time?
I understand that the selection of a certain datatype has direct impact on the memory usage. But it is not clear for me what effect it can have on the indexing, search and aggregation performance (e.g. there can be types casts under the hood, etc.).
If anyone have an answer - thanks in advance!
Upvotes: 0
Views: 893
Reputation: 52368
I believe the only thing to consider when it comes to numeric values from disk space used, indexing performance and certain query performance related aspects is the precision_step
which, depending on your usage (if using range
queries or not) and on the numeric type, it can generate more terms at indexing time (having a very small implication on the search performance as well) or not. This being said, if you still need "big" numbers and you don't need range
queries considering configuring the precision_step to be 2147483647
.
Upvotes: 1