Re: TPC-A and -B Benchmarks
Posted in 1993
Topics: SQL Development & Query Writing
In-Reply-To: NLUNIX:rmy.emory.edu!ilist@sun4nl.nl.oracle.com's message of 07-06-93 21:11
Just for your information:
Oracle (v6 and Oracle7) *DO* support repeatable reads, *WITHOUT* locking
whatsoever. By default (so without setting any parameters or changing any
settings), Oracle implements statement level multi-version read-consistency.
This advanced technique will always return correct data for a query, making
sure there are no inconsistencies because of changes made by other users during
the query. Changes made by other users *ARE* allowed however, you won't see
them as the result of the query when they are commited AFTER the start of
executing of the query.
Multiple versions of rows can be reconstructed very easy, as this information
is contained in the rollback data.
This works out very efficiently for multi-user systems, but, which is also
quite interesting, it also has effect within one statement. Consider the
following update statement:
UPDATE employees e1
SET salary =
(
SELECT avg(e2.salary)
FROM employees e2
WHERE e1.department = e2.department
)
The purpose of this statement is to set each employee's salary to the
average of all salaries in his/her department. When read-comsistency is not
correctly implemented, you might get the wrong result, i.e. changing averages,
or at least an unpredictable result.
After using 'SET TRANSACTION READONLY' in a session, Oracle will also enforced
read-consistency over multiple statements, allowing constructions like:
SELECT region, sum(salary)
FROM employees
GROUP BY region;
SELECT department, sum(salary)
FROM employess
GROUP BY department;
both statements will have to return the same total when run consecutively, even
if some salaries are changed in between. Session level read consistency will do
the job, again *WITHOUT* locking (in Oracle)
One note: I'm pretty sure Oracle will come up with TPC-C results some time. I
am not aware of any time scale, but I think TPC-A is still the most accepted at
this time. One of the purposed of benchmarks is that you can compare (allthough
very carefully) figures. If almost nobody is running TPC-C's (at this moment
only IBM as far as I know, both on AS/400 and RS/6000 with Informix), what can
customers do with these figures, as long as there is nothing to compare it
with. That's why I think a lot of DB vendors are a bit hesitant to immediately
start doing TPC-C's.
** These opinions are just mine and not of Oracle Corporation **
Sandor Nieuwenhuijs
Oracle Netherlands