Hello all,
I need to wipe out all data in default.MyTable.
Method 1> drop table default.MyTable followed by re-creating default.MyTable
Method 2>
alter table default.MyTable drop partition '2018-11-03'
...
alter table default.MyTable drop partition '2018-12-03'
Question> The size of MyTable is around 400GB. Method 1 takes a very long time to finish dropping the table. Method 2 requires me to issue multiple statements to drop all existing partitions. Is there a more efficient way to empty the data within a table?
Thank you
Try truncate table default.MyTable?
More details: TRUNCATE
Thank you!
Most helpful comment
Try
truncate table default.MyTable?More details: TRUNCATE