• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

TimescaleDB: TimescaleDB 是基于 PostgreSQL 数据库开发的一款时序数据库,以插件化 ...

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称:

TimescaleDB

开源软件地址:

https://gitee.com/mirrors/TimescaleDB

开源软件介绍:

Linux/macOSLinux i386WindowsCoverityCode Coverage
Build Status Linux/macOSBuild Status Linux i386Windows build statusCoverity Scan Build StatusCode Coverage

TimescaleDB

TimescaleDB 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 -DAPACHE_ONLY=1 to bootstrap.

Contributors welcome.

(To build TimescaleDB from source, see instructions in Building from source.)

Using TimescaleDB

TimescaleDB 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 start

PostgreSQL's out-of-the-box settings are typically too conservative for modernservers and TimescaleDB. You should make sure your postgresql.confsettings are tuned, either by using timescaledb-tuneor doing it manually.

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 data

Inserting 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 time_bucket function above.)

Installation

TimescaleDB 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.

Resources

Useful tools

  • timescaledb-tune: Helpsset your PostgreSQL configuration settings based on your system's resources.
  • timescaledb-parallel-copy:Parallelize your initial bulk loading by using PostgreSQL's COPY acrossmultiple workers.

Additional documentation

Community & help

Releases & updates

Contributing


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
GreatSQL-Doc: GreatSQL-Doc发布时间:2022-03-24
下一篇:
lubejs: Lubejs 是一个用于 node.js 诣在方便使用SQL数据库连接发布时间:2022-03-24
热门推荐
热门话题
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap