This is a discussion on Setting Index for mysql table fields within the Database Support forums, part of the Web Development category; hi, how many index can be created for a mysql table if the table has 100 fields?...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
| |||
| Hi, Creating an index requires creating a key, and there's a limit placed on the number of keys allowed for a table. So the limit on indexes is governed by the number of keys you are allowed to create. I have tested this in mysql 5.0.22-max-log. -- Creating a table with 80 Columns. -- while we creating 70 indexes for all columns in that table, indexes created only for 64 columns and reported the below given error.. ERROR 1069: Too many keys specified. Max XX keys allowed From the MySQL Documentaion Error: 1069 SQLSTATE: 42000 (ER_TOO_MANY_KEYS) Message: Too many keys specified; max %d keys allowed. It seems like that we can have maximun 64 indexs in a table. (Here we did't consider full text indexes) I have reviewed some forums and it appears that this limit is controlled by the MAX_KEY variable in the source code (sql/unireg.h). Changing the value requires a recompile of MySQL. - Priyan.. |
| |||
| Hi, We can have only one Clustered Index in a Table as it will be unique for every table. There can be any number of Non-Clustered Index in a table as its just a pointer to the data on a table.
__________________ -Murali.. |
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| CACHE INDEX In MySql | prasath | Database Support | 0 | 09-19-2007 10:49 PM |
| Mysql - Table Join | write2ashokkumar | Database Support | 2 | 09-14-2007 06:12 AM |
| What are the different index configurations a table can have in sql Server 2005? | Archer | Database Support | 1 | 07-25-2007 03:33 AM |
| What is a table called, if it does not have neither Cluster nor Non-cluster Index?.. | Archer | Database Support | 2 | 07-19-2007 12:19 AM |
| How to calculate the table size in mysql | write2ashokkumar | Database Support | 1 | 07-11-2007 08:08 AM |