Oracle 5.0 Reference Manual page 1331

Table of Contents

Advertisement

The
storage engine provides transactional tables. The way you use these tables depends on the
BDB
autocommit mode:
• If you are running with autocommit enabled (which is the default), changes to
committed immediately and cannot be rolled back.
• If you are running with autocommit disabled, changes do not become permanent until you execute a
statement. Instead of committing, you can execute
COMMIT
You can start a transaction with the
autocommit, or with
For more information about transactions, see
Syntax".
ROLLBACK
The
storage engine has the following characteristics:
BDB
tables can have up to 31 indexes per table, 16 columns per index, and a maximum key size of
BDB
1024 bytes.
• MySQL requires a primary key in each
don't create one explicitly by declaring a
primary key for you. The hidden key has a length of five bytes and is incremented for each insert
attempt. This key does not appear in the output of
• The primary key is faster than any other index, because it is stored together with the row data. The
other indexes are stored as the key data plus the primary key, so it is important to keep the primary
key as short as possible to save disk space and get better speed.
This behavior is similar to that of InnoDB, where shorter primary keys save space not only in the
primary index but in secondary indexes as well.
• If all columns that you access in a
MySQL can execute the query without having to access the actual row. In a
be done only if the columns are part of the same index.
• Sequential scanning is slower for
is stored in B-trees and not in a separate data file.
• Key values are not prefix- or suffix-compressed like key values in
information takes a little more space in
• There are often holes in the
tree. This makes
BDB
SELECT COUNT(*) FROM tbl_name
the table.
• The optimizer needs to know the approximate number of rows in the table. MySQL solves this by
counting inserts and maintaining this in a separate segment in each
a lot of
or
DELETE
ROLLBACK
optimizer. However, MySQL stores the number only on close, so it may be incorrect if the server
terminates unexpectedly. It should not be fatal even if this number is not 100% correct. You can
update the row count by using
"ANALYZE TABLE
Syntax", and
• Internal locking in
BDB
works on
LOCK TABLES
issues an internal multiple-write lock on the table (a lock that does not block other writers) to ensure
that the table is properly locked if another thread issues a table lock.
Characteristics of
START TRANSACTION
SET autocommit = 0
BDB
PRIMARY
table are part of the same index or part of the primary key,
BDB
tables than for
BDB
BDB
table to permit you to insert new rows in the middle of the index
BDB
tables somewhat larger than
is slow for
statements, this number should be accurate enough for the MySQL
ANALYZE TABLE
Section 13.7.2.5,
tables is done at the page level.
tables as with other tables. If you do not use
BDB
1311
Tables
BDB
ROLLBACK
or
BEGIN
to disable autocommit explicitly.
Section 13.3.1,
"START
table so that each row can be uniquely identified. If you
KEY, MySQL creates and maintains a hidden
SHOW CREATE TABLE
tables because the data in
MyISAM
MyISAM
tables compared to
MyISAM
tables.
MyISAM
tables, because no row count is maintained in
BDB
or
TABLE. See
OPTIMIZE
"OPTIMIZE TABLE
tables are
BDB
to forget the changes.
statement to suspend
TRANSACTION, COMMIT, and
or DESCRIBE.
table, this can
MyISAM
BDB
tables. In other words, key
tables.
table. If you don't issue
BDB
Section 13.7.2.1,
Syntax".
TABLES, MySQL
LOCK
tables

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mysql 5.0

Table of Contents