SQL vs. Flux: Choosing the right query language for time-ser资料
本文为去找网小编(www.7zhao.net)为您推荐的SQL vs. Flux: Choosing the right query language for time-series data，希望对您有所帮助，谢谢！
G enerally in the world of database query languages, there have been two extremes: full SQL support on one end, and completely custom languages (sometimes known as “NoSQL”) on the other.
With time-series databases, the differences between these languages can be seen by comparing TimescaleDB and InfluxDB .
From the beginning, TimescaleDB has firmly existed at the SQL end of the spectrum, fully embracing the language from day 1, and later further extending it to simplify time-series analysis. This has enabled TimescaleDB to require a zero learning curve for new users, and allowed it to inherit the entire SQL ecosystem of 3rd party tools, connectors, and visualization options, which is larger than that of any other time-series database.
In contrast, InfluxDB began with a “SQL-like” query language (called ), placing it in the middle of the spectrum, and has recently made a marked move towards the “custom” end with its new query language. This has allowed InfluxDB to create a new query language that its creators would argue overcomes some SQL shortcomings that they experienced. (Read the and the .)
So how do these two query languages compare?
To analyze the differences between SQL and Flux, let’s first dig into why the InfluxDB team created Flux, as opposed to embracing SQL.
According to , InfluxDB created Flux primarily for two reasons:
Query support: They concluded SQL could not easily handle the types of queries they wanted to run on time-series data.
Relational algebra vs. flow-based functional processing: They believed that a time-series query language needed a flow-based functional model, as opposed to the relational algebra model in SQL.
(There’s also a third reason stated in the post: that SQL was invented in the 1970s. This point is odd, especially considering that other foundational technologies were also born in that same era: the relational database, the microprocessor, and the Internet. These technologies, like SQL, have evolved significantly since their initial invention, while other technologies have not. Also, common modern languages such as English were “invented” hundreds of years ago, and have also evolved over time, while other languages have fallen out of use. So we believe the decade in which something was invented is irrelevant to this discussion. With that in mind, we’ll return to the main discussion.)
Let’s unpack both of these reasons.
以上为SQL vs. Flux: Choosing the right query language for time-series data文章的全部内容，若您也有好的文章，欢迎与我们分享！