Sybase 12.4.2 Server User Manual


 
Performance implications
310
Disk space can sometimes become an issue. Storing overlapping versions
has the potential to use a lot of disk space, depending on the number and
size of versions in use simultaneously. Metadata and database page
versions are retained until they are dropped, either at a
RELEASE
SAVEPOINT
or when the last transaction that can see a given version
commits or rolls back. The space is then reclaimed.
Delays due to locking are minimal. Individual commits, rollbacks, and
checkpoints can block other read or write transactions only very briefly.
Remember that all of these performance and disk use factors only affect your
system in the degree to which you take advantage of IQ's concurrent read and
write capabilities. Disk space requirements in particular can vary widely,
depending on how long write transactions take before they commit, how many
read transactions take place during write transactions, the number of rows these
transactions affect, and whether you allow the release of data pages at interim
savepoints.
For an explanation of how Adaptive Server IQ uses the resources discussed in
this section, see Chapter 12, “Managing System Resources”
Overlapping versions and deletions
In order to delete data, you may actually need to increase disk space by adding
a dbspace to your IQ Store. The amount of space you need for a deletion
depends on the distribution of the data on data pages, more than on the size or
number of rows being deleted. IQ needs to retain a version of each page that
contains any of the data you are deleting, from the time the deletion begins until
the transaction commits. If the rows being deleted happen to be distributed
across many data pages, then you need space in your IQ Store to retain all of
those extra data pages.
For example, assume that you need to delete ten rows from a database where
each page holds 100 rows. If each of those ten rows is on a separate data page,
then your IQ Store needs to have space for ten version pages, each big enough
to hold 100 rows. While this distribution is unlikely, it is possible.
The space needed to delete data varies by index type. It is proportional to—and
in the worst case, equal to—the size of the index from which you are deleting.
For information on sizes of index types, see “Indexing criteria: disk space
usage”.
If you run out of space while deleting data, Adaptive Server IQ halts the
deletion and displays this message in the notification log: