blob: 81c39a93f921d9a5f648b06defc107e58d218a7b [file] [log] [blame]
(window.webpackJsonp=window.webpackJsonp||[]).push([[242],{810:function(e,t,a){"use strict";a.r(t);var s=a(70),r=Object(s.a)({},(function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[a("h2",{attrs:{id:"maintenance-command"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#maintenance-command"}},[e._v("#")]),e._v(" Maintenance Command")]),e._v(" "),a("h3",{attrs:{id:"flush"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#flush"}},[e._v("#")]),e._v(" FLUSH")]),e._v(" "),a("p",[e._v("Persist all the data points in the memory table of the storage group to the disk, and seal the data file.")]),e._v(" "),a("div",{staticClass:"language- line-numbers-mode"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[e._v("IoTDB> FLUSH \nIoTDB> FLUSH root.ln\nIoTDB> FLUSH root.sg1,root.sg2\n")])]),e._v(" "),a("div",{staticClass:"line-numbers-wrapper"},[a("span",{staticClass:"line-number"},[e._v("1")]),a("br"),a("span",{staticClass:"line-number"},[e._v("2")]),a("br"),a("span",{staticClass:"line-number"},[e._v("3")]),a("br")])]),a("h3",{attrs:{id:"merge"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#merge"}},[e._v("#")]),e._v(" MERGE")]),e._v(" "),a("p",[e._v("Merge sequence and unsequence data. Currently IoTDB supports the following two types of SQL to manually trigger the merge process of data files:")]),e._v(" "),a("ul",[a("li",[a("code",[e._v("MERGE")]),e._v(" Only rewrite overlapped Chunks, the merge speed is quick, while there will be redundant data on the disk eventually.")]),e._v(" "),a("li",[a("code",[e._v("FULL MERGE")]),e._v(" Rewrite all data in overlapped files, the merge speed is slow, but there will be no redundant data on the disk eventually.")])]),e._v(" "),a("div",{staticClass:"language- line-numbers-mode"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[e._v("IoTDB> MERGE\nIoTDB> FULL MERGE\n")])]),e._v(" "),a("div",{staticClass:"line-numbers-wrapper"},[a("span",{staticClass:"line-number"},[e._v("1")]),a("br"),a("span",{staticClass:"line-number"},[e._v("2")]),a("br")])]),a("h3",{attrs:{id:"clear-cache"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#clear-cache"}},[e._v("#")]),e._v(" CLEAR CACHE")]),e._v(" "),a("p",[e._v("Clear the cache of chunk, chunk metadata and timeseries metadata to release the memory footprint.")]),e._v(" "),a("div",{staticClass:"language- line-numbers-mode"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[e._v("IoTDB> CLEAR CACHE\n")])]),e._v(" "),a("div",{staticClass:"line-numbers-wrapper"},[a("span",{staticClass:"line-number"},[e._v("1")]),a("br")])]),a("h3",{attrs:{id:"schema-snapshot"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#schema-snapshot"}},[e._v("#")]),e._v(" SCHEMA SNAPSHOT")]),e._v(" "),a("p",[e._v("To speed up restarting of IoTDB, users can create snapshot of schema and avoid recovering schema from mlog file.")]),e._v(" "),a("div",{staticClass:"language- line-numbers-mode"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[e._v("IoTDB> CREATE SNAPSHOT FOR SCHEMA\n")])]),e._v(" "),a("div",{staticClass:"line-numbers-wrapper"},[a("span",{staticClass:"line-number"},[e._v("1")]),a("br")])]),a("h3",{attrs:{id:"kill-query"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#kill-query"}},[e._v("#")]),e._v(" Kill Query")]),e._v(" "),a("p",[e._v("When using IoTDB, you may encounter the following situations: you have entered a query statement, but can not get the result for a long time, as this query contains too much data or some other reasons, and have to wait until the query ends.\nSince version 0.12, IoTDB has provided two solutions for queries with long execution time: query timeout and query abort.")]),e._v(" "),a("h4",{attrs:{id:"query-timeout"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#query-timeout"}},[e._v("#")]),e._v(" Query timeout")]),e._v(" "),a("p",[e._v("For queries that take too long to execute, IoTDB will forcibly interrupt the query and throw a timeout exception, as shown in the figure:")]),e._v(" "),a("div",{staticClass:"language- line-numbers-mode"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[e._v("IoTDB> select * from root;\nMsg: 701 Current query is time out, please check your statement or modify timeout parameter.\n")])]),e._v(" "),a("div",{staticClass:"line-numbers-wrapper"},[a("span",{staticClass:"line-number"},[e._v("1")]),a("br"),a("span",{staticClass:"line-number"},[e._v("2")]),a("br")])]),a("p",[e._v("The default timeout of the system is 60000 ms,which can be customized in the configuration file through the "),a("code",[e._v("query_timeout_threshold")]),e._v(" parameter.")]),e._v(" "),a("p",[e._v("If you use JDBC or Session, we also support setting a timeout for a single query(Unit: ms):")]),e._v(" "),a("div",{staticClass:"language- line-numbers-mode"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[e._v("E.g. ((IoTDBStatement) statement).executeQuery(String sql, long timeoutInMS)\nE.g. session.executeQueryStatement(String sql, long timeout)\n")])]),e._v(" "),a("div",{staticClass:"line-numbers-wrapper"},[a("span",{staticClass:"line-number"},[e._v("1")]),a("br"),a("span",{staticClass:"line-number"},[e._v("2")]),a("br")])]),a("p",[e._v("If the timeout parameter is not configured or with value 0, the default timeout time will be used.")]),e._v(" "),a("h4",{attrs:{id:"query-abort"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#query-abort"}},[e._v("#")]),e._v(" Query abort")]),e._v(" "),a("p",[e._v("In addition to waiting for the query to time out passively, IoTDB also supports stopping the query actively:")]),e._v(" "),a("div",{staticClass:"language- line-numbers-mode"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[e._v("KILL QUERY <queryId>\n")])]),e._v(" "),a("div",{staticClass:"line-numbers-wrapper"},[a("span",{staticClass:"line-number"},[e._v("1")]),a("br")])]),a("p",[e._v("You can abort the specified query by specifying "),a("code",[e._v("queryId")]),e._v(". If "),a("code",[e._v("queryId")]),e._v(" is not specified, all executing queries will be killed.")]),e._v(" "),a("p",[e._v("To get the executing "),a("code",[e._v("queryId")]),e._v(",you can use the "),a("code",[e._v("show query processlist")]),e._v(" command,which will show the list of all executing queries,with the following result set:")]),e._v(" "),a("table",[a("thead",[a("tr",[a("th",[e._v("Time")]),e._v(" "),a("th",[e._v("queryId")]),e._v(" "),a("th",[e._v("statement")])])]),e._v(" "),a("tbody",[a("tr",[a("td"),e._v(" "),a("td"),e._v(" "),a("td")])])]),e._v(" "),a("p",[e._v("The maximum display length of statement is 64 characters. For statements with more than 64 characters, the intercepted part will be displayed.")])])}),[],!1,null,null,null);t.default=r.exports}}]);