You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues-all@impala.apache.org by "Zoltán Borók-Nagy (Jira)" <ji...@apache.org> on 2023/05/11 14:33:00 UTC

[jira] [Created] (IMPALA-12136) Rewrite DELETE statements to TRUNCATE if possible

Zoltán Borók-Nagy created IMPALA-12136:
------------------------------------------

             Summary: Rewrite DELETE statements to TRUNCATE if possible
                 Key: IMPALA-12136
                 URL: https://issues.apache.org/jira/browse/IMPALA-12136
             Project: IMPALA
          Issue Type: Bug
            Reporter: Zoltán Borók-Nagy


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: issues-all-unsubscribe@impala.apache.org
For additional commands, e-mail: issues-all-help@impala.apache.org