DB

Couchbase vs CouchDB

Couchbase Server
Apache CouchDB
Topology
Distributed
Replicated
Automatic failover
Yes
No
Integrated cache
Yes
No
Memcached compatible
Yes
No
Query language
Yes, N1QL (SQL for JSON)
No

API Query

key-value

Time Series DBs

Elastic, InfluxDB, MongoDB, Cassandra, Couchbase, Graphite, Prometheus, ClickHouse, OpenTSDB, DalmatinerDB, KairosDB, RiakTS.

TimescaleDB

https://github.com/timescale/timescaledb packaged as a PostgreSQL extension
1
docker run -d --name timescaledb -p 5432:5432 timescale/timescaledb
Copied!
1
CREATE EXTENSION IF NOT EXISTS timescaledb CASCADE;
2
3
SELECT create_hypertable('conditions', 'time');
4
-- backgroud:
5
CREATE INDEX conditions_time_idx
6
ON public.conditions USING btree
7
("time" DESC)
8
TABLESPACE pg_default;
9
10
-- additionally partition the data on another
11
-- dimension (what we call 'space partitioning').
12
-- E.g., to partition `location` into 4 partitions:
13
SELECT create_hypertable('conditions', 'time', 'location', 4);
14
15
SELECT time_bucket('5 minutes', time) AS time_range,
16
location, COUNT(*),
17
MAX(temperature) AS max_temp,
18
MAX(humidity) AS max_hum
19
FROM conditions
20
WHERE time > NOW() - interval '3 hours'
21
GROUP BY time_range, location
22
ORDER BY time_range DESC, max_temp DESC;
23
24
time_range | location | count | max_temp | max_hum
25
------------------------+----------+-------+----------+---------
26
2018-02-23 17:00:00+00 | office | 3 | 70 | 50
27
2018-02-23 16:35:00+00 | garage | 1 | 77 | 65.2
28
2018-02-23 16:35:00+00 | office | 2 | 70.1 | 50.1
29
2018-02-23 16:35:00+00 | basement | 1 | 66.5 | 60
30
2018-02-23 16:25:00+00 | office | 1 | 70 | 50
31
(5 rows)
Copied!

Riak TS

http://docs.basho.com/riak/ts/ Riak TS is a distributed NoSQL key/value store optimized for time series data.
Last modified 1yr ago