Files
doris/docs/zh-CN/sql-reference/sql-statements/Data Manipulation/SHOW EXPORT.md
EmmyMiao87 b3a52a05d5 [Update] Support update syntax (#6230)
[Update] Support update syntax

    The current update syntax only supports updating the filtered data of a single table.

    Syntax:

     * UPDATE table_reference
     *     SET assignment_list
     *     [WHERE where_condition]
     *
     * value:
     *     {expr}
     *
     * assignment:
     *     col_name = value
     *
     * assignment_list:
     *     assignment [, assignment] ...

    Example
    Update unique_table
         set v1=1
         where k1=1

    New Frontend Config: enable_concurrent_update
    This configuration is used to control whether multi update stmt can be executed concurrently in one table.
    Default value is false which means A table can only have one update task being executed at the same time.
    If users want to update the same table concurrently,
      they need to modify the configuration value to true and restart the master frontend.
    Concurrent updates may cause write conflicts, the result is uncertain, please be careful.

    The main realization principle:
    1. Read the rows that meet the conditions according to the conditions set by where clause.
    2. Modify the result of the row according to the set clause.
    3. Write the modified row back to the table.

    Some restrictions on the use of update syntax.
    1. Only the unique table can be updated
    2. Only the value column of the unique table can be updated
    3. The where clause currently only supports single tables

    Possible risks:
    1. Since the current implementation method is a row update,
         when the same table is updated concurrently, there may be concurrency conflicts which may cause the incorrect result.
    2. Once the conditions of the where clause are unsatisfactory, it is likely to cause a full table scan and affect query performance.
       Please pay attention to whether the column in the where clause can match the index when using it.

    [Docs][Update] Add update document and sql-reference

    Fixed #6229
2021-07-27 13:38:15 +08:00

1.9 KiB

title, language
title language
SHOW EXPORT zh-CN

SHOW EXPORT

description

该语句用于展示指定的导出任务的执行情况
语法:
    SHOW EXPORT
    [FROM db_name]
    [
        WHERE
        [ID = your_job_id]
        [STATE = ["PENDING"|"EXPORTING"|"FINISHED"|"CANCELLED"]]
    ]
    [ORDER BY ...]
    [LIMIT limit];
    
说明:
    1) 如果不指定 db_name,使用当前默认db
    2) 如果指定了 STATE,则匹配 EXPORT 状态
    3) 可以使用 ORDER BY 对任意列组合进行排序
    4) 如果指定了 LIMIT,则显示 limit 条匹配记录。否则全部显示

example

1. 展示默认 db 的所有导出任务
    SHOW EXPORT;
    
2. 展示指定 db 的导出任务,按 StartTime 降序排序
    SHOW EXPORT FROM example_db ORDER BY StartTime DESC;

3. 展示指定 db 的导出任务,state 为 "exporting", 并按 StartTime 降序排序
    SHOW EXPORT FROM example_db WHERE STATE = "exporting" ORDER BY StartTime DESC;

4. 展示指定db,指定job_id的导出任务
    SHOW EXPORT FROM example_db WHERE ID = job_id;

keyword

SHOW,EXPORT