# What is the maximum number of tables you can have in a single DB ?

**URL:** <https://forums.percona.com/t/what-is-the-maximum-number-of-tables-you-can-have-in-a-single-db/1457>\
**Category:** Other MySQL® Questions\
**Created:** [July 24, 2010, 6:44pm UTC](https://forums.percona.com/t/what-is-the-maximum-number-of-tables-you-can-have-in-a-single-db/1457 "2010-07-24T18:44:27Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![smcm](https://avatars.discourse-cdn.com/v4/letter/s/439d5e/32.png) [@smcm](https://forums.percona.com/u/smcm)\
**Post date:** [July 24, 2010, 6:44pm UTC](https://forums.percona.com/t/what-is-the-maximum-number-of-tables-you-can-have-in-a-single-db/1457/1 "2010-07-24T18:44:27Z")

</div>

I cannot find a definitive answer on this. I am dealing with a rapidly growing WordPress MU install (horrible DB design) running on MySQL 5 and RHEL 5. How many tables can fit in a single DB before there will be some issues?

---

<div class="post-metadata">

**Author:** ![gmouse](https://avatars.discourse-cdn.com/v4/letter/g/b9e5f3/32.png) [@gmouse](https://forums.percona.com/u/gmouse)\
**Post date:** [July 25, 2010, 7:56am UTC](https://forums.percona.com/t/what-is-the-maximum-number-of-tables-you-can-have-in-a-single-db/1457/2 "2010-07-25T07:56:17Z")

</div>

Opening a table has some overhead. For MyISAM, watch the table\_cache, for InnoDB, it’s all part of the buffer pool.

---

<div class="post-metadata">

**Author:** ![morgo](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/morgo/32/752_2.png) [@morgo](https://forums.percona.com/u/morgo)\
**Post date:** [July 25, 2010, 10:57pm UTC](https://forums.percona.com/t/what-is-the-maximum-number-of-tables-you-can-have-in-a-single-db/1457/3 "2010-07-25T22:57:14Z")

</div>

It has more to do with the underlying OS/filesystem than it does with MySQL - hence why you can’t find an answer 😉

If you need a number (Linux): ~50 000.

You won’t get that number on a small ec2 instance, but if you’ve got a little bit of memory it should work. You will need to raise the table\_cache quite high, and you’ll sink a lot of lost memory lost in InnoDB data dictionary.
