[ 
https://issues.apache.org/jira/browse/IMPALA-12136?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Noemi Pap-Takacs updated IMPALA-12136:
--------------------------------------
    Issue Type: Improvement  (was: Bug)

> Rewrite DELETE statements to TRUNCATE if possible
> -------------------------------------------------
>
>                 Key: IMPALA-12136
>                 URL: https://issues.apache.org/jira/browse/IMPALA-12136
>             Project: IMPALA
>          Issue Type: Improvement
>            Reporter: Zoltán Borók-Nagy
>            Assignee: Zoltán Borók-Nagy
>            Priority: Major
>              Labels: impala-iceberg, performance
>
> If the user issues DELETE FROM t; to remove all rows from a table, we should 
> rewrite it to TRUNCATE TABLE t; as it is much more efficient in some cases.
> E.g., for Iceberg tables DELETE FROM t; would create delete files that 
> contain all existing rows. Then subsequent readers would have to read all 
> data files and delete files just to return an empty result set. Wherease 
> TRUNCATE TABLE t; just creates a new empty table snapshot.
> We'll need to investigate if it makes sense for Kudu tables as well.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to