MongoDB Time Series
since v5 13th July 2021
improved in v6 19th July 2022
official docs had no small example
barely any blogs and videos
Christoph Ahlers
Christoph Ahlers
Christoph Ahlers
Christoph Ahlers
Christoph Ahlers
Christoph Ahlers
finance
weather
IoT
Finance photo by Maxim Hopman on Unsplash
Christoph Ahlers
Christoph Ahlers
brings new special pipeline operations
Benefits vs Collections:
reduced complexity for developers
improved performance
improved query efficiency
reduced disk usage
reduced I/O for read operations
increased cache usage
💰cheaper
Christoph Ahlers
Christoph Ahlers
granularity | bundled time span |
---|---|
seconds (dflt) | 1 hour |
minutes | 24 hours |
hours | 30 days |
🪣
🪣
🪣
Christoph Ahlers
Christoph Ahlers
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-mongodb</artifactId>
</dependency>
<properties>
<testcontainers.version>1.17.5</testcontainers.version>
</properties>
...
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>mongodb</artifactId>
<version>${testcontainers.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>junit-jupiter</artifactId>
<version>${testcontainers.version}</version>
<scope>test</scope>
</dependency>
Christoph Ahlers
Christoph Ahlers
Christoph Ahlers
Christoph Ahlers
Christoph Ahlers
Christoph Ahlers
Christoph Ahlers