blob: c6f8278db0497d2dfc71f88ed8579b48831296ef [file] [log] [blame]
"use strict";(self.webpackChunkdoris_website=self.webpackChunkdoris_website||[]).push([[62614],{15680:(e,t,a)=>{a.d(t,{xA:()=>m,yg:()=>g});var n=a(296540);function r(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function l(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function i(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?l(Object(a),!0).forEach((function(t){r(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):l(Object(a)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}function o(e,t){if(null==e)return{};var a,n,r=function(e,t){if(null==e)return{};var a,n,r={},l=Object.keys(e);for(n=0;n<l.length;n++)a=l[n],t.indexOf(a)>=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)a=l[n],t.indexOf(a)>=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var s=n.createContext({}),p=function(e){var t=n.useContext(s),a=t;return e&&(a="function"==typeof e?e(t):i(i({},t),e)),a},m=function(e){var t=p(e.components);return n.createElement(s.Provider,{value:t},e.children)},u="mdxType",c={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},y=n.forwardRef((function(e,t){var a=e.components,r=e.mdxType,l=e.originalType,s=e.parentName,m=o(e,["components","mdxType","originalType","parentName"]),u=p(a),y=r,g=u["".concat(s,".").concat(y)]||u[y]||c[y]||l;return a?n.createElement(g,i(i({ref:t},m),{},{components:a})):n.createElement(g,i({ref:t},m))}));function g(e,t){var a=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var l=a.length,i=new Array(l);i[0]=y;var o={};for(var s in t)hasOwnProperty.call(t,s)&&(o[s]=t[s]);o.originalType=e,o[u]="string"==typeof e?e:r,i[1]=o;for(var p=2;p<l;p++)i[p]=a[p];return n.createElement.apply(null,i)}return n.createElement.apply(null,a)}y.displayName="MDXCreateElement"},984701:(e,t,a)=>{a.r(t),a.d(t,{assets:()=>s,contentTitle:()=>i,default:()=>c,frontMatter:()=>l,metadata:()=>o,toc:()=>p});var n=a(58168),r=(a(296540),a(15680));const l={title:"SHOW-STATUS",language:"en"},i=void 0,o={unversionedId:"sql-manual/sql-statements/Show-Statements/SHOW-STATUS",id:"sql-manual/sql-statements/Show-Statements/SHOW-STATUS",title:"SHOW-STATUS",description:"\x3c!--",source:"@site/docs/sql-manual/sql-statements/Show-Statements/SHOW-STATUS.md",sourceDirName:"sql-manual/sql-statements/Show-Statements",slug:"/sql-manual/sql-statements/Show-Statements/SHOW-STATUS",permalink:"/docs/dev/sql-manual/sql-statements/Show-Statements/SHOW-STATUS",draft:!1,tags:[],version:"current",frontMatter:{title:"SHOW-STATUS",language:"en"},sidebar:"docs",previous:{title:"SHOW-STREAM-LOAD",permalink:"/docs/dev/sql-manual/sql-statements/Show-Statements/SHOW-STREAM-LOAD"},next:{title:"SHOW-TABLE-ID",permalink:"/docs/dev/sql-manual/sql-statements/Show-Statements/SHOW-TABLE-ID"}},s={},p=[{value:"SHOW-STATUS",id:"show-status",level:2},{value:"Name",id:"name",level:3},{value:"Description",id:"description",level:3},{value:"Example",id:"example",level:3},{value:"Keywords",id:"keywords",level:3},{value:"Best Practice",id:"best-practice",level:3}],m={toc:p},u="wrapper";function c(e){let{components:t,...a}=e;return(0,r.yg)(u,(0,n.A)({},m,a,{components:t,mdxType:"MDXLayout"}),(0,r.yg)("h2",{id:"show-status"},"SHOW-STATUS"),(0,r.yg)("h3",{id:"name"},"Name"),(0,r.yg)("p",null,"SHOW STATUS"),(0,r.yg)("h3",{id:"description"},"Description"),(0,r.yg)("p",null,"This command is used to view the execution of the Create Materialized View job submitted through the ",(0,r.yg)("a",{parentName:"p",href:"/docs/dev/sql-manual/sql-statements/Data-Definition-Statements/Create/CREATE-MATERIALIZED-VIEW"},"CREATE-MATERIALIZED-VIEW")," statement."),(0,r.yg)("blockquote",null,(0,r.yg)("p",{parentName:"blockquote"},"This statement is equivalent to ",(0,r.yg)("inlineCode",{parentName:"p"},"SHOW ALTER TABLE ROLLUP"),";")),(0,r.yg)("pre",null,(0,r.yg)("code",{parentName:"pre",className:"language-sql"},"SHOW ALTER TABLE MATERIALIZED VIEW\n[FROM database]\n[WHERE]\n[ORDER BY]\n[LIMIT OFFSET]\n")),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},"database: View jobs under the specified database. If not specified, the current database is used."),(0,r.yg)("li",{parentName:"ul"},"WHERE: You can filter the result column, currently only the following columns are supported:",(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},"TableName: Only equal value filtering is supported."),(0,r.yg)("li",{parentName:"ul"},"State: Only supports equivalent filtering."),(0,r.yg)("li",{parentName:"ul"},"Createtime/FinishTime: Support =, >=, <=, >, <, !="))),(0,r.yg)("li",{parentName:"ul"},"ORDER BY: The result set can be sorted by any column."),(0,r.yg)("li",{parentName:"ul"},"LIMIT: Use ORDER BY to perform page-turning query.")),(0,r.yg)("p",null,"Return result description:"),(0,r.yg)("pre",null,(0,r.yg)("code",{parentName:"pre",className:"language-sql"},"mysql> show alter table materialized view\\G\n**************************** 1. row ******************** ******\n JobId: 11001\n TableName: tbl1\n CreateTime: 2020-12-23 10:41:00\n FinishTime: NULL\n BaseIndexName: tbl1\nRollupIndexName: r1\n RollupId: 11002\n TransactionId: 5070\n State: WAITING_TXN\n Msg:\n Progress: NULL\n Timeout: 86400\n1 row in set (0.00 sec)\n")),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},(0,r.yg)("inlineCode",{parentName:"p"},"JobId"),": Job unique ID.")),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},(0,r.yg)("inlineCode",{parentName:"p"},"TableName"),": base table name")),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},(0,r.yg)("inlineCode",{parentName:"p"},"CreateTime/FinishTime"),": Job creation time and end time.")),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},(0,r.yg)("inlineCode",{parentName:"p"},"BaseIndexName/RollupIndexName"),": Base table name and materialized view name.")),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},(0,r.yg)("inlineCode",{parentName:"p"},"RollupId"),": The unique ID of the materialized view.")),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},(0,r.yg)("inlineCode",{parentName:"p"},"TransactionId"),": See the description of the State field.")),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},(0,r.yg)("inlineCode",{parentName:"p"},"State"),": job status."),(0,r.yg)("ul",{parentName:"li"},(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},"PENDING: The job is in preparation.")),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},"WAITING_TXN:"),(0,r.yg)("p",{parentName:"li"},"Before officially starting to generate materialized view data, it will wait for the current running import transaction on this table to complete. And the ",(0,r.yg)("inlineCode",{parentName:"p"},"TransactionId")," field is the current waiting transaction ID. When all previous imports for this ID are complete, the job will actually start.")),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},"RUNNING: The job is running.")),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},"FINISHED: The job ran successfully.")),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},"CANCELLED: The job failed to run.")))),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},(0,r.yg)("inlineCode",{parentName:"p"},"Msg"),": error message")),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},(0,r.yg)("inlineCode",{parentName:"p"},"Progress"),": job progress. The progress here means ",(0,r.yg)("inlineCode",{parentName:"p"},"completed tablets/total tablets"),". Materialized views are created at tablet granularity.")),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},(0,r.yg)("inlineCode",{parentName:"p"},"Timeout"),": Job timeout, in seconds."))),(0,r.yg)("h3",{id:"example"},"Example"),(0,r.yg)("h3",{id:"keywords"},"Keywords"),(0,r.yg)("pre",null,(0,r.yg)("code",{parentName:"pre"},"SHOW, STATUS\n")),(0,r.yg)("h3",{id:"best-practice"},"Best Practice"))}c.isMDXComponent=!0}}]);