精简流入数据库时间序列/删除重复项
Posted
技术标签:
【中文标题】精简流入数据库时间序列/删除重复项【英文标题】:Thin out influx database time series / remove duplicates 【发布时间】:2021-04-08 14:35:36 【问题描述】:我在将数据记录到我的 influx 数据库时犯了一个错误。我没有将传感器的每次变化都作为测量点记录到表中,而是意外地强制每秒记录数据。因此,它们中的大多数基本相同,显然不必要地使数据库更大。
例子:
time value
---- -----
1581118753696000000 3.9
1581119113761000000 3.8
1581119473832000000 3.7
1581119942525000000 3.7
1581120002534000000 3.6
1581120782667000000 3.5
1581121082743000000 3.4
1581121562864000000 3.3
1581122191957000000 3.2
1581122192963000000 3.2
1581122193968000000 3.2
1581122194973000000 3.2
1581122195979000000 3.2
1581122196985000000 3.2
1581122197991000000 3.2
1581122198997000000 3.2
1581122200003000000 3.2
1581122201010000000 3.2
1581122202016000000 3.2
1581122203019000000 3.2
1581122204024000000 3.2
1581122205028000000 3.2
1581122206033000000 3.2
1581122207039000000 3.2
1581122208045000000 3.2
1581122209051000000 3.2
1581122210057000000 3.2
1581122211062000000 3.2
1581122212068000000 3.2
1581122213073000000 3.2
1581122214078000000 3.2
1581122215084000000 3.2
1581122216090000000 3.2
1581122217096000000 3.2
1581122218102000000 3.2
1581122219108000000 3.2
1581122220112000000 3.2
1581122221118000000 3.2
1581122222123000000 3.2
1581122223129000000 3.2
1581122224134000000 3.2
1581122225140000000 3.2
1581122226144000000 3.2
1581122227150000000 3.2
1581122228154000000 3.2
1581122229160000000 3.2
1581122230166000000 3.2
1581122231172000000 3.2
1581122232175000000 3.2
1581122233179000000 3.2
1581122234184000000 3.2
1581122235190000000 3.2
1581122236194000000 3.2
1581122237198000000 3.2
1581122238202000000 3.2
1581122239207000000 3.2
1581122240212000000 3.2
1581122241217000000 3.2
1581122242222000000 3.2
1581122243227000000 3.2
1581122244233000000 3.2
1581122245237000000 3.2
1581122246241000000 3.2
1581122247246000000 3.2
1581122248251000000 3.2
1581122249257000000 3.2
1581122250261000000 3.2
1581122251265000000 3.2
1581122252270000000 3.2
1581122253274000000 3.2
1581122254279000000 3.2
1581122255283000000 3.2
1581122256288000000 3.2
1581122257293000000 3.2
1581122258298000000 3.2
1581122259303000000 3.2
1581122260307000000 3.2
1581122261312000000 3.2
1581122262317000000 3.2
1581122263321000000 3.2
1581122264326000000 3.2
1581122265331000000 3.2
1581122266335000000 3.2
1581122267340000000 3.2
1581122268344000000 3.2
1581122269348000000 3.2
1581122270352000000 3.2
1581122271356000000 3.2
1581122272360000000 3.2
1581122273363000000 3.2
1581122274366000000 3.2
1581122275370000000 3.2
1581122276373000000 3.2
1581122277376000000 3.2
1581122278380000000 3.2
1581122279383000000 3.2
1581122280385000000 3.2
1581122281388000000 3.2
1581122282390000000 3.2
1581122283393000000 3.2
1581122284397000000 3.2
1581122285401000000 3.2
1581122286405000000 3.2
1581122287408000000 3.2
1581122288412000000 3.2
1581122289415000000 3.2
1581122290419000000 3.2
1581122291422000000 3.2
1581122292425000000 3.2
1581122293428000000 3.2
1581122294433000000 3.2
1581122295436000000 3.2
1581122296438000000 3.2
1581122297441000000 3.2
1581122298444000000 3.2
1581122299447000000 3.2
1581122300450000000 3.2
1581122301453000000 3.2
1581122302456000000 3.2
1581122303458000000 3.2
1581122304460000000 3.2
1581122305463000000 3.2
1581122306465000000 3.2
1581122307468000000 3.2
1581122308470000000 3.2
1581122309473000000 3.2
1581122310476000000 3.2
1581122311478000000 3.2
1581122312481000000 3.2
1581122313484000000 3.2
1581122314487000000 3.2
1581122315489000000 3.2
1581122316491000000 3.2
1581122317493000000 3.2
1581122318495000000 3.2
1581122319497000000 3.2
1581122320500000000 3.2
1581122321503000000 3.2
1581122322533000000 3.2
1581122323538000000 3.2
1581122324540000000 3.2
1581122325543000000 3.2
1581122326546000000 3.2
1581122327549000000 3.2
1581122328551000000 3.2
1581122329554000000 3.2
1581122330556000000 3.2
1581122331559000000 3.2
1581122332562000000 3.2
1581122333565000000 3.2
1581122334568000000 3.2
1581122335571000000 3.2
1581122336573000000 3.2
1581122337576000000 3.2
1581122338578000000 3.2
1581122339580000000 3.2
1581122340583000000 3.2
1581122341586000000 3.2
1581122342589000000 3.2
1581122343592000000 3.2
1581122344594000000 3.2
1581122345597000000 3.2
1581122346600000000 3.2
1581122347602000000 3.2
1581122348605000000 3.2
1581122349608000000 3.2
1581122350611000000 3.2
1581122351614000000 3.2
1581122352617000000 3.2
1581122353619000000 3.2
1581122354621000000 3.2
1581122355624000000 3.2
1581122356627000000 3.2
1581122357632000000 3.2
1581122358635000000 3.2
1581122359638000000 3.2
1581122360641000000 3.2
1581122361644000000 3.2
1581122362647000000 3.2
1581122363650000000 3.2
1581122364652000000 3.2
1581122365654000000 3.2
1581122366657000000 3.2
1581122367660000000 3.2
1581122368663000000 3.2
1581122369667000000 3.2
1581122370669000000 3.2
1581122371672000000 3.2
1581122372675000000 3.2
1581122373677000000 3.2
1581122374680000000 3.2
1581122375683000000 3.2
1581122376686000000 3.2
1581122377689000000 3.2
1581122378692000000 3.2
1581122379695000000 3.2
1581122380698000000 3.2
1581122381701000000 3.2
1581122382703000000 3.2
1581122383706000000 3.2
1581122384708000000 3.2
1581122385710000000 3.2
1581122386713000000 3.2
1581122387715000000 3.2
1581122388718000000 3.2
1581122389721000000 3.2
1581122390724000000 3.2
1581122391727000000 3.2
1581122392730000000 3.2
1581122393733000000 3.2
1581122394736000000 3.2
1581122395739000000 3.2
1581122396742000000 3.2
1581122397745000000 3.2
1581122398748000000 3.2
1581122399751000000 3.2
1581122400754000000 3.2
1581122401757000000 3.2
1581122402760000000 3.2
1581122403763000000 3.2
1581122404766000000 3.2
1581122405769000000 3.2
1581122406772000000 3.2
1581122407775000000 3.2
1581122408779000000 3.2
1581122409782000000 3.2
1581122410785000000 3.2
1581122411788000000 3.2
1581122412790000000 3.2
1581122413793000000 3.2
1581122414796000000 3.2
1581122415797000000 3.2
1581122416799000000 3.2
1581122417801000000 3.2
1581122418804000000 3.2
1581122419807000000 3.2
1581122420810000000 3.2
1581122421813000000 3.2
1581122422816000000 3.2
1581122423819000000 3.2
1581122424822000000 3.2
1581122425824000000 3.2
1581122426825000000 3.2
1581122427828000000 3.2
1581122428831000000 3.2
1581122429834000000 3.2
1581122430837000000 3.2
1581122431839000000 3.2
1581122432842000000 3.2
1581122433843000000 3.2
1581122434845000000 3.2
1581122435848000000 3.2
1581122436851000000 3.2
1581122437854000000 3.2
1581122438857000000 3.2
1581122439858000000 3.2
1581122440860000000 3.2
1581122441862000000 3.2
1581122442864000000 3.2
1581122443867000000 3.2
1581122444868000000 3.2
1581122445870000000 3.2
1581122446872000000 3.2
1581122447875000000 3.2
1581122448878000000 3.2
1581122449880000000 3.2
1581122450881000000 3.2
1581122451883000000 3.2
1581122452886000000 3.2
1581122453889000000 3.2
1581122454892000000 3.2
1581122455895000000 3.2
1581122456898000000 3.2
1581122457901000000 3.2
1581122458903000000 3.2
1581122459905000000 3.2
1581122460906000000 3.2
1581122461909000000 3.2
1581122462911000000 3.2
1581122463914000000 3.2
1581122464916000000 3.2
1581122465917000000 3.2
1581122466920000000 3.2
1581122467923000000 3.2
1581122468924000000 3.2
1581122469927000000 3.2
1581122470928000000 3.2
1581122471930000000 3.2
1581122472933000000 3.2
1581122473936000000 3.2
1581122474938000000 3.2
1581122475939000000 3.2
1581122476942000000 3.2
1581122477945000000 3.2
1581122478948000000 3.2
1581122479949000000 3.2
1581122480951000000 3.2
1581122481954000000 3.2
1581122482955000000 3.2
1581122483957000000 3.2
1581122484960000000 3.2
1581122485963000000 3.2
1581122486964000000 3.2
1581122487967000000 3.2
1581122488970000000 3.2
1581122489972000000 3.2
1581122490973000000 3.2
1581122491976000000 3.2
1581122492979000000 3.2
1581122493982000000 3.2
1581122494983000000 3.2
1581122495985000000 3.2
1581122496988000000 3.2
1581122497990000000 3.2
1581122498991000000 3.2
1581122499993000000 3.2
1581122500996000000 3.2
1581122501998000000 3.2
1581122502999000000 3.2
1581122504001000000 3.2
1581122505004000000 3.2
1581122506005000000 3.2
1581122507008000000 3.2
1581122508011000000 3.2
1581122509014000000 3.2
1581122510015000000 3.2
1581122511018000000 3.2
1581122512020000000 3.2
1581122513023000000 3.2
1581122514026000000 3.2
1581122515028000000 3.2
1581122516030000000 3.2
1581122517033000000 3.2
1581122518035000000 3.2
1581122519036000000 3.2
1581122520038000000 3.2
1581122521040000000 3.2
1581122522043000000 3.2
1581122523044000000 3.2
1581122524046000000 3.1
1581122525049000000 3.1
1581122526052000000 3.1
1581122527055000000 3.1
1581122528058000000 3.1
1581122529061000000 3.1
1581122530064000000 3.1
1581122531066000000 3.1
1581122532068000000 3.1
1581122533070000000 3.1
1581122534072000000 3.1
1581122535075000000 3.1
1581122536078000000 3.1
1581122537081000000 3.1
1581122538083000000 3.1
1581122539086000000 3.1
1581122540088000000 3.1
1581122541091000000 3.1
1581122542093000000 3.1
1581122543095000000 3.1
1581122544096000000 3.1
1581122545099000000 3.1
1581122546102000000 3.1
1581122547105000000 3.1
1581122548108000000 3.1
1581122549110000000 3.1
1581122550113000000 3.1
1581122551116000000 3.1
1581122552119000000 3.1
1581122553122000000 3.1
1581122554125000000 3.1
1581122555128000000 3.1
1581122556131000000 3.1
1581122557134000000 3.1
1581122558137000000 3.1
1581122559140000000 3.1
1581122560143000000 3.1
1581122561145000000 3.1
1581122562147000000 3.1
1581122563148000000 3.1
1581122564150000000 3.1
1581122565153000000 3.1
1581122566155000000 3.1
1581122567157000000 3.1
1581122568160000000 3.1
1581122569162000000 3.1
1581122570164000000 3.1
1581122571175000000 3.1
1581122572177000000 3.1
1581122573178000000 3.1
1581122574181000000 3.1
1581122575182000000 3.1
1581122576185000000 3.1
1581122577188000000 3.1
1581122578191000000 3.1
1581122579194000000 3.1
1581122580195000000 3.1
1581122581197000000 3.1
1581122582200000000 3.1
1581122583201000000 3.1
1581122584204000000 3.1
1581122585206000000 3.1
1581122586209000000 3.1
1581122587212000000 3.1
1581122588215000000 3.1
1581122589216000000 3.1
1581122590219000000 3.1
1581122591220000000 3.1
1581122592223000000 3.1
1581122593224000000 3.1
1581122594227000000 3.1
1581122595230000000 3.1
1581122596231000000 3.1
1581122597234000000 3.1
1581122598235000000 3.1
1581122599238000000 3.1
1581122600240000000 3.1
1581122601241000000 3.1
1581122602244000000 3.1
1581122603245000000 3.1
1581122604248000000 3.1
1581122605249000000 3.1
1581122606252000000 3.1
1581122607253000000 3.1
1581122608255000000 3.1
1581122609258000000 3.1
1581122610259000000 3.1
1581122611262000000 3.1
1581122612264000000 3.1
1581122613266000000 3.1
1581122614268000000 3.1
1581122615270000000 3.1
1581122616272000000 3.1
1581122617274000000 3.1
1581122618277000000 3.1
1581122619278000000 3.1
1581122620281000000 3.1
1581122621282000000 3.1
1581122622285000000 3.1
1581122623287000000 3.1
1581122624288000000 3.1
1581122625291000000 3.1
1581122626292000000 3.1
1581122627294000000 3.1
1581122628297000000 3.1
1581122629298000000 3.1
1581122630301000000 3.1
1581122631302000000 3.1
1581122632304000000 3.1
1581122633305000000 3.1
1581122634307000000 3.1
1581122635309000000 3.1
1581122636312000000 3.1
1581122637312000000 3.1
1581122638314000000 3.1
1581122639316000000 3.1
1581122640319000000 3.1
1581122641320000000 3.1
1581122642322000000 3.1
1581122643325000000 3.1
1581122644327000000 3.1
1581122645328000000 3.1
1581122646329000000 3.1
1581122647331000000 3.1
1581122648333000000 3.1
1581122649334000000 3.1
1581122650337000000 3.1
1581122651338000000 3.1
1581122652341000000 3.1
1581122653344000000 3.1
1581122654347000000 3.1
1581122655350000000 3.1
1581122656351000000 3.1
1581122657353000000 3.1
1581122658356000000 3.1
1581122659357000000 3.1
1581122660360000000 3.1
1581122661362000000 3.1
1581122662365000000 3.1
1581122663368000000 3.1
1581122664371000000 3.1
1581122665372000000 3.1
1581122666375000000 3.1
1581122667377000000 3.1
1581122668379000000 3.1
1581122669381000000 3.1
1581122670382000000 3.1
1581122671385000000 3.1
1581122672386000000 3.1
1581122673388000000 3.1
1581122674391000000 3.1
1581122675393000000 3.1
1581122676396000000 3.1
1581122677398000000 3.1
1581122678401000000 3.1
1581122679404000000 3.1
1581122680407000000 3.1
1581122681409000000 3.1
1581122682411000000 3.1
1581122683413000000 3.1
1581122684416000000 3.1
1581122685419000000 3.1
1581122686422000000 3.1
1581122687425000000 3.1
1581122688428000000 3.1
1581122689430000000 3.1
1581122690432000000 3.1
1581122691433000000 3.1
1581122692435000000 3.1
1581122693437000000 3.1
1581122694440000000 3.1
1581122695444000000 3.1
1581122696445000000 3.1
1581122697448000000 3.1
1581122698450000000 3.1
1581122699453000000 3.1
1581122700454000000 3.1
1581122701456000000 3.1
1581122702458000000 3.1
1581122703459000000 3.1
1581122704462000000 3.1
1581122705465000000 3.1
1581122706466000000 3.1
1581122707469000000 3.1
1581122708470000000 3.1
1581122709473000000 3.1
1581122710474000000 3.1
1581122711476000000 3.1
1581122712478000000 3.1
1581122713480000000 3.1
1581122714483000000 3.1
1581122715484000000 3.1
1581122716487000000 3.1
1581122717489000000 3.1
1581122718490000000 3.1
1581122719492000000 3.1
1581122720495000000 3.1
1581122721496000000 3.1
1581122722499000000 3.1
1581122723500000000 3.1
1581122724503000000 3.1
1581122725504000000 3.1
1581122726507000000 3.1
1581122727508000000 3.1
1581122728511000000 3.1
1581122729513000000 3.1
1581122730514000000 3.1
1581122731517000000 3.1
1581122732518000000 3.1
1581122733520000000 3.1
1581122734521000000 3.1
1581122735525000000 3.1
1581122736526000000 3.1
1581122737529000000 3.1
1581122738531000000 3.1
1581122739534000000 3.1
1581122740537000000 3.1
1581122741538000000 3.1
1581122742540000000 3.1
1581122743542000000 3.1
1581122744545000000 3.1
1581122745546000000 3.1
1581122746549000000 3.1
1581122747551000000 3.1
1581122748554000000 3.1
1581122749555000000 3.1
1581122750558000000 3.1
1581122751561000000 3.1
1581122752563000000 3.1
1581122753566000000 3.1
1581122754570000000 3.1
1581122755573000000 3.1
1581122756576000000 3.1
1581122757578000000 3.1
1581122758581000000 3.1
1581122759585000000 3.1
1581122760588000000 3.1
1581122761591000000 3.1
1581122762594000000 3.1
1581122763597000000 3.1
1581122764601000000 3.1
1581122765605000000 3.1
1581122766608000000 3.1
1581122767611000000 3.1
1581122768614000000 3.1
1581122769618000000 3.1
1581122770621000000 3.1
1581122771624000000 3.1
1581122772627000000 3.1
1581122773631000000 3.1
1581122774634000000 3.1
1581122775637000000 3.1
1581122776641000000 3.1
1581122777643000000 3.1
1581122778646000000 3.1
1581122779649000000 3.1
1581122780652000000 3.1
1581122781656000000 3.1
1581122782658000000 3.1
1581122783661000000 3.1
1581122784664000000 3.1
1581122785667000000 3.1
1581122786670000000 3.1
1581122787672000000 3.1
1581122788675000000 3.1
1581122789678000000 3.1
1581122790681000000 3.1
1581122791684000000 3.1
1581122792686000000 3.1
1581122793689000000 3.1
1581122794692000000 3.1
1581122795695000000 3.1
1581122796699000000 3.1
1581122797701000000 3.1
1581122798704000000 3.1
1581122799707000000 3.1
1581122800711000000 3.1
1581122801714000000 3.1
1581122802716000000 3.1
1581122803719000000 3.1
1581122804723000000 3.1
1581122805726000000 3.1
1581122806729000000 3.1
1581122807731000000 3.1
1581122808734000000 3.1
1581122809737000000 3.1
1581122810740000000 3.1
1581122811743000000 3.1
1581122812746000000 3.1
1581122813749000000 3.1
1581122814752000000 3.1
1581122815755000000 3.1
1581122816758000000 3.1
1581122817761000000 3.1
1581122818765000000 3.1
1581122819768000000 3.1
1581122820772000000 3.1
1581122821776000000 3.1
1581122822779000000 3.1
1581122823783000000 3.1
1581122824786000000 3.1
1581122825790000000 3.1
1581122826793000000 3.1
1581122827795000000 3.1
1581122828798000000 3.1
1581122829801000000 3.1
1581122830804000000 3.1
1581122831808000000 3.1
1581122832811000000 3.1
1581122833814000000 3.1
1581122834818000000 3.1
1581122835822000000 3.1
1581122836826000000 3.1
1581122837829000000 3.1
1581122838832000000 3.1
1581122839835000000 3.1
1581122840838000000 3.1
1581122841841000000 3.1
1581122842844000000 3.1
1581122843847000000 3.1
1581122844850000000 3.1
1581122845854000000 3.1
1581122846857000000 3.1
1581122847860000000 3.1
1581122848862000000 3.1
1581122849865000000 3.1
1581122850868000000 3.1
1581122851871000000 3.1
1581122852874000000 3.1
1581122853878000000 3.1
1581122854882000000 3.1
1581122855887000000 3.1
1581122856890000000 3.1
1581122857893000000 3.1
1581122858896000000 3.1
1581122859899000000 3.1
1581122860903000000 3.1
1581122861906000000 3.1
1581122862908000000 3.1
1581122863910000000 3.1
1581122864913000000 3.1
1581122865915000000 3.1
1581122866918000000 3.1
1581122867921000000 3.1
1581122868925000000 3.1
1581122869929000000 3.1
1581122870932000000 3.1
1581122871935000000 3.1
1581122872939000000 3.1
1581122873942000000 3.1
1581122874945000000 3.1
1581122875948000000 3.1
1581122876953000000 3.1
1581122877955000000 3.1
1581122878958000000 3.1
1581122879962000000 3.1
1581122880965000000 3.1
1581122881968000000 3.1
1581122882971000000 3.1
1581122883973000000 3
1581122884976000000 3
1581122885980000000 3
1581122886982000000 3
1581122887984000000 3
1581122888987000000 3
1581122889990000000 3
1581122890992000000 3
1581122891995000000 3
1581122892998000000 3
1581122894001000000 3
1581122895004000000 3
1581122896006000000 3
1581122897013000000 3
1581122898016000000 3
1581122899019000000 3
1581122900022000000 3
1581122901025000000 3
1581122902028000000 3
1581122903032000000 3
1581122904035000000 3
1581122905038000000 3
1581122906041000000 3
1581122907044000000 3
1581122908047000000 3
1581122909050000000 3
1581122910053000000 3
1581122911056000000 3
1581122912058000000 3
1581122913061000000 3
1581122914064000000 3
1581122915067000000 3
1581122916069000000 3
1581122917072000000 3
1581122918075000000 3
1581122919078000000 3
1581122920081000000 3
1581122921084000000 3
1581122922087000000 3
1581122923090000000 3
1581122924093000000 3
1581122925097000000 3
1581122926099000000 3
1581122927102000000 3
1581122928105000000 3
1581122929108000000 3
1581122930111000000 3
1581122931114000000 3
1581122932118000000 3
1581122933121000000 3
1581122934122000000 3
1581122935125000000 3
1581122936126000000 3
1581122937128000000 3
1581122938131000000 3
1581122939132000000 3
1581122940135000000 3
1581122941137000000 3
1581122942139000000 3
1581122943141000000 3
1581122944143000000 3
1581122945146000000 3
1581122946149000000 3
1581122947150000000 3
1581122948152000000 3
1581122949154000000 3
1581122950157000000 3
1581122951160000000 3
1581122952161000000 3
1581122953164000000 3
1581122954165000000 3
1581122955168000000 3
1581122956169000000 3
1581122957171000000 3
1581122958173000000 3
1581122959176000000 3
1581122960179000000 3
1581122961180000000 3
1581122962182000000 3
1581122963184000000 3
1581122964185000000 3
1581122965188000000 3
1581122966189000000 3
1581122967191000000 3
1581122968193000000 3
1581122969196000000 3
1581122970197000000 3
1581122971200000000 3
1581122972201000000 3
1581122973203000000 3
1581122974204000000 3
1581122975207000000 3
1581122976210000000 3
1581122977211000000 3
1581122978213000000 3
1581122979216000000 3
1581122980217000000 3
1581122981220000000 3
1581122982222000000 3
1581122983223000000 3
1581122984226000000 3
1581122985229000000 3
1581122986232000000 3
1581122987233000000 3
1581122988235000000 3
1581122989238000000 3
1581122990241000000 3
1581122991244000000 3
1581122992246000000 3
1581122993247000000 3
1581122994250000000 3
1581122995253000000 3
1581122996254000000 3
1581122997256000000 3
1581122998258000000 3
1581122999260000000 3
1581123000262000000 3
1581123001263000000 3
1581123002266000000 3
1581123003269000000 2.9
1581123004272000000 2.9
1581123005274000000 2.9
1581123006275000000 2.9
1581123007277000000 2.9
1581123008280000000 2.9
1581123009282000000 2.9
1581123010284000000 2.9
1581123011287000000 2.9
1581123012290000000 2.9
1581123013292000000 2.9
1581123014295000000 2.9
1581123015298000000 2.9
1581123016301000000 2.9
1581123017304000000 2.9
1581123018306000000 2.9
1581123019309000000 2.9
1581123020312000000 2.9
1581123021315000000 2.9
1581123022318000000 2.9
1581123023320000000 2.9
1581123024323000000 2.9
1581123025326000000 2.9
1581123026329000000 2.9
1581123027331000000 2.9
1581123028334000000 2.9
1581123029336000000 2.9
1581123030339000000 2.9
1581123031342000000 2.9
1581123032344000000 2.9
1581123033347000000 2.9
1581123034348000000 2.9
1581123035351000000 2.9
1581123036354000000 2.9
1581123037356000000 2.9
1581123038357000000 2.9
1581123039359000000 2.9
1581123040361000000 2.9
1581123041363000000 2.9
1581123042365000000 2.9
1581123043368000000 2.9
1581123044371000000 2.9
1581123045374000000 2.9
1581123046375000000 2.9
1581123047377000000 2.9
1581123048380000000 2.9
1581123049383000000 2.9
1581123050384000000 2.9
1581123051387000000 2.9
1581123052389000000 2.9
1581123053390000000 2.9
1581123054393000000 2.9
1581123055396000000 2.9
1581123056399000000 2.9
1581123057400000000 2.9
1581123058402000000 2.9
1581123059405000000 2.9
1581123060407000000 2.9
1581123061408000000 2.9
1581123062410000000 2.9
1581123063413000000 2.9
1581123064416000000 2.9
1581123065418000000 2.9
1581123066421000000 2.9
1581123067423000000 2.9
1581123068425000000 2.9
1581123069427000000 2.9
1581123070430000000 2.9
1581123071433000000 2.9
1581123072435000000 2.9
1581123073438000000 2.9
1581123074441000000 2.9
1581123075444000000 2.9
1581123076447000000 2.9
1581123077449000000 2.9
1581123078450000000 2.9
1581123079453000000 2.9
1581123080456000000 2.9
1581123081459000000 2.9
1581123082461000000 2.9
1581123083462000000 2.9
1581123084465000000 2.9
1581123085468000000 2.9
1581123086471000000 2.9
1581123087472000000 2.9
1581123088474000000 2.9
1581123089477000000 2.9
1581123090480000000 2.9
1581123091483000000 2.9
1581123092485000000 2.9
1581123093486000000 2.9
1581123094489000000 2.9
1581123095492000000 2.9
1581123096493000000 2.9
1581123097495000000 2.9
1581123098497000000 2.9
1581123099500000000 2.9
1581123100502000000 2.9
1581123101504000000 2.9
1581123102506000000 2.9
1581123103508000000 2.9
1581123104511000000 2.9
1581123105514000000 2.9
1581123106517000000 2.9
1581123107518000000 2.9
1581123108520000000 2.9
1581123109523000000 2.9
1581123110524000000 2.9
1581123111526000000 2.9
1581123112528000000 2.9
1581123113530000000 2.9
1581123114532000000 2.9
1581123115535000000 2.9
1581123116538000000 2.9
1581123117539000000 2.9
1581123118541000000 2.9
问题是,这个数据记录运行了一年,我没有注意到它,但我真的希望将清理后的数据复制到我的新实例中。
所以我想要的是某种删除其间所有重复值(不会改变)的方式。对于显示的示例,
time value
---- -----
1581118753696000000 3.9
1581119113761000000 3.8
1581119473832000000 3.7
1581120002534000000 3.6
1581120782667000000 3.5
1581121082743000000 3.4
1581121562864000000 3.3
1581122191957000000 3.2
1581122524046000000 3.1
1581122883973000000 3
1581123003269000000 2.9
有机会这样做吗?
另一点:我很确定我必须部分做,因为数据库太大了,如果我想立即做,几分钟后我会遇到超时。对于一张桌子,我已经有大约 25521585 个测量点,所以它相当大。
最好的问候
【问题讨论】:
看来 select distinct() 基本上是我想要的。不幸的是,不同的选择不会返回第一次出现的时间戳,而是返回一个统一的时间戳,当执行一些“选择”到另一个表时会导致不可用的结果(数据被自己覆盖......) 好的,同时我写了一个python脚本,它将提取我的数据的本质。如果有人有解决方案就好了 【参考方案1】:我最终做了这样的事情:
from(bucket: "sensors")
# Usual range and filter.
|> range(start: v.timeRangeStart, stop: v.timeRangeStop)
|> filter(fn: (r) => r._field == "temp")
# Copy "_value" column so that the original won't get lost.
|> duplicate(column: "_value", as: "diff")
# Convert "diff"-column to the difference from pervious row.
|> difference(
columns: ["diff"],
keepFirst: true # Stores null in first "diff"-column.
)
# Keep the first null-valued row; it is the initial value,
# and all other rows with a change (diff != 0).
|> filter(fn: (r) => not exists r.diff or r.diff != 0)
【讨论】:
以上是关于精简流入数据库时间序列/删除重复项的主要内容,如果未能解决你的问题,请参考以下文章
使用 Jackson 和 Spring 将 JavaScript 数组反序列化为 Java LinkedHashSet 不会删除重复项