Time Series Data for IoT devices!

preview_player
Показать описание

Did you know you can store time series data for your IoT devices in MongoDB? That’s right! We have time series collections that handle all the complexities of time series data behind the scenes for you.

------

#mongodb #timeseries #atlas
Рекомендации по теме
Комментарии
Автор

did you guys from mongodb actually even test these things before making videos, documentation and ads ?! because it's so slow:
1.3 millions of record grouped in 2 seconds compared to the 300 millisec with a simple "group by" clause using postgres.

`Query Performance Summary
7 documents returned
110958 documents examined
3008 ms execution time
Is not sorted in memory
0 index keys examined`

the query:
`[
{
'$group': {
'_id': {
'$dateToString': {
'format': '%Y-%m',
'date': '$timestamp'
}
},
'avg_temp': {
'$avg': '$temperature'
},
'avg_humidity': {
'$avg': '$humidity'
}
}
}, {
'$sort': {
'_id': 1
}
}
]`

and yes, I followed the example explained in this video step by step

impshrj