Also, you can use larger time ranges in the GROUP BY, like GROUP BY
time(3650d), or even GROUP BY time(522w), which is the same duration but
easier to read.

On Tue, Aug 23, 2016 at 4:30 PM, Sean Beckett <[email protected]> wrote:

> Can you share the output from "select count(*) from car where time > 0
> group by time(315360000s)"?
>
> Continuous queries can only run SELECT queries, not SHOW queries.
>
> On Tue, Aug 23, 2016 at 4:13 PM, Emiliano Heyns <
> [email protected]> wrote:
>
>> On Tue, Aug 23, 2016 at 11:58 PM, Sean Beckett <[email protected]> wrote:
>>
>>> It usually makes sense to use a CQ to pre-calculate expensive or very
>>> common queries. However, CQs require a "GROUP BY time" clause. Are you
>>> running COUNT() over intervals or since all time?
>>>
>>>
>> Since all time, but if I can group by 315360000s, that's plenty.
>> Actually, any time slice is OK, since summing over multiple rows will be
>> plenty fast.
>>
>> I tried "select count(*) from car where time > 0 group by
>> time(315360000s)", but that gives me 5 rows, and there's only 11 months of
>> data in the DB.
>>
>> Loosely related, can I stick the results of SHOW STATS in a CQ?
>>
>> --
>> Remember to include the InfluxDB version number with all issue reports
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "InfluxDB" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>> To post to this group, send email to [email protected].
>> Visit this group at https://groups.google.com/group/influxdb.
>> To view this discussion on the web visit https://groups.google.com/d/ms
>> gid/influxdb/CAHOSGO4gUPpdgYXbwQ_%2BPctEyN4AGcbavnucqHROtGHW
>> usgLow%40mail.gmail.com
>> <https://groups.google.com/d/msgid/influxdb/CAHOSGO4gUPpdgYXbwQ_%2BPctEyN4AGcbavnucqHROtGHWusgLow%40mail.gmail.com?utm_medium=email&utm_source=footer>
>> .
>>
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> --
> Sean Beckett
> Director of Support and Professional Services
> InfluxDB
>



-- 
Sean Beckett
Director of Support and Professional Services
InfluxDB

-- 
Remember to include the InfluxDB version number with all issue reports
--- 
You received this message because you are subscribed to the Google Groups 
"InfluxDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
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/CALGqCvM%2BXLxwuK6ZZgnm3kWz%3DWN7C0bjnyCdX1VQqzHVv%2BeGQA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to