Thread: Index Limit

    #1
  1. No Profile Picture
    DanH
    Guest
    Devshed Newbie (0 - 499 posts)
    Hello:

    Is anyone aware of a mysql index limit, and does that apply to just one table, just one database, or both?

    Thanks
    Dan
  2. #2
  3. No Profile Picture
    Robman
    Guest
    Devshed Newbie (0 - 499 posts)
    I don't have a solution for you but I think I may be experiencing a similar problem.
    I've gotten to id 127 and can't seem to insert any more rows. It gives me an error something about Duplicate key....blah blah.
    I was wondering myself if there was some way to reset the value. There can't possibly be a limit of 127 rows in a table.
  4. #3
  5. No Profile Picture
    rod k
    Guest
    Devshed Newbie (0 - 499 posts)
    Your index is limited by the data type. Robman must be using a tinyint (signed) data type which would limit the max to 127 (signed tinyint ranges from -128 to 127) as a tinyint is only 1 byte in size. By using an unsigned tinyint the range would be 0 to 255. An unsigned smallint max would be 65535 (2 bytes). Mediumint unsigned max would be 16777215 (3 bytes). Int unsigned would be 4294967295 (4 bytes). Big int (8 bytes) unsigned would be 18446744073709551615 (not exactly practical). For most dynamic tables an unsigned mediumint should suffice.

    Rod




    [This message has been edited by rod k (edited 10-18-99).]
  6. #4
  7. No Profile Picture
    Robman
    Guest
    Devshed Newbie (0 - 499 posts)
    Yep. Rod is correct.
    I just came back to answer my own question. I've now changed it to SMALLINT UNSIGNED.
    Hopefully I'll remember this if I hit my head on the ceiling again!

    Robman

Similar Threads

  1. How do I Generate Access 200 Db from script?
    By johnnyr77 in forum Database Management
    Replies: 0
    Last Post: September 1st, 2003, 06:45 PM
  2. not possible to SELECT-WHERE primary key fields?
    By mithril in forum MySQL Help
    Replies: 2
    Last Post: July 18th, 2003, 03:16 PM
  3. MySQL vs PostgreSQL
    By Adman in forum Database Management
    Replies: 46
    Last Post: September 10th, 2002, 01:48 AM
  4. Replies: 4
    Last Post: February 18th, 2002, 07:08 AM
  5. Best MySQL Table Set Up?
    By MediaOhgr in forum MySQL Help
    Replies: 12
    Last Post: January 13th, 2002, 10:44 PM

IMN logo majestic logo threadwatch logo seochat tools logo