To get an idea of what you are doing to your DB server by sending it so many small writes, think of what happens when you copy 1 large 1GB file compared to 1000 small 1MB files.
-----Original Message----- From: Ivan Towlson [mailto:[EMAIL PROTECTED] Sent: 08 July 2004 01:30 PM To: [EMAIL PROTECTED] Subject: Re: [ADVANCED-DOTNET] [E500] [ADVANCED-DOTNET] Quick String question Well... it looks from your code like you're making 250000 round trips to the database. That's got to be expensive. -- Ivan Towlson White Carbon -----Original Message----- From: Unmoderated discussion of advanced .NET topics. [mailto:[EMAIL PROTECTED] Behalf Of Alex Ben-Ari Sent: 08 July 2004 12:24 To: [EMAIL PROTECTED] Subject: [E500] [ADVANCED-DOTNET] Quick String question The following strategy (semi-pseudo code) is running extremely slowly, can anyone tell me why and/or point to a better alternative: Assuming I have a Char[] called chr containing the 250MB: curPos = 0; While(curPos < chr.Length) { String segment = new String(chr, curPos, segmentLen); UpdateDB(segment) curPos += segmentLen } =================================== This list is hosted by DevelopMentor(r) http://www.develop.com Some .NET courses you may be interested in: NEW! Guerrilla ASP.NET, 17 May 2004, in Los Angeles http://www.develop.com/courses/gaspdotnetls View archives and manage your subscription(s) at http://discuss.develop.com ************************************************************************************************************************** Everything in this e-mail and attachments relating to the official business of MultiChoice Africa is proprietary to the company. Any view or opinion expressed in this message may be the view of the individual and should not automatically be ascribed to the company. If you are not the intended recipient, you may not peruse, use, disseminate, distribute or copy this message. If you have received this message in error, please notify the sender immediately by email, facsimile or telephone and destroy the original message. ************************************************************************************************************************** =================================== This list is hosted by DevelopMentor� http://www.develop.com Some .NET courses you may be interested in: NEW! Guerrilla ASP.NET, 17 May 2004, in Los Angeles http://www.develop.com/courses/gaspdotnetls View archives and manage your subscription(s) at http://discuss.develop.com
