Overview of transactions and versioning
296
In other words, every transaction begins with a snapshot of the data in a reliable
state. The snapshot of the data that you see when you issue a query does not
change, even if another user is updating the table you are reading. For example,
in Figure 8-4, when User 1’s write transaction begins, it uses the
customer
table
version that was committed most recently. User 2’s transaction begins after
User 1 has begun writing, but before User 1 commits. Therefore, User 2’s first
transaction (Tr1) does not see any of User 1’s updates. User 2’s second
transaction begins after User 1 commits, so it sees all of User 1’s changes.
Figure 8-4: Transactions use committed data
The data that a writer sees changes only according to the changes he or she
makes; no other transaction can change what a writer sees until the writer’s
transaction commits. For example, in Figure 8-4, User 1 inserts some data,
then does a query, and then deletes some data. Those query results reflect the
insertions that User 1 has just made.
Other transactions that begin after User 1’s transaction begins but before it
commits see the version of the data from the time User 1’s transaction begins.
They can’t see the latest changes, because those changes were not yet
committed. As soon as User 1’s transaction commits, new transactions see User
1’s changes.
Timing of commits on read transactions affects versions
While a read transaction cannot affect what an existing write transaction sees,
committing a read transaction does have implications for other transactions.
Summary of Contents for Adaptive Server IQ 12.4.2
Page 1: ...Administration and Performance Guide Adaptive Server IQ 12 4 2 ...
Page 16: ...xvi ...
Page 20: ...Related documents xx ...
Page 40: ...Compatibility with earlier versions 20 ...
Page 118: ...Troubleshooting startup shutdown and connections 98 ...
Page 248: ...Importing data by replication 228 ...
Page 306: ...Integrity rules in the system tables 286 ...
Page 334: ...Cursors in transactions 314 ...
Page 396: ...Users and permissions in the system tables 376 ...
Page 438: ...Determining your data backup and recovery strategy 418 ...
Page 484: ...Network performance 464 ...
Page 500: ...System utilities to monitor CPU use 480 ...
Page 514: ...Characteristics of Open Client and jConnect connections 494 ...
Page 536: ...Index 516 ...