System Procedures

ProcedureDescriptionExample
sys.analyze(minmax int, samplesize bigint)create or update sys.statistics data for all tables in all schemas. When minmax is 0 the expensive unique count operation is not performed. When samplesize is > 0 only the specified sample size number of rows are analysed. Warning: Execution could take a long time depending on the size of your database.call sys.analyze(0, 4000);
sys.analyze(minmax int, samplesize bigint, sch string)create or update sys.statistics data for all tables data in schema sch. When minmax is 0 the expensive unique count operation is not performed. When samplesize is > 0 only the specified sample size number of rows are analysed.call sys.analyze(1, 0, 'schema_1');
sys.analyze(minmax int, samplesize bigint, sch string, tbl string)create or update sys.statistics data of table tbl in schema sch. When minmax is 0 the expensive unique count operation is not performed. When samplesize is > 0 only the specified sample size number of rows are analysed.call sys.analyze(1, 0, 'schema_1', 'table_1');
sys.analyze(minmax int, samplesize bigint, sch string, tbl string, col string)create or update sys.statistics data of column col in table tbl in schema sch. When minmax is 0 the expensive unique count operation is not performed. When samplesize is > 0 only the specified sample size number of rows are analysed.call sys.analyze(1, 0, 'schema_1', 'table_1', 'column_1');
sys.clearrejects()clear the rejects table from possible errors encoutered from previous COPY INTO tbl FROM 'datafile.csv' ... BEST EFFORT executioncall sys.clearrejects();
sys.createorderindex(schm string, tabl string, col string)create an ordered index on a specific column. The index name and location will be determined based on the schema name, table name and column name.call sys.createorderindex('schema_1', 'table_1', 'column_1');
sys.droporderindex(schm string, tabl string, col string)remove a previously created ordered indexcall sys.droporderindex('schema_1', 'table_1', 'column_1');
sys.eval(stmt string)evaluate and execute SQL statement provided as a string parameter. Note: This procedure is available since Jul2021 release and only for users with administrator privilege.call sys.eval('SELECT pi();')
sys.hot_snapshot(tarfile string)write a snapshot (a binary copy of all data files) of the database into a (potentially very big) tar file. Optionally the tar file can be compressed by adding an extra file name suffix .lz4 or .gz or .bz2 or .xz. See HotBackup for details.call sys.hot_snapshot('/tmp/snapshot.tar.gz');
sys.pause(tag bigint)pause the execution of a (long) running statement using its tag id. run query: select * from sys.queue; to list the running statementscall sys.pause(842);
sys.querylog(filename string)use file filename to log queriescall sys.querylog('/tmp/log.txt');
sys.resume(tag bigint)resume execution of a previouly paused statementcall sys.resume(842);
sys.resume_log_flushing()resume logging queries of a previouly suspended query logcall sys.resume_log_flushing();
sys.shutdown(delay tinyint)close all other client connections after delay secondscall sys.shutdown(20);
sys.shutdown(delay tinyint, force bool)close all other client connections after delay seconds. If force is set, always stop the system the hard waycall sys.shutdown(20, true);
sys.stop(tag bigint)stop/abort execution of a running statementcall sys.stop(842);
sys.storagemodelinit()initialize the data for the storage modelcall sys.storagemodelinit();
sys.suspend_log_flushing()suspend logging of queriescall sys.suspend_log_flushing();