X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 1DC7D56231 for ; Thu, 24 Feb 2005 13:47:40 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 32652-01 for ; Thu, 24 Feb 2005 13:47:33 +0000 (GMT) Received: from vms040pub.verizon.net (vms040pub.verizon.net [206.46.252.40]) by svr1.postgresql.org (Postfix) with ESMTP id 5468855F07 for ; Thu, 24 Feb 2005 13:47:32 +0000 (GMT) Received: from jfradkin ([66.15.127.235]) by vms040.mailsrvcs.net (Sun Java System Messaging Server 6.2 HotFix 0.04 (built Dec 24 2004)) with ESMTPA id <0ICF00JI34ZGMKS0@vms040.mailsrvcs.net> for pgsql-sql@postgresql.org; Thu, 24 Feb 2005 07:47:41 -0600 (CST) Date: Thu, 24 Feb 2005 08:51:38 -0500 From: "Joel Fradkin" Subject: Re: Speeds using a transaction vrs not In-reply-to: <421C38A8.5010809@archonet.com> To: "'Richard Huxton'" Cc: Message-id: <001b01c51a77$f704e250$797ba8c0@jfradkin> MIME-version: 1.0 Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=3.153 tagged_above=0 required=5 tests=AWL, MSGID_DOLLARS X-Spam-Level: *** X-Archive-Number: 200502/300 X-Sequence-Number: 20410 No I did not do it in on transaction (although in .net I never started or commited a transaction. ODBC : myTrans = myConnection.BeginTransaction(IsolationLevel.ReadCommitted) ' Assign transaction object for a pending local transaction myCommand.Transaction = myTrans 'example of insert 'myCommand.CommandText = "Insert into Region (RegionID, RegionDescription) VALUES (101, 'Description')" myCommand.CommandText = insertsqltext myCommand.ExecuteNonQuery() myTrans.Commit() .net driver: Dim cmd As New NpgsqlCommand(insertsqltext, cnn) cmd.ExecuteNonQuery() cmd.Dispose() Joel Fradkin Wazagua, Inc. 2520 Trailmate Dr Sarasota, Florida 34243 Tel. 941-753-7111 ext 305 jfradkin@wazagua.com www.wazagua.com Powered by Wazagua Providing you with the latest Web-based technology & advanced tools. C 2004. WAZAGUA, Inc. All rights reserved. WAZAGUA, Inc This email message is for the use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and delete and destroy all copies of the original message, including attachments. -----Original Message----- From: Richard Huxton [mailto:dev@archonet.com] Sent: Wednesday, February 23, 2005 3:03 AM To: Joel Fradkin Cc: pgsql-sql@postgresql.org Subject: Re: [SQL] Speeds using a transaction vrs not Joel Fradkin wrote: > I wrote a .net program to move my data to postgres (works great on > SQ_ASCII). > > In fiddling around I tried it using the odbc driver and a transaction > originally, but converted it to using the .net connectivity but no > transaction. > > What I found was it moved my database (4 gig in MSSQL) in 2 hours using the > .net, but 12 hours with the odbc and transaction. You *are* using transactions, you don't have a choice. Did you do the transfer of all 4GB in ONE transaction with the ODBC? Please describe the process in more detail. -- Richard Huxton Archonet Ltd