Truncate is very slow


I executed a truncate table command in mapdsql and have been waiting 10 minutes for it to complete. There are only 85k rows in the table

Is this expected behaviour? This works instantaneously in a conventional database.




No this is not expected behaviour. Did the truncate complete?

How wide is the table? What is the schema, can you share the data for us to try to reproduce?



It’s difficult to say, as I got no response from “select * from table limit 5;” I couldn’t find any errors in the log files.

There are only 9 columns:
p_partkey INT NOT NULL,
p_name VARCHAR(22),
p_mfgr CHAR(6),
p_category CHAR(7),
p_brand1 CHAR(9),
p_color VARCHAR(11),
p_type VARCHAR(25),
p_size INT,
p_container CHAR(10)

This occurred after attempting to load a file of 175mb with 2m rows. I don’t know how many got loaded, if at all.

Thank you for replying.



Sounds like you are not having a lot of luck.

Can you share the complete log file. What platform are you trying to run on?