Time series database design?
العربية
български
català
中文
čeština
dansk
Nederlands
eesti
suomi
français
Deutsch
Ελληνικά
עברית
हिंदी
magyar
Bahasa Indonesia
italiano
日本語
한국어
latviešu
lietuvių
norsk
polski
Português
română
русский
slovenčina
slovenski
español
svenska
ไทย
Türkçe
українська
Tiếng Việt
How would you design a time series database?
The implementation should be as fast as possible for lookup of data between date-time ranges and be capable of storing massive amounts of data.
Insertions should ideally be as fast as possible, although interested to hear of trade offs between read and write performance.
I realise this is an open ended question but am just looking to get an understanding of some of the considerations that inform the design. I'm not looking for recommendations on existing implementations, just curious as to how one might work on the inside...
Answer |
A typical way of such database design is to have a table with data with 3 fields (parameterID, time, value) and then index by (parameterID, time). We have several terabyte(s) sized databases with these design and run smoothly.
It is important to choose an storage engine that allows SELECT and INSERTS simultaneously. If you use any storage engine with table locking (e.g. MyISAM) you will experience query contention that will slow your system down.