Re: Speeds using a transaction vrs not
От | Joel Fradkin |
---|---|
Тема | Re: Speeds using a transaction vrs not |
Дата | |
Msg-id | 001b01c51a77$f704e250$797ba8c0@jfradkin обсуждение исходный текст |
Ответ на | Re: Speeds using a transaction vrs not (Richard Huxton <dev@archonet.com>) |
Ответы |
Re: Speeds using a transaction vrs not
|
Список | 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 transactionmyCommand.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, IncThis email message is for the use of the intended recipient(s) andmay 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
В списке pgsql-sql по дате отправления: