in reply to dropping or deleting tables
I don't have any experience with Sybase at all, but have several years with MySQL, so, I can at least tell you what it does, and chances are, it will be close to home.
If you want to delete everything in the table, you can either drop the table and recreate it, or just DELETE FROM. If the table is very large, the drop/recreate is going to be faster. If the table is pretty small, a DELETE * FROM table will work pretty fast, just make sure you do not have a WHERE clause in there. A DELETE * FROM table WHERE id > 1 will run a lot slower, since it will have to compare each row, instead of just dropping the lot of them.
As with all worries of speed, a local benchmark will always have the best answer.
|
|---|