blob: 0711a324076b225a0074945739ca2c95881188f6 [file] [log] [blame]
import{_ as a,r as n,o as r,c as o,b as t,d as e,a as l,w as s,e as d}from"./app-Bx8hKGcu.js";const m={},p=d('<h1 id="time-partition" tabindex="-1"><a class="header-anchor" href="#time-partition"><span>Time partition</span></a></h1><h2 id="features" tabindex="-1"><a class="header-anchor" href="#features"><span>Features</span></a></h2><p>Time partition divides data according to time, and a time partition is used to save all data within a certain time range. The time partition number is represented by a natural number. Number 0 means January 1, 1970, it will increase by one every partition_interval milliseconds. Time partition number&#39;s calculation formula is timestamp / partition_interval. The main configuration items are as follows:</p><ul><li>time_partition_interval</li></ul><table><thead><tr><th style="text-align:center;">Name</th><th style="text-align:left;">time_partition_interval</th></tr></thead><tbody><tr><td style="text-align:center;">Description</td><td style="text-align:left;">Time range for dividing database, time series data will be divided into groups by this time range</td></tr><tr><td style="text-align:center;">Type</td><td style="text-align:left;">Int64</td></tr><tr><td style="text-align:center;">Default</td><td style="text-align:left;">604800000</td></tr><tr><td style="text-align:center;">Effective</td><td style="text-align:left;">Only allowed to be modified in first start up</td></tr></tbody></table><h2 id="configuration-example" tabindex="-1"><a class="header-anchor" href="#configuration-example"><span>Configuration example</span></a></h2><p>Enable time partition and set partition_interval to 86400000 (one day), then the data distribution is shown as the following figure:</p><img style="width:100%;max-width:800px;max-height:600px;margin-left:auto;margin-right:auto;display:block;" src="https://alioss.timecho.com/docs/img/UserGuide/Data-Concept/Time-Partition/time_partition_example.png?raw=true" alt="time partition example"><ul><li><p>Insert one datapoint with timestamp 0, calculate 0/86400000 = 0, then this datapoint will be stored in TsFile under folder 0</p></li><li><p>Insert one datapoint with timestamp 1609459200010, calculate 1609459200010/86400000 = 18628, then this datapoint will be stored in TsFile under folder 18628</p></li></ul><h2 id="suggestions" tabindex="-1"><a class="header-anchor" href="#suggestions"><span>Suggestions</span></a></h2>',10),c=t("ul",null,[t("li",null,[t("p",null,"enable_timed_flush_unseq_memtable: Whether to enable timed flush unsequence memtable, enabled by default.")]),t("li",null,[t("p",null,"enable_timed_flush_seq_memtable: Whether to enable timed flush sequence memtable, disabled by default. It should be enabled when time partition is enabled, so inactive time partition's memtable can be flushed regularly.")])],-1);function u(h,g){const i=n("RouteLink");return r(),o("div",null,[p,t("p",null,[e("When enabling time partition, it is better to enable timed flush memtable, configuration params are detailed in "),l(i,{to:"/UserGuide/V1.1.x/Reference/DataNode-Config-Manual.html"},{default:s(()=>[e("Config manual for timed flush")]),_:1}),e(".")]),c])}const b=a(m,[["render",u],["__file","Time-Partition.html.vue"]]),_=JSON.parse('{"path":"/UserGuide/V1.1.x/Data-Concept/Time-Partition.html","title":"Time partition","lang":"en-US","frontmatter":{"description":"Time partition Features Time partition divides data according to time, and a time partition is used to save all data within a certain time range. The time partition number is re...","head":[["link",{"rel":"alternate","hreflang":"zh-cn","href":"https://iotdb.apache.org/zh/UserGuide/V1.1.x/Data-Concept/Time-Partition.html"}],["meta",{"property":"og:url","content":"https://iotdb.apache.org/UserGuide/V1.1.x/Data-Concept/Time-Partition.html"}],["meta",{"property":"og:site_name","content":"IoTDB Website"}],["meta",{"property":"og:title","content":"Time partition"}],["meta",{"property":"og:description","content":"Time partition Features Time partition divides data according to time, and a time partition is used to save all data within a certain time range. The time partition number is re..."}],["meta",{"property":"og:type","content":"article"}],["meta",{"property":"og:locale","content":"en-US"}],["meta",{"property":"og:locale:alternate","content":"zh-CN"}],["meta",{"property":"og:updated_time","content":"2023-07-10T03:11:17.000Z"}],["meta",{"property":"article:modified_time","content":"2023-07-10T03:11:17.000Z"}],["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"Time partition\\",\\"image\\":[\\"\\"],\\"dateModified\\":\\"2023-07-10T03:11:17.000Z\\",\\"author\\":[]}"]]},"headers":[{"level":2,"title":"Features","slug":"features","link":"#features","children":[]},{"level":2,"title":"Configuration example","slug":"configuration-example","link":"#configuration-example","children":[]},{"level":2,"title":"Suggestions","slug":"suggestions","link":"#suggestions","children":[]}],"git":{"createdTime":1688958677000,"updatedTime":1688958677000,"contributors":[{"name":"CritasWang","email":"critas@outlook.com","commits":1}]},"readingTime":{"minutes":1.26,"words":378},"filePathRelative":"UserGuide/V1.1.x/Data-Concept/Time-Partition.md","localizedDate":"July 10, 2023","autoDesc":true}');export{b as comp,_ as data};