And just to further beat this poor horse, your situation isn't all that different from anyone needing to delete a large quantity of records from a table. Don't make it more difficult than it is by thinking you are doing something special.
Yes, dropping a table will cause things like contraints and FK references to be dropped as well. So? Simple scripts can be put together (heck, TOAD can generate them for you if you are on Oracle) that do all the disabling, dropping, recreating and re-enabling that you would need. If you need help with that, or don't have the permissions you'd need, leverage your friendly neighborhood DBA-man for that task.
What to do when it is a "View"? Switch to the base table or tables that make up the view. Nothing magical there.
And
there is no other way to delete records as fast a truncate, primarily because it doesn't really delete them.
![Shocked :shock:](./images/smilies/icon_eek.gif)
Besides, you need to stop worrying about truncating - you said you need to delete
most of the records from a table, not all of them. Truncate is not the weapon of choice for you then.
I still will put forth the notion that instead of deleteing
90% of the records in a table, it is vastly more effecient to save the
10% you want to keep in a new table and then swap the two. Not only is it quicker and probably measured in
minutes to accomplish with good scriptage, you get a nice clean organized table out of it - not the limp skin of an elephant that been reduced in size internally to a dingo.
However, if you want to take the hours you'll need to transactionally delete 18 million records then all I can say is... have fun!
![Wink :wink:](./images/smilies/icon_wink.gif)