在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:TimescaleDB开源软件地址:https://gitee.com/mirrors/TimescaleDB开源软件介绍:
TimescaleDBTimescaleDB is an open-source database designed to make SQL scalable fortime-series data. It is engineered up from PostgreSQL and packaged as aPostgreSQL extension, providing automatic partitioning across time and space(partitioning key), as well as full SQL support. If you prefer not to install or administer your instance of TimescaleDB,hosted versions of TimescaleDB areavailable in the cloud of your choice (pay-as-you-go, with a free trial to start). To determine which option is best for you, see Timescale Productsfor more information about our Apache-2 version, TimescaleDB Community (self-hosted), and TimescaleCloud (hosted), including: feature comparisons, FAQ, documentation, and support. Below is an introduction to TimescaleDB. For more information, please check outthese other resources: For reference and clarity, all code files in this repository referencelicensing in their header (either the Apache-2-open-source licenseor Timescale License (TSL)). Apache-2 licensed binaries can be built by passing (To build TimescaleDB from source, see instructions in Building from source.) Using TimescaleDBTimescaleDB scales PostgreSQL for time-series data via automaticpartitioning across time and space (partitioning key), yet retainsthe standard PostgreSQL interface. In other words, TimescaleDB exposes what look like regular tables, butare actually only anabstraction (or a virtual view) of many individual tables comprising theactual data. This single-table view, which we call ahypertable,is comprised of many chunks, which are created by partitioningthe hypertable's data in either one or two dimensions: by a timeinterval, and by an (optional) "partition key" such asdevice id, location, user id, etc. (Architecture discussion) Virtually all user interactions with TimescaleDB are withhypertables. Creating tables and indexes, altering tables, insertingdata, selecting data, etc., can (and should) all be executed on thehypertable. From the perspective of both use and management, TimescaleDB justlooks and feels like PostgreSQL, and can be managed and queried assuch. Before you startPostgreSQL's out-of-the-box settings are typically too conservative for modernservers and TimescaleDB. You should make sure your Creating a hypertable-- Do not forget to create timescaledb extensionCREATE EXTENSION timescaledb;-- We start by creating a regular SQL tableCREATE TABLE conditions ( time TIMESTAMPTZ NOT NULL, location TEXT NOT NULL, temperature DOUBLE PRECISION NULL, humidity DOUBLE PRECISION NULL);-- Then we convert it into a hypertable that is partitioned by timeSELECT create_hypertable('conditions', 'time'); Inserting and querying dataInserting data into the hypertable is done via normal SQL commands: INSERT INTO conditions(time, location, temperature, humidity) VALUES (NOW(), 'office', 70.0, 50.0);SELECT * FROM conditions ORDER BY time DESC LIMIT 100;SELECT time_bucket('15 minutes', time) AS fifteen_min, location, COUNT(*), MAX(temperature) AS max_temp, MAX(humidity) AS max_hum FROM conditions WHERE time > NOW() - interval '3 hours' GROUP BY fifteen_min, location ORDER BY fifteen_min DESC, max_temp DESC; In addition, TimescaleDB includes additional functions for time-seriesanalysis that are not present in vanilla PostgreSQL. (For example, the InstallationTimescaleDB is available pre-packaged for several platforms: Timescale Cloud(cloud-hosted and managed TimescaleDB) is available via free trial. You create databaseinstances in the cloud of your choice and use TimescaleDB to power yourqueries, automating common operational tasks and reducing management overhead. We recommend following our detailed installation instructions. To build from source, see instructionshere. ResourcesUseful tools
Additional documentation
Community & help
Releases & updates
Contributing |
请发表评论