views:

39

answers:

3

Hello I have changed auto_increment value to 1000000 of a MyISAM table. Does this affect read/write performance? I thought that db engine may look for IDs before ID 1000000 everytime a list of rows is requested.

A: 

This should not affect the read/write performance at all. Just by setting the auto_increment value to a high number does not mean that there is a huge gap between the rows.

Best wishes, Fabian

halfdan
A: 

No, the value of an auto-increment ID (or any ID for that matter) will have no affect on performance.

The only consideration when picking values is when you will run out of IDs given the size of your ID column (the size of the column may have an impact but it's likely to be minor compared to other performance considerations).

Dan Head
A: 

No. ISAM means "Indexed Sequential Access Method" MyISAM is an extension to that mechanism. So basically the database builds a lookup table of the primary keys and where in the datafile its stored. Then it jumps to that spot in the file to read the data. The index itself a tree or similar structure to minimize the time needed to find the key. . . As others have mentioned, you'll have other performance concerns when using MyISAM.

Jason D