I had hypothesized that time series are ordered by name first and then 
ordered by the tags hash key using the HashKey() method in models/points.go.

To test my hypothesis, I used tag foo=hello.there on one time series and 
tag foo=hello there on another and named the time series the same. The time 
series with tag foo=hello.there appeared after the one with tag foo=hello 
there.

Since the HashKey() function escapes the ' ' with '\ ', I would have 
expected 'hello there' to come after 'hello.there' not before.


On Friday, December 2, 2016 at 9:00:02 AM UTC-8, Travis Keep wrote:
>
> I am using influx 0.13.0
>
> If I run a query like the following from within the influx client:
>
> select mean(value) from /process/ where time >= now() - 40m and time < 
> now() - 20m group by host, time(5m)
>
> I see four time series shown in the following order:
>
>
> *name: process_atags: host=apple*
> time            mean
> ----            ----
> 1480640400000000000    
> 1480640100000000000    
> 1480639800000000000    5303.000749873667
> 1480639500000000000    5303.0006949655
> 1480639200000000000    5303.000645723
>
>
> *name: process_atags: host=butter*
> time            mean
> ----            ----
> 1480640400000000000    
> 1480640100000000000    
> 1480639800000000000    5268.000403206001
> 1480639500000000000    5268.0003494635
> 1480639200000000000    5268.0003098444995
>
>
> *name: process_btags: host=apple*
> time            mean
> ----            ----
> 1480640400000000000    
> 1480640100000000000    
> 1480639800000000000    5773.000883236
> 1480639500000000000    5773.0008339935
> 1480639200000000000    5773.000784001
>
>
> *name: process_btags: host=butter*
> time            mean
> ----            ----
> 1480640400000000000    
> 1480640100000000000    
> 1480639800000000000    4598.000522668
> 1480639500000000000    4598.0004695515
> 1480639200000000000    4598.000431057
>
>
> Note the order of the time series. They are ordered first by the time 
> series name and second by the time series 'host' tag value.  
>
> If I were to add ' order by time desc' to my query, the time series 
> themselves would show in reverse order in addition to their times being in 
> reverse order.
>
>
>
>
>
>
> *Question: Can I safely make any assumptions about the order of time 
> series within a result set?Question: Do current influx db clients such as 
> the go client library make any assumptions about the order of time series 
> within a result set?*
>

-- 
Remember to include the version number!
--- 
You received this message because you are subscribed to the Google Groups 
"InfluxData" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to influxdb+unsubscr...@googlegroups.com.
To post to this group, send email to influxdb@googlegroups.com.
Visit this group at https://groups.google.com/group/influxdb.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/influxdb/2fe5e123-11b5-48be-a7c5-0b7677c430ff%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to