问题描述
我是不熟悉DB的新手.现在,我需要将MySQL数据库迁移到influxDB中.我选择Influx DB,因为它支持类似SQL的查询.但是我找不到加入其中的人.我有一个名为Statistics的系列,其中包含browser_id,另一个系列包含浏览器列表.我怎样才能像关系数据库概念一样加入这两个表?我写了这个查询,但是没有给出任何结果.
I am new to influx DB. Now I need to migrate MySQL db into influxDB. I chose influx DB because it support SQL like queries. But I could not found left join in it. I have a series called statistics which contains browser_id and another series contains browser list. How can I join these 2 tables like relational database concept?I wrote this query but it is not giving any result.
select * from statistics as s inner join browsers as b where s.browser_type_id = b.id
统计
浏览器
推荐答案
您不能使用任意列在InfluxDB中加入系列. InfluxDB仅支持基于时间列的加入时间序列.这是一种特殊的联接类型,与您在关系数据库中惯用的联接不同. InfluxDB中的时间联接试图将大约在同一时间发生的不同时间序列中的点关联起来.您可以在文档中的文档中
You cannot join series in InfluxDB using arbitrary columns. InfluxDB only supports joining time series based on the time column. This is a special type of join unlike the one you're used to in relational databases. Time join in InfluxDB tries to correlate points from different time series that happened at approximately the same time. You can read more about joins in InfluxDB in the docs
这篇关于左加入influx DB的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!