How to drop a large table gracefully?

(jemy Lan) #1

I want to drop a table with 4.7T data by drop table statement but I am worried that it may brick the cluster.

Is there a safer way to drop a large table? Or Is there any potential risk through the drop statement?

We are using CockroachDB version 2.1.2

I am looking forward to your reply. Thank you.

(Tim O'Brien) #2

@xiaolanzao66 Drop table is the preferred way to do this (rather than delete from <> where <>, but 4.7T is very large. Could you share some details about the shape of the cluster? How many nodes do you have? What type of storage are you using? How much overhead do you have in terms of CPU and available IOPS? Is this a dev cluster or prod?

(jemy Lan) #3

@tim-o Thanks for your reply. More details about the cluster are as follow:

cpu/mem:16 Core/96G
Related parameters:--cache=40% --max-sql-memory=20%
It is a prod cluster