MYSQL - Using Other Table Modifiers

The TYPE attribute isn’t the only option available to control the behavior of the table being created. A number of other MySQL-specific attributes are also available. Here’s a list of the more interesting ones.

• The AUTO_INCREMENT modifier specifies the starting value to use for AUTO_ INCREMENT fields in the table.

• The CHARACTER SET and COLLATE modifiers specify the table character set and collation.

• The CHECKSUM modifier controls whether table checksums should be calculated and stored.

• The COMMENT modifier saves a descriptive label for the table.

• The MAX_ROWS and MIN_ROWS modifiers specify the maximum and minimum number of rows the table is likely to have.

• The PACK_KEYS modifier controls whether table indexes are compressed. Compressing indexes reduces the table’s size on disk, but can affect performance (as indexes need to be uncompressed every time they are updated).

• The DELAY_KEY_WRITE modifier controls whether table indexes are updated only after all writes to the table are complete. This can improve performance for tables that see a high frequency of writes.

• The UNION modifier specifies a list of tables to be merged (only useful with the
MERGE storage engine).

• The DATA DIRECTORY and INDEX DIRECTORY modifiers specify custom paths for the table data and index files.

Source of Information : MCGraw Hill - SQL the Complete Reference 3rd Edition


Subscribe to Developer Techno ?
Enter your email address:

Delivered by FeedBurner