# Increase MAX\_INDEX on a table

**URL:** <https://forums.percona.com/t/increase-max-index-on-a-table/4455>\
**Category:** Percona Server for MySQL 5.6\
**Created:** [October 15, 2015, 8:29am UTC](https://forums.percona.com/t/increase-max-index-on-a-table/4455 "2015-10-15T08:29:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![nhadie](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/nhadie/32/867_2.png) [@nhadie](https://forums.percona.com/u/nhadie)\
**Post date:** [October 15, 2015, 8:29am UTC](https://forums.percona.com/t/increase-max-index-on-a-table/4455/1 "2015-10-15T08:29:51Z")

</div>

Hi All,

Our devs just reported experiencing adding index on a table, as it hit the maximum number of indexes ( 64 ). Browsing for a solution, found that i need to recompile.

Since we used percona’s deb repository, i also grabbed the source there: apt-get source percon-server-server

After grabbing the source, i updated the file: CMakeLists.txt and edited the line SET(MAX\_INDEXES 64) and change to 255, and build the package using dpkgbuild.

but i encountered this error:

## ---- make[3]: Entering directory `/usr/local/src/percona-server-5.6-5.6.23-72.1/debug’ In file included from /usr/local/src/ppercona-server-5.6-5.6.23-72.1/sql/sql\_select.h:31:0, from /usr/local/src/percona-server-5.6-5.6.23-72.1/sql/abstract\_query\_plan.cc:19: /usr/local/src/percona-server-5.6-5.6.23-72.1/sql/opt\_range.h: In member function ‘bool SQL\_SELECT::check\_quick(THD\*, bool, ha\_rows)’: /usr/local/src/percona-server-5.6-5.6.23-72.1/sql/opt\_range.h:936:17: error: ‘ALL\_BITS’ is not a member of ‘key\_map {aka Bitmap\<256u\>}’ Scanning dependencies of target mysqlcheck

Sorry im not familiar with C/C++ now i’m stuck ☹ ..hope someone can direct me to a solution. TIA.

Nhadie

---

<div class="post-metadata">

**Author:** ![scott.nemes](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/scott.nemes/32/5_2.png) [@scott.nemes](https://forums.percona.com/u/scott.nemes)\
**Post date:** [October 15, 2015, 10:44am UTC](https://forums.percona.com/t/increase-max-index-on-a-table/4455/2 "2015-10-15T10:44:37Z")

</div>

Hi nhadie;

Unfortunately I cannot help with changing the code, as that is a lot more involved than most people will ever get to. But have you already checked for duplicate indexes? Chances are if you have 64 indexes already, you have at least a few duplicates.

[url][https://www.percona.com/doc/percona-toolkit/2.1/pt-duplicate-key-checker.html[/url]](https://www.percona.com/doc/percona-toolkit/2.1/pt-duplicate-key-checker.html%5B/url%5D)

-Scott

---

<div class="post-metadata">

**Author:** ![nhadie](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/nhadie/32/867_2.png) [@nhadie](https://forums.percona.com/u/nhadie)\
**Post date:** [October 15, 2015, 6:46pm UTC](https://forums.percona.com/t/increase-max-index-on-a-table/4455/3 "2015-10-15T18:46:05Z")

</div>

Thank you Scott. Will look into that.

Nhadie
