Continuouse Query Delay

I have CQ in my Influxdb delay, please give me solution. Thanks

Hi Alvianno ,
what is your shard duration ?
I ask this because querying small portions of large shards could be the reason …

best regards ,
Marc

I use default conf for influxdb

Hi Alvianno ,

the default is autogen , it has a shard duration of 7 days and a retention policy duration of 0s ,
that also means your data will be removed after 7 days , ( shard duration )
You could consider using your own config and use shard durations of for example 1 day or less ( the minimum is 1 hour )
but be carefull , if you change the shard duration to 1 day and you keep using the autogen retention policy ,
your data will be removed after 1 day …
( see : show retention policies ) if that says duration : 0s the retention will be defined by the shard duration.

You could also change the default retention policy as follows :

alter retention policy autogen on your_db duration 52w shard duration 1d ;

I don’t know a lot about your configuration so please consider this as examples which
need to be adapted to fit your situation ,

If your shards change from 7days to 1 day the query could be 7 times faster ( in theory ) .
Please note that a new shard will be created only after the duration of your current shard is reached.

ps : must the CQ really be faster ? Is it a problem that it takes 35 seconds ?
It only means that your data in the CS_TSELDB database does not contain the last 35 seconds
of data from your RAW_TSELDB …

best regards ,
Marc

What diferent between shard & retention policy?

Hi @alvianno, you can think of shard group duration as the length of the window of time of points that are being stored in that shard. This defaults to a 7 day window. The retention policy is what governs when shards will be discarded. You can check out this post for more information: https://www.influxdata.com/blog/influxdb-shards-retention-policies/

Im set 1 hour because big data