Mike wrote:

I have looked into doing this as well, when moving large amounts of data
isn't this liable to timeout or fall over?


I'm not sure what database you're using, not that it really matters that much, but this is from experience with mySQL.

Doing a "INSERT INTO table SELECT fields FROM anothertable" is infinity more preferable than simply INSERTing individual records. The INSERT... SELECT takes fractions of a second, as compared to fractions of a second for each record that is inserted.

You're going to find that moving 50,000 records is going to take time which ever way you choose to move them, but theoretically (I haven't tested it) it should be much more efficient to use the single statement, as opposed to 50,000 individual inserts.

If you're expecting to be moving lots of records all the time, you might be as well to look in to a DTS process, as Neil has suggested.

However, I have to ask - why are you moving the records in the first place? Do you really need to put them into a duplicate of the master table? Can you not just work with the record set directly from the user selected query? Would a Stored Procedure be more appropriate to creating/copying/deleting large chunks of tables and data?

Stephen


-- These lists are syncronised with the CFDeveloper forum at http://forum.cfdeveloper.co.uk/ Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/

CFDeveloper Sponsors and contributors:-
*Hosting and support provided by CFMXhosting.co.uk* :: *ActivePDF provided by 
activepdf.com*
     *Forums provided by fusetalk.com* :: *ProWorkFlow provided by proworkflow.com*
          *Tutorials provided by helmguru.com* :: *Lists hosted by gradwell.com*

To unsubscribe, e-mail: [EMAIL PROTECTED]



Reply via email to