Re: Performance degradation question w/transactions
Posted in 1997
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?
-----------
Roger Tomas
AG Communication Systems