mirror of
https://github.com/timescale/timescaledb.git
synced 2025-05-18 19:59:48 +08:00
The current schema and code support only one "time" and one "space" dimension for partitioning. While this is probably good enough for many applications, it won't allow partitioning along two "space" dimensions, like longitude and latitude, for instance. This commit is a first stab at refactoring the metadata schema and internal functionality to support any number of partitioning dimensions. The idea is to think of a hypertable as partitioned in N dimensions, where a partition (chunk) is a hypercube in the N-dimensional hyperspace. Each dimension is divided into a number of "slices" (dimensional partitions) that each occupies a range along the dimension's keyspace axis. A dimension can either be "closed" or "open", indicating a space-like or time-like dimension, respectively. Closed dimensions have a limited number of partitions that cover the entire domain. Open dimensions have an unlimited number of partitions and thus must be created on-demand as needed for the inserted data. Note that the open/closed notation is preferred over time/space, since an open dimension could be used for something other than time (for instance, a sequence number). Conversely, closed dimensions need not be space-like as it is entirely possible to use time as a closed dimension. Another advantage of this refactoring is that it now unifies a lot of the logic for time and space that used to be separate. On a schema-level, this gets rid of partition/partitition_epoch tables and replace them with dimension, dimension_slice, and chunk_constraint. It also removes the time columns associated with a chunk and instead makes this a separate dimension stored as a chunk_constraint.
TimescaleDB is an open-source database designed to make SQL scalable for time-series data. It is engineered up from PostgreSQL, providing automatic partitioning across time and space (partitioning key), as well as full SQL support.
TimescaleDB is packaged as a PostgreSQL extension and released under the Apache 2 open-source license. Contributors welcome.
To install TimescaleDB, follow the instructions here:
Additional documentation can be found on our docs website, including the following:
Description
An open-source time-series SQL database optimized for fast ingest and complex queries. Packaged as a PostgreSQL extension.
analyticsdatabasefinancial-analysishacktoberfestiotpostgrespostgresqlsqltime-seriestime-series-databasetimescaledbtsdb
Readme
88 MiB
Languages
C
67.7%
PLpgSQL
25.6%
CMake
1.8%
Ruby
1.7%
Python
1.3%
Other
1.9%