This is a discussion on "Fastest way to dump a table contents?" within the Databases section. This forum, and the thread "Fastest way to dump a table contents? are both part of the Program Your Website category.
|
|
|
|
|
![]() |
||
Fastest way to dump a table contents?
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
|||
|
Fastest way to dump a table contents?
Anyone know what the fastest way to dump the contents of a MsSql table is?
I am currently using : DELETE * FROM table ...which is a bit slow. Is there a faster way? u2o |
|
|
|
|||
|
In MySQL you can use:
DELETE FROM `table` ; which instantly removes the whole lot... I'm not sure if it's the same thing... I suppose technically it is, but I can't see a faster way... other than perhaps dumping the table and recreating it? |
|
|||
|
Oops, got my syntax wrong. It is the same, DELETE FROM 'table'
u2o |
|
|||
|
well, in MSSQL there's TRUNCATE TABLE blah
It looks like MySQL has an implementation of it too: http://www.mysql.com/doc/en/TRUNCATE.html MUCH faster than DELETE FROM |
|
|||
|
Spot on Catalyst!!! That is *exactly* what is was looking for.
Virtual beer or the way! u2o |
|
||||
|
Personally I would load all the records into an array, use VBScript to sort them all alphabetically removing any duplicates.
I would then check the consistency of each record, making sure I escape any non displayable characters. Then, update the database. Next, do another select and loop through each record deleting it one by one. LMAO!!! [:P) PS:- only do this if you want to pass the time it takes the kettle to boil. Seriously, I think the truncate is the best way!
__________________
Rob - SEO Specialist Owner & Founder of Webforumz.com I am currently unavailable for private work
Last Blog Entry: Creative Labs threaten developer over home made drivers.... (Apr 1st, 2008)
|
![]() |
| Tags |
| fastest, dump, table, contents |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| [SOLVED] foreach problem -- table of contents script | MikeHopley | PHP Forum | 1 | Apr 4th, 2008 11:51 |
| fastest way to check if table exists | CloudedVision | PHP Forum | 3 | Feb 20th, 2008 16:15 |
| Dump actual header | alexgeek | PHP Forum | 6 | Jan 23rd, 2008 14:54 |
| Viewing the contents of a table in MySQL | nemmea | Databases | 3 | Sep 6th, 2007 22:01 |
| The Best and Fastest Method For Rounded Corner Designs | sinjix_media | Web Page Design | 1 | Jun 7th, 2007 15:38 |