Hi everyone,
I’m migrating from InfluxQL to SQL in InfluxDB v3 Cloud and I need an efficient way to get distinct tag values. In InfluxQL, I used:
SHOW TAG VALUES FROM mytable WITH KEY = mytag;
This query runs in 324ms.
However, in SQL, both:
SELECT DISTINCT mytag FROM mytable;
SELECT mytag FROM mytable GROUP BY mytag;
fail to execute due to the large volume of data.
Question:
Is there a faster way to retrieve distinct tag values in InfluxDB v3 SQL, similar to SHOW TAG VALUES
?
Thanks in advance.