Re: Performance degradation question w/transactions
Posted in 1997
Roger Tomas <tomasr@agcs.com> wrote: :John Cowles wrote: :> :> Test 1: :> ------- :> :> Insert 100,000 rows into the table. :> Each insert is an individual transaction. :> Here is the excerpted SQL file I executed: :> :> begin work; :> insert into rows values ('key_0', 'anything', '0', 'today', 'today'); :> commit work; :> begin work; :> insert into rows values ('key_1', 'anything', '0', 'today', 'today'); :> commit work; :> begin work; :> insert into rows values ('key_2', 'anything', '0', 'today', 'today'); :> commit work; :> :> Test 2: :> ------- :> :> Insert 100,000 rows into the table, this time without transactions. :> Here is the excerpted SQL file I executed: :> :> insert into rows values ('key_0', 'anything', '0', 'today', 'today'); :> insert into rows values ('key_1', 'anything', '0', 'today', 'today'); :> insert into rows values ('key_2', 'anything', '0', 'today', 'today'); : :I thought that if you didn't explicitly specify "begin work", then each :SQL statement was its own transaction. Surely the engine must enforce :transaction semantics to ensure integrity. Right? If this is all true, :then what really is the difference between the above two tests? "without transactions" means there are no transactions at all. In the last test each sql statement is it's own "transaction", but nothing is written to the log for these statements, so this would obviously be much faster. This may be dangerous, but very usefull for many purposes. Nils.Myklebust@idg.no NM Data AS, P.O.Box 9090 Gronland, N-0133 Oslo, Norway My opinions are those of my company The Informix FAQ is at http://www.iiug.org