Is there a way to update the value by time?

Is there a way to update the value by time?
I search again and can see some results says I have to delete the data and insert again.

insert example,a=1,b=3,c=4 value=“x=1;y=2;z=3” time=1111111111111111
if I need to change the “a” or “value”,
I will have to
delete example where time=11111111111111111
insert example,a=2,b=4,c=5value=“x=1;y=2;z=3” time=1111111111111111
like this.

is that high efficiency in realtime updates?

thanks e-dard my requiments is
receiving some realtime data of finance stocks. as you know. every raw data is in form of miliseconds and I don’t want to save it to database as its too big when I always receive it. so I have to conbine them to 1 minutes data. so the time format is “minute”,not “seconds” or “miliseconds” or “nanoseconds” for me. if I can update the data by “minute”, then I decouple the usage of keep the last minute on my memory.

If you are updating the TAG value it will result in a newer log entry or newer database entry. If you are updating a field value; it will only update the field value (or the entry will be overwritten with newer values).

Seems like based on your requirement you are looking at updating both TAG and FIELD values. Check if you are make schema changes so only fields are updated.

thanks sbains,

my schema should only change the field value. I don’t even need a tag . I fetch the data by the series name.
but there is no "update command " for this.

Yes there is no update command but insert in this case will overwrite the existing data(row).

yes,i expect the overwritten,but the results seems not correct.

insert tests,tag1=1 value=2,value2=3,value=4,time=1505799797664800000
insert tests,tag1=1 value=2,value2=3,value=5,time=1505799797664800000
select * from tests
name: tests
time tag1 value value2

1505992562784332100 1 4 3
1505992567985629600 1 5 3

I thin the time format that you have specified is incorrect. From the output you can see it is showing two different timestamps. Can you try the following format:

insert tests,tag1=1 value=2,value2=3,value=4 1505799797664800000
insert tests,tag1=1 value=2,value2=3,value=5 1505799797664800000

Also if you perform select * on the tests measurement. You will see the time as a field rather than timestamp.

1 Like

wow amazing,works good when I use your coding format. thank you very much.