tags:

views:

17

answers:

1
CREATE TABLE `mytable` (
  `attachid` int(15) NOT NULL auto_increment,
...
...
) ENGINE=MyISAM PACK_KEYS=1 CHECKSUM=1

My create table statement looks like as shown above. If I omit PACK_KEYS and checksum will it improve the insert/ update speed. Is this option helping to make selects faster?

A: 

The answer depends on what other keys you have on the table. If your primary key is the only key, the PACK_KEYS will provide little or no benefit and will incur a very small overhead on insert. If you have keys on the table that contain substantial amounts of text, then PACK_KEYS will slow down inserts slightly and make the indexes smaller and faster to search.

CHECKSUM is used only to recover a corrupt table.

If you show us more of the table definition we may be able to offer more specific advice.

Brian Hooper