Newsgroups: comp.databases.oracle.server
From: Holger Baer <holger.b...@science-computing.de>
Date: Fri, 03 Jun 2005 09:44:15 +0200
Local: Fri, Jun 3 2005 3:44 am
Subject: Re: Oracle and Dotnet
Larry wrote: So you think. But .NET is autocommiting as every junk was that excreated by MS. > Jim Kennedy wrote: > Is it possible there are some inefficiencies in the code. Sure. > I doubt it. > I only open the connection once. (And the reason behind this is that MS SQL Server is not very good in long running transactions). Even JDBC suffers the same problem (because most Java guys are not much better when it comes to databases). So search the .Net documentation how to turn off autocommit, and you'll be > I'm not using binding because I insert the same fixed SQL statement each You suffer the same problem that many developers suffer. You start out with > time. > Are there some inefficiencies...maybe...but geez, 40 inserts per second? a small benchmark, and instead of trying to learn something out of it (namely how to use Oracle correctly in the first place) you're prepared to blame anybody else. A database is not a bit bucket and code that runs on one RDBMS will not necessarily run well on another. ANSI SQL is a formal description of the SQLanguage, however, it's implementation varies from RDBMS to RDBMS. To simulate what the .NET code actually does, you can run the following test: The timing will not be the same, but it will get you in the right direction. Now how to fix this? > //create the command and assign the connection to it OracleTransation TransX = con.BeginTransaction(); > OracleCommand cmd = new OracleCommand(); > cmd.Connection = con; > //create the SQL, no variables, no bindings to worry about cmd.Transaction = TransX; > //do my loop TransX.Commit(); > for (int x = 1; x<1000; x++) > { > cmd.ExecuteNonQuery(); > } I'm not a .NET developer. But http://www.datadirect.com/developer/net/dot_net_optimizing/index.ssp HTH You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||