Or you may be able to use a View if the need arises (and of course you can actually use them in your DB flavour).
-----Original Message----- From: Stephen Moretti (cfmaster) [mailto:[EMAIL PROTECTED] Sent: 05 July 2004 16:52 To: [EMAIL PROTECTED] Subject: Re: [ cf-dev ] Urgent: Moving Data from one table to another 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] This e-mail is from Reed Exhibitions (Oriel House, 26 The Quadrant, Richmond, Surrey, TW9 1DL, United Kingdom), a division of Reed Business, Registered in England, Number 678540. It contains information which is confidential and may also be privileged. It is for the exclusive use of the intended recipient(s). If you are not the intended recipient(s) please note that any form of distribution, copying or use of this communication or the information in it is strictly prohibited and may be unlawful. If you have received this communication in error please return it to the sender or call our switchboard on +44 (0) 20 89107910. The opinions expressed within this communication are not necessarily those expressed by Reed Exhibitions. Visit our website at http://www.reedexpo.com -- 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]
