Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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



I'm pretty sure that only applies to Postgres.


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.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: