Remix.run Logo
kijin 7 months ago

It might depend on the version, but last time I checked, DELETEing an entire table was much slower than TRUNCATE TABLE.

eddd-ddde 7 months ago | parent [-]

I'm pretty sure that only applies to Postgres.

magicalhippo 7 months ago | parent [-]

Sybase SQLAnywhere as well, and not unlikely MSSQL too given its shared ancestry.

Delete with WHERE is sufficiently slow in MSSQL we have to do batched deletes, but I can't recall offhand if that holds for whole table deletion as well.