Performance degradation when using Date field in epoch millis vs date values stored as long numbers

Hi, we are migrating to Elastic search 7.x from ES 1.7

We were storing various date values as long numbers (milliseconds) in our Elastic 1.7 server.
However, we would want to move to ES 7.x and decided to make use of "date" field provided by ES 7.x , with format as "epoch_millis".

While comparing the performance of sort queries on above mentioned changes, I see that the dates stored as long numbers in ES 1.7 are retrieved 3x times faster than dates stored as "date type" with epoch_millis format. Both the ES 1.7 and ES 7.x servers have similar hardware capacities.

Could someone provide inputs on why the performance degraded? Below is the result!

ES 1.7

Mapping

postTimeMs" : {
            "type" : "long",
            "doc_values" : true
          }

ES 7.x

Mapping

 "post_date":{
           "type":"date",
           "format": "epoch_millis",
           "doc_values" : true
        },

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.