How to drop a large table gracefully?

deployment
(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:

node:18
storage:ssd
cpu/mem:16 Core/96G
cpu_used:<10%
Read_iops:20-259
Write_iops:200-400
Related parameters:--cache=40% --max-sql-memory=20%
It is a prod cluster