0

I'm using mongodb to store a time-series (for rendering a plot), with the following format:

{
    _id: // as generated by default
    time: [array of 32 bit int], // timestamp
    value: [array of double] // value at timestamp
}

Both arrays have between 500,000 and 5'000,000 elements. The timestamps in "time" are unique and ordered. I haven't configured an index yet.

This time-series is deleted and recreated multiple times (about 100 times in 60 minutes) as data is dynamically modified in an external server; I'm using mongodb in a "cache" layer.

Right now the process of deleting and storing a new time-series is taking about 300 ms. Is there any way I could change this collection to make it faster?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.