Re: Speeds using a transaction vrs not

From: "Joel Fradkin" <jfradkin(at)wazagua(dot)com>
To: "'Richard Huxton'" <dev(at)archonet(dot)com>
Cc: <pgsql-sql(at)postgresql(dot)org>
Subject: Re: Speeds using a transaction vrs not
Date: 2005-02-24 13:51:38
Message-ID: 001b01c51a77$f704e250$797ba8c0@jfradkin
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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(at)wazagua(dot)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(at)archonet(dot)com]
Sent: Wednesday, February 23, 2005 3:03 AM
To: Joel Fradkin
Cc: pgsql-sql(at)postgresql(dot)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

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Philippe Lang 2005-02-24 14:11:19 Postgresql inheritance workaround
Previous Message Kai Hessing 2005-02-24 13:39:39 Re: Software for database-visualisation