CREATE TABLE
Syntax
1037
These options work only when you are not using the
--skip-symbolic-links
[421]
option. Your
operating system must also have a working, thread-safe
realpath()
call. See
Section 8.9.6.2,
“Using Symbolic Links for
MyISAM
Tables on Unix”
, for more complete information.
If a
MyISAM
table is created with no
DATA DIRECTORY
option, the
.MYD
file is created in the
database directory. By default, if
MyISAM
finds an existing
.MYD
file in this case, it overwrites it.
The same applies to
.MYI
files for tables created with no
INDEX DIRECTORY
option. As of MySQL
5.0.48, to suppress this behavior, start the server with the
--keep_files_on_create
[458]
option,
in which case
MyISAM
will not overwrite existing files and returns an error instead.
If a
MyISAM
table is created with a
DATA DIRECTORY
or
INDEX DIRECTORY
option and an existing
.MYD
or
.MYI
file is found, MyISAM always returns an error. It will not overwrite a file in the specified
directory.
Important
Beginning with MySQL 5.0.60, you cannot use path names that contain the
MySQL data directory with
DATA DIRECTORY
or
INDEX DIRECTORY
. (See
Bug #32167.)
•
DELAY_KEY_WRITE
Set this to 1 if you want to delay key updates for the table until the table is closed. See the
description of the
delay_key_write
[447]
system variable in
Section 5.1.4, “Server System
Variables”
. (
MyISAM
only.)
•
INSERT_METHOD
If you want to insert data into a
MERGE
table, you must specify with
INSERT_METHOD
the table into
which the row should be inserted.
INSERT_METHOD
is an option useful for
MERGE
tables only. Use a
value of
FIRST
or
LAST
to have inserts go to the first or last table, or a value of
NO
to prevent inserts.
See
Section 14.3, “The
MERGE
Storage Engine”
.
•
MAX_ROWS
The maximum number of rows you plan to store in the table. This is not a hard limit, but rather a hint
to the storage engine that the table must be able to store at least this many rows.
The
NDB
storage engine treats this value as a maxmimum. If you plan to create very large MySQL
Cluster tables (containing millions of rows), you should use this option to insure that
NDB
allocates
sufficient number of index slots in the hash table used for storing hashes of the table's primary keys
by setting
MAX_ROWS = 2 * rows
, where
rows
is the number of rows that you expect to insert into
the table.
The maximum
MAX_ROWS
value is 4294967295; larger values are truncated to this limit.
•
MIN_ROWS
The minimum number of rows you plan to store in the table. The
MEMORY
storage engine uses this
option as a hint about memory use.
•
PACK_KEYS
PACK_KEYS
takes effect only with
MyISAM
tables. Set this option to 1 if you want to have smaller
indexes. This usually makes updates slower and reads faster. Setting the option to 0 disables all
packing of keys. Setting it to
DEFAULT
tells the storage engine to pack only long
CHAR
,
VARCHAR
,
BINARY
, or
VARBINARY
columns.
If you do not use
PACK_KEYS
, the default is to pack strings, but not numbers. If you use
PACK_KEYS=1
, numbers are packed as well.
Содержание 5.0
Страница 1: ...MySQL 5 0 Reference Manual ...
Страница 18: ...xviii ...
Страница 60: ...40 ...
Страница 396: ...376 ...
Страница 578: ...558 ...
Страница 636: ...616 ...
Страница 844: ...824 ...
Страница 1234: ...1214 ...
Страница 1426: ...MySQL Proxy Scripting 1406 The following diagram shows an overview of the classes exposed by MySQL Proxy ...
Страница 1427: ...MySQL Proxy Scripting 1407 ...
Страница 1734: ...1714 ...
Страница 1752: ...1732 ...
Страница 1783: ...Configuring Connector ODBC 1763 ...
Страница 1793: ...Connector ODBC Examples 1773 ...
Страница 1839: ...Connector Net Installation 1819 2 You must choose the type of installation to perform ...
Страница 1842: ...Connector Net Installation 1822 5 Once the installation has been completed click Finish to exit the installer ...
Страница 1864: ...Connector Net Visual Studio Integration 1844 Figure 20 24 Debug Stepping Figure 20 25 Function Stepping 1 of 2 ...
Страница 2850: ...2830 ...
Страница 2854: ...2834 ...
Страница 2928: ...2908 ...
Страница 3000: ...2980 ...
Страница 3122: ...3102 ...
Страница 3126: ...3106 ...
Страница 3174: ...3154 ...
Страница 3232: ...3212 ...